spawn/README.md
L 6ac59e6bb3
Fix OAuth server for macOS bash 3.x (#24)
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>
2026-02-07 14:21:47 -08:00

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:

  1. Authenticates with the cloud provider
  2. Provisions a server/sandbox
  3. Installs the agent + dependencies
  4. Gets your OpenRouter API key (OAuth or manual)
  5. Injects OpenRouter env vars into the shell
  6. 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.