mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
Three issues broke the OAuth callback server on macOS: 1. echo -e doesn't work in bash 3.x — \r\n appears as literal text in the HTTP response, browser gets malformed headers. Fix: pre-write response with printf to a file before the subshell. 2. local variables inside ( ... ) & subshell — undefined behavior in bash 3.x since subshells aren't function scope. Fix: use plain variables in subshells. 3. ((elapsed++)) when elapsed=0 evaluates to falsy — set -e kills the script on the first iteration of the timeout loop. Fix: use elapsed=$((elapsed + 1)) instead. Also simplified nc_listen detection to only check for BusyBox (the -p flag check could misfire on macOS nc). Applied to all 10 lib/common.sh files. Co-authored-by: Sprite <noreply@sprite.dev> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 KiB
5 KiB
Spawn
One command to launch any AI coding agent on any cloud, pre-configured with OpenRouter.
Quick Start
Install the spawn CLI:
curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/cli/install.sh | bash
Then launch any agent interactively:
spawn # Interactive picker
spawn claude sprite # Launch Claude Code on Sprite
spawn aider hetzner # Launch Aider on Hetzner Cloud
spawn list # See the full matrix
Or run directly without installing:
bash <(curl -fsSL https://openrouter.ai/lab/spawn/{cloud}/{agent}.sh)
Matrix
| Sprite | Hetzner | DigitalOcean | Vultr | Linode | Lambda | AWS Lightsail | GCP | E2B | Modal | |
|---|---|---|---|---|---|---|---|---|---|---|
| Claude Code | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| OpenClaw | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| NanoClaw | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| Aider | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| Goose | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| Codex CLI | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| Open Interpreter | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| Gemini CLI | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| Amazon Q | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
| Cline | launch | launch | launch | launch | launch | launch | launch | launch | launch | launch |
10 agents x 10 clouds = 100 combinations. Every script injects OpenRouter credentials automatically.
How It Works
Each script:
- Authenticates with the cloud provider
- Provisions a server/sandbox
- Installs the agent + dependencies
- Gets your OpenRouter API key (OAuth or manual)
- Injects OpenRouter env vars into the shell
- Drops you into an interactive session
Non-Interactive Mode
Skip all prompts by setting env vars:
OPENROUTER_API_KEY=sk-or-v1-xxxxx \
{CLOUD_NAME_VAR}=dev-mk1 \
bash <(curl -fsSL https://openrouter.ai/lab/spawn/{cloud}/claude.sh)
See each cloud's README for provider-specific env vars.
Self-Improving
./improve.sh # agent team fills gaps + discovers new agents/clouds
./improve.sh --loop # continuous improvement cycles
Uses Claude Code Agent Teams to coordinate parallel work.