Find a file
A 25690185a5
Some checks failed
CLI Release / Build and release CLI (push) Waiting to run
Lint / ShellCheck (push) Waiting to run
Lint / Biome Lint (push) Waiting to run
Lint / macOS Compatibility (push) Waiting to run
Build Docker Images / build (claude) (push) Has been cancelled
Build Docker Images / build (codex) (push) Has been cancelled
Build Docker Images / build (cursor) (push) Has been cancelled
Build Docker Images / build (hermes) (push) Has been cancelled
Build Docker Images / build (junie) (push) Has been cancelled
Build Docker Images / build (kilocode) (push) Has been cancelled
Build Docker Images / build (openclaw) (push) Has been cancelled
Build Docker Images / build (opencode) (push) Has been cancelled
refactor: remove stale ZeroClaw references from CLAUDE.md and agents.ts (#3096)
* fix(ci): remove stale paths from biome check step in lint.yml

biome.json restricts linting to packages/**/*.ts via its includes filter,
so passing .claude/scripts/ and .claude/skills/setup-spa/ to the biome
check command was a no-op — biome reported 0 files processed for those
paths and silently skipped them.

Remove the stale paths so the CI step accurately reflects what biome
actually checks.

* feat: add OpenRouter proxy for Cursor CLI agent (#3100)

Cursor CLI uses a proprietary ConnectRPC/protobuf protocol with BiDi
streaming over HTTP/2. It validates API keys against Cursor's own servers
and hardcodes api2.cursor.sh for agent streaming — making direct
OpenRouter integration impossible.

This adds a local translation proxy that intercepts Cursor's protocol
and routes LLM traffic through OpenRouter:

Architecture:
  Cursor CLI → Caddy (HTTPS/H2, port 443) → split routing:
    /agent.v1.AgentService/* → H2C Node.js (BiDi streaming → OpenRouter)
    everything else → HTTP/1.1 Node.js (fake auth, models, config)

Key components:
- cursor-proxy.ts: proxy scripts + deployment functions
- Caddy reverse proxy for TLS + HTTP/2 termination
- /etc/hosts spoofing to intercept api2.cursor.sh
- Hand-rolled protobuf codec for AgentServerMessage format
- SSE stream translation (OpenRouter → ConnectRPC protobuf frames)

Proto schemas reverse-engineered from Cursor CLI binary v2026.03.25:
- AgentServerMessage.InteractionUpdate.TextDeltaUpdate.text
- agent.v1.ModelDetails (model_id, display_model_id, display_name)
- TurnEndedUpdate (input_tokens, output_tokens)

Tested end-to-end on Sprite VM: Cursor CLI printed proxy response with
EXIT=0.

Co-authored-by: Ahmed Abushagur <ahmed@abushagur.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(digitalocean): use canonical DIGITALOCEAN_ACCESS_TOKEN env var (#3099)

Replaces all references to DO_API_TOKEN with DIGITALOCEAN_ACCESS_TOKEN,
matching DigitalOcean's official CLI and API documentation. This includes
TypeScript source, tests, shell scripts, Packer config, CI workflows,
and documentation.

Supersedes #3068 (rebased onto current main).

Agent: pr-maintainer

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: remove --trust flag from Cursor CLI launch command (#3101)

Cursor CLI v2026.03.25 only allows --trust in headless/print mode.
Launching interactively with --trust causes immediate exit with error.

Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ahmed Abushagur <ahmed@abushagur.com>

* fix(cursor): set CURSOR_API_KEY to skip browser login (#3104)

Cursor CLI requires authentication before making API calls. Without
CURSOR_API_KEY set, it falls back to browser-based OAuth which fails
because the proxy spoofs api2.cursor.sh to localhost, breaking the
OAuth callback. Setting a dummy CURSOR_API_KEY makes Cursor use the
/auth/exchange_user_api_key endpoint instead, which the proxy already
handles with a fake JWT.

Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: sync README with source of truth (#3097)

- update tagline: 8 agents/48 combos -> 9 agents/54 combos
- add Cursor CLI row to matrix table

manifest.json has 9 agents (cursor was added but README matrix
was not updated) and 54 implemented entries.

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Ahmed Abushagur <ahmed@abushagur.com>

* fix(cursor): update proxy model list to current models (#3105)

Replace outdated models (Claude Sonnet 4, GPT-4o) with current ones:
- Claude Sonnet 4.6 (default), Claude Haiku 4.5
- GPT-4.1
- Gemini 2.5 Pro, Gemini 2.5 Flash

Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(status): add agent alive probe via SSH (#3109)

`spawn status` now probes running servers by SSHing in and running
`{agent} --version` to verify the agent binary is installed and
executable. Results show in a new "Probe" column (live/down/—) and
as `agent_alive` in JSON output. Only "running" servers are probed;
gone/stopped/unknown servers are skipped.

The probe function is injectable via opts for testability.

Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add cursor to agent lists in spawn skill files (#3108)

cursor is a fully implemented agent across all 6 clouds but was missing
from the available agents list in spawn skill instructions injected onto
child VMs. This caused claude, codex, hermes, junie, kilocode, openclaw,
opencode, and zeroclaw to be unaware they could delegate work to cursor.

Signed-off-by: Ahmed Abushagur <ahmed@abushagur.com>
Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Ahmed Abushagur <ahmed@abushagur.com>

* fix(security): expand $HOME before path validation in downloadFile (#3080)

Fixes #3080

Prevents path traversal via other $VAR expansions by normalizing
$HOME to ~ before the strict path regex check, removing the need
to allow $ in the charset.

Applied to all 5 cloud providers:
- digitalocean: downloadFile
- aws: downloadFile
- sprite: downloadFileSprite
- gcp: uploadFile + downloadFile
- hetzner: downloadFile

Also bumps CLI version to 0.27.7.

Agent: security-auditor

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(manifest): correct cursor repo to cursor/cursor and update star counts (#3092)

The cursor agent's repo was set to anysphere/cursor (private, returns 404),
which caused the stars-update script to store the raw 404 error object as
github_stars instead of a number — breaking the manifest-type-contracts test.

Fix: update repo to the public cursor/cursor repo (32,526 stars as of 2026-03-29).
Also applies the daily star count updates for all other agents.

-- qa/e2e-tester

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>

* fix(spawn-fix): load API keys via config file, not just process.env (#3095)

Previously buildFixScript() resolved env templates directly from
process.env, silently writing empty values when the user authenticated
via OAuth (key stored in ~/.config/spawn/openrouter.json). Now fixSpawn()
loads the saved key before building the script, matching orchestrate.ts.

Fixes #3094

Agent: code-health

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: sync README commands table with help.ts (--prompt, --prompt-file) (#3106)

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>

* fix(e2e): reduce Hetzner batch parallelism from 3 to 2 (#3112)

Prevents server_limit_reached errors when pre-existing servers (e.g.
spawn-szil) consume quota during E2E batch 1.

Fixes #3111

Agent: test-engineer

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* refactor(e2e): normalize unused-arg comments in headless_env functions (#3113)

GCP, Sprite, and DigitalOcean had commented-out code `# local agent="$2"`
in their `_headless_env` functions. Hetzner already used the cleaner style
`# $2 = agent (unused but part of the interface)`. Normalize to match.

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: Remove duplicate and theatrical tests (#3089)

* test: remove duplicate and theatrical tests

- update-check.test.ts: fix 3 tests using stale hardcoded version '0.2.3'
  (older than current 0.29.1) to use `pkg.version` so 'should not update
  when up to date' actually tests the current-version path correctly
- run-path-credential-display.test.ts: strengthen weak `toBeDefined()`
  assertion on digitalocean hint to `toContain('Simple cloud hosting')`,
  making it verify the actual fallback hint content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: replace theatrical no-assert tests with real assertions in recursive-spawn

Two tests in recursive-spawn.test.ts captured console.log output into a
logs array but never asserted against it. Both ended with a comment like
"should not throw" — meaning they only proved the function didn't crash,
not that it produced the right output.

- "shows empty message when no history": now spies on p.log.info and
  asserts cmdTree() emits "No spawn history found."
- "shows flat message when no parent-child relationships": now asserts
  cmdTree() emits "no parent-child relationships" via p.log.info.

expect() call count: 4831 to 4834 (+3 real assertions added).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: consolidate redundant describe block in cmd-fix-cov.test.ts

The file had two separate describe blocks with identical beforeEach/afterEach
boilerplate. The second block ("fixSpawn connection edge cases") contained only
one test ("shows success when fix script succeeds") and could be merged directly
into the first block ("fixSpawn (additional coverage)") without any loss of
coverage or setup fidelity.

Removes 23 lines of duplicated boilerplate. Test count unchanged (6 tests).

---------

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(config): extend biome.json includes to cover .claude/**/*.ts

Add .claude/**/*.ts to biome.json includes so TypeScript files in
.claude/scripts/ and .claude/skills/ are covered by biome formatting.
Linting is disabled for .claude/** via override because the GritQL
plugins (no-try-catch, no-typeof-string-number) target the main CLI
codebase and cannot be scoped per-path — .claude/ hook scripts
legitimately use try/catch as they run standalone outside the package.

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(prompts): stop infinite shutdown loop after TeamDelete in non-interactive mode (#3116)

After TeamDelete completes in -p (non-interactive) mode, Claude Code's
harness was re-injecting shutdown prompts every turn. The root cause:
the Monitor Loop instructed the agent to call TaskList + Bash on EVERY
iteration, including after TeamDelete, which kept the session alive so
the harness could inject more shutdown prompts.

Fix: add an explicit EXCEPTION to both refactor-team-prompt.md and
refactor-issue-prompt.md instructing the team lead that after TeamDelete
is called, the very next response MUST be plain text only with no tool
calls. A text-only response is the termination signal for the
non-interactive harness.

Fixes #3103

Agent: issue-fixer

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(zeroclaw): remove broken zeroclaw agent (repo 404) (#3107)

* fix(zeroclaw): remove broken zeroclaw agent (repo 404)

The zeroclaw-labs/zeroclaw GitHub repository returns 404 — all installs
fail. Remove zeroclaw entirely from the matrix: agent definition,
setup code, shell scripts, e2e tests, packer config, skill files,
and documentation.

Fixes #3102

Agent: code-health
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(zeroclaw): remove stale zeroclaw reference from discovery.md ARM agents list

Addresses security review on PR #3107 — the last remaining zeroclaw
reference in .claude/rules/discovery.md is now removed.

Agent: issue-fixer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(zeroclaw): remove remaining stale zeroclaw references from CI/packer

Remove zeroclaw from:
- .github/workflows/agent-tarballs.yml ARM build matrix
- .github/workflows/docker.yml agent matrix
- packer/digitalocean.pkr.hcl comment
- sh/e2e/e2e.sh comment

Addresses all 5 stale references flagged in security review of PR #3107.

Agent: issue-fixer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(cli): allow --headless and --dry-run to be used together (#3117)

Removes the mutual-exclusion validation that blocked combining these flags.
Both flags serve independent purposes: --dry-run previews what would happen,
--headless suppresses interactive prompts and emits structured output.
Combining them is valid for CI pipelines that want structured JSON previews.

Fixes #3114

Agent: issue-fixer

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(cli): allow --headless and --dry-run to be used together (#3118)

* test: remove redundant theatrical assertions (#3120)

Remove bare toHaveBeenCalled() checks that preceded stronger content
assertions, and strengthen the "shows manual install command" test to
verify the actual install script URL appears in output.

Affected files:
- cmd-update-cov: remove redundant consoleSpy.toHaveBeenCalled() (x2),
  strengthen "shows manual install command" to check install.sh content
- update-check: remove redundant consoleErrorSpy.toHaveBeenCalled() (x2)
  that were immediately followed by .mock.calls content assertions
- recursive-spawn: remove redundant logInfoSpy.toHaveBeenCalled() before
  content check
- cmd-interactive: remove redundant mockIntro/mockOutro.toHaveBeenCalled()
  before content checks

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: sync README tagline with manifest (9 agents/54 → 8 agents/48 combinations) (#3119)

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: L <6723574+louisgv@users.noreply.github.com>

* docs: remove stale ZeroClaw references after agent removal (#3122)

ZeroClaw was removed in #3107 (repo 404). Two doc references were left
behind:
- .claude/rules/agent-default-models.md: table row for ZeroClaw model config
- README.md: ZeroClaw listed in --fast skip-cloud-init agent examples

Agent: code-health

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(e2e): redirect DO max_parallel log_warn to stderr (#3110)

_digitalocean_max_parallel() called log_warn which writes colored output
to stdout, polluting the captured return value when invoked via
cloud_max=$(cloud_max_parallel). The downstream integer comparison
[ "${effective_parallel}" -gt "${cloud_max}" ] then fails with
'integer expression expected', silently leaving the droplet limit cap
unapplied. Fix: redirect log_warn output to stderr so only the numeric
value is captured.

Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: L <6723574+louisgv@users.noreply.github.com>

* refactor: remove stale ZeroClaw references from docs and code comments

---------

Signed-off-by: Ahmed Abushagur <ahmed@abushagur.com>
Co-authored-by: spawn-qa-bot <qa@openrouter.ai>
Co-authored-by: Ahmed Abushagur <ahmed@abushagur.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
2026-03-31 05:20:26 +00:00
.claude docs: remove stale ZeroClaw references after agent removal (#3122) 2026-03-31 10:11:11 +07:00
.githooks feat: Bun workspace monorepo — packages/cli + packages/shared (#1853) 2026-02-23 22:07:05 -08:00
.github fix(ci): remove stale paths from biome check, extend biome to .claude/ (#3123) 2026-03-31 11:29:27 +07:00
.husky ci: add commitlint and Husky for conventional commit validation (#2416) 2026-03-09 23:46:18 -07:00
assets fix(zeroclaw): remove broken zeroclaw agent (repo 404) (#3107) 2026-03-30 15:35:40 -07:00
fixtures fix: add unique spawn IDs to prevent history record corruption (#2235) 2026-03-05 23:27:03 -08:00
lint feat: recursive spawn (--beta recursive) (#2978) 2026-03-25 10:42:09 -07:00
packages refactor: remove stale ZeroClaw references from CLAUDE.md and agents.ts (#3096) 2026-03-31 05:20:26 +00:00
packer fix(zeroclaw): remove broken zeroclaw agent (repo 404) (#3107) 2026-03-30 15:35:40 -07:00
sh fix(e2e): redirect DO max_parallel log_warn to stderr (#3110) 2026-03-31 11:32:51 +07:00
skills fix(zeroclaw): remove broken zeroclaw agent (repo 404) (#3107) 2026-03-30 15:35:40 -07:00
.gitignore feat: Bun workspace monorepo — packages/cli + packages/shared (#1853) 2026-02-23 22:07:05 -08:00
.shellcheckrc ci: add shellcheck linting infrastructure 2026-02-08 01:08:34 +00:00
biome.json fix(ci): remove stale paths from biome check, extend biome to .claude/ (#3123) 2026-03-31 11:29:27 +07:00
bun.lock ci: add commitlint and Husky for conventional commit validation (#2416) 2026-03-09 23:46:18 -07:00
bunfig.toml feat: fix coverage threshold enforcement with correct bunfig syntax (#2818) 2026-03-20 02:21:40 -07:00
CLAUDE.md refactor: remove stale ZeroClaw references from CLAUDE.md and agents.ts (#3096) 2026-03-31 05:20:26 +00:00
commitlint.config.ts ci: add commitlint and Husky for conventional commit validation (#2416) 2026-03-09 23:46:18 -07:00
LICENSE Improve README with better intro, how-it-works, and dev guide (#51) 2026-02-08 18:16:46 +00:00
manifest.json fix(zeroclaw): remove broken zeroclaw agent (repo 404) (#3107) 2026-03-30 15:35:40 -07:00
package.json ci: add commitlint and Husky for conventional commit validation (#2416) 2026-03-09 23:46:18 -07:00
README.md docs: remove stale ZeroClaw references after agent removal (#3122) 2026-03-31 10:11:11 +07:00

Spawn

Launch any AI agent on any cloud with a single command. Coding agents, research agents, self-hosted AI tools — Spawn deploys them all. All models powered by OpenRouter. (ALPHA software, use at your own risk!)

8 agents. 6 clouds. 48 working combinations. Zero config.

Install

macOS / Linux — and Windows users inside a WSL2 terminal (Ubuntu, Debian, etc.):

curl -fsSL https://openrouter.ai/labs/spawn/cli/install.sh | bash

Windows PowerShell (outside WSL):

irm https://openrouter.ai/labs/spawn/cli/install.ps1 | iex

Usage

spawn                         # Interactive picker
spawn <agent> <cloud>         # Launch directly
spawn matrix                  # Show the full agent x cloud matrix

Examples

spawn                                    # Interactive picker
spawn claude sprite                      # Claude Code on Sprite
spawn codex hetzner                      # Codex CLI on Hetzner
spawn claude sprite --prompt "Fix bugs"  # Non-interactive with prompt
spawn codex sprite -p "Add tests"        # Short form
spawn claude                             # Show clouds available for Claude
spawn delete                             # Delete a running server
spawn delete -c hetzner                  # Delete a server on Hetzner

Commands

Command Description
spawn Interactive agent + cloud picker
spawn <agent> <cloud> Launch agent on cloud directly
spawn <agent> <cloud> --dry-run Preview without provisioning
spawn <agent> <cloud> --zone <zone> Set zone/region for the cloud
spawn <agent> <cloud> --size <type> Set instance size/type for the cloud
spawn <agent> <cloud> --prompt "text" Non-interactive with prompt (or -p)
spawn <agent> <cloud> --prompt-file <file> Prompt from file (or -f)
spawn <agent> <cloud> --headless Provision and exit (no interactive session)
spawn <agent> <cloud> --output json Headless mode with structured JSON on stdout
spawn <agent> <cloud> --model <id> Set the model ID (overrides agent default)
spawn <agent> <cloud> --config <file> Load options from a JSON config file
spawn <agent> <cloud> --steps <list> Comma-separated setup steps to enable
spawn <agent> <cloud> --custom Show interactive size/region pickers
spawn <agent> Show available clouds for an agent
spawn <cloud> Show available agents for a cloud
spawn matrix Full agent x cloud matrix
spawn list Browse and rerun previous spawns
spawn list <filter> Filter history by agent or cloud name
spawn list -a <agent> Filter history by agent
spawn list -c <cloud> Filter history by cloud
spawn list --flat Show flat list (disable tree view)
spawn list --json Output history as JSON
spawn list --clear Clear all spawn history
spawn tree Show recursive spawn tree (parent/child relationships)
spawn tree --json Output spawn tree as JSON
spawn history export Dump history as JSON to stdout (used by parent VMs)
spawn fix Re-run agent setup on an existing VM (re-inject credentials, reinstall)
spawn fix <spawn-id> Fix a specific spawn by name or ID
spawn link <ip> Register an existing VM by IP
spawn link <ip> --agent <agent> Specify the agent running on the VM
spawn link <ip> --cloud <cloud> Specify the cloud provider
spawn last Instantly rerun the most recent spawn
spawn agents List all agents with descriptions
spawn clouds List all cloud providers
spawn feedback "message" Send feedback to the Spawn team
spawn uninstall Uninstall spawn CLI and optionally remove data
spawn update Check for CLI updates
spawn delete Interactively select and destroy a cloud server
spawn delete -a <agent> Filter servers to delete by agent
spawn delete -c <cloud> Filter servers to delete by cloud
spawn delete --name <name> --yes Headless delete by name (no prompts)
spawn status Show live state of cloud servers
spawn status -a <agent> Filter status by agent
spawn status -c <cloud> Filter status by cloud
spawn status --prune Remove gone servers from history
spawn help Show help message
spawn version Show version

Config File

The --config flag loads options from a JSON file. CLI flags override config values.

{
  "model": "openai/gpt-5.3-codex",
  "steps": ["github", "browser", "telegram"],
  "name": "my-dev-box",
  "setup": {
    "telegram_bot_token": "123456:ABC-DEF...",
    "github_token": "ghp_xxxx"
  }
}
spawn codex gcp --config setup.json --headless --output json

Setup Steps

Control which optional setup steps run with --steps:

spawn openclaw gcp --steps github,browser     # Only GitHub + Chrome
spawn claude gcp --steps ""                    # Skip all optional steps

Available steps vary by agent:

Step Agents Description
github All GitHub CLI + git identity
reuse-api-key All Reuse saved OpenRouter key
browser openclaw Chrome browser (~400 MB)
telegram openclaw Telegram bot (set TELEGRAM_BOT_TOKEN for non-interactive)
whatsapp openclaw WhatsApp linking (interactive QR scan, skipped in headless)

Fast Mode

Use --fast for significantly faster deploys. Enables all speed optimizations:

spawn claude hetzner --fast

What --fast does:

  • Parallel boot: server creation runs concurrently with API key prompt and account checks
  • Tarballs: installs agents from pre-built tarballs instead of live install
  • Skip cloud-init: for lightweight agents (Claude, OpenCode, Hermes), skips the package install wait since the base OS already has what's needed
  • Snapshots: uses pre-built cloud images when available (Hetzner, DigitalOcean)

Beta Features

Individual optimizations can be enabled separately with --beta <feature>. The flag is repeatable:

spawn claude gcp --beta tarball --beta parallel
Feature Description
tarball Use pre-built tarball for agent install (faster, skips live install)
images Use pre-built cloud images/snapshots (faster boot)
parallel Parallelize server boot with setup prompts
recursive Install spawn CLI on VM so it can spawn child VMs

--fast enables tarball, images, and parallel (not recursive).

Recursive Spawn

Use --beta recursive to let spawned VMs create their own child VMs:

spawn claude hetzner --beta recursive

What this does:

  • Installs spawn CLI on the remote VM
  • Delegates credentials (cloud + OpenRouter) so child VMs can authenticate
  • Injects parent tracking (SPAWN_PARENT_ID, SPAWN_DEPTH) into the VM environment
  • Passes --beta recursive to children so they can also spawn recursively

View the spawn tree:

spawn tree
# spawn-abc  Claude Code / Hetzner  2m ago
#   ├─ spawn-def  Codex CLI / Hetzner  1m ago
#   └─ spawn-ghi  OpenClaw / Hetzner  30s ago
#       └─ spawn-jkl  Claude Code / Hetzner  10s ago

Tear down an entire tree:

spawn delete --cascade <id>    # Delete a VM and all its children

Without the CLI

Every combination works as a one-liner — no install required:

bash <(curl -fsSL https://openrouter.ai/labs/spawn/{cloud}/{agent}.sh)

Non-Interactive Mode

Skip prompts by providing environment variables:

# OpenRouter API key (required for all agents)
export OPENROUTER_API_KEY=sk-or-v1-xxxxx

# Cloud-specific credentials (varies by provider)
# Note: Sprite uses `sprite login` for authentication
export HCLOUD_TOKEN=...           # For Hetzner
export DIGITALOCEAN_ACCESS_TOKEN=...  # For DigitalOcean

# Run non-interactively
spawn claude hetzner

You can also use inline environment variables:

OPENROUTER_API_KEY=sk-or-v1-xxxxx spawn claude sprite

Get your OpenRouter API key at: https://openrouter.ai/settings/keys

For cloud-specific auth, see each cloud's README in this repository.

Troubleshooting

Installation issues

If spawn fails to install, try these steps:

  1. Check bun version: spawn requires bun >= 1.2.0

    bun --version
    bun upgrade  # if needed
    
  2. Manual installation: If auto-install fails, install bun first

    curl -fsSL https://bun.sh/install | bash
    source ~/.bashrc  # or ~/.zshrc for zsh
    curl -fsSL https://openrouter.ai/labs/spawn/cli/install.sh | bash
    
  3. PATH issues: If spawn command not found after install

    # Add to your shell config (~/.bashrc or ~/.zshrc)
    export PATH="$HOME/.local/bin:$PATH"
    

Windows (PowerShell)

  1. Use the PowerShell installer — not the bash one:

    irm https://openrouter.ai/labs/spawn/cli/install.ps1 | iex
    

    The .ps1 extension is required. The default install.sh is bash and won't work in PowerShell.

  2. Set credentials via environment variables before launching:

    $env:OPENROUTER_API_KEY = "sk-or-v1-xxxxx"
    $env:DIGITALOCEAN_ACCESS_TOKEN = "dop_v1_xxxxx"  # For DigitalOcean
    $env:HCLOUD_TOKEN = "xxxxx"              # For Hetzner
    spawn openclaw digitalocean
    
  3. Local build failures during auto-update are normal on Windows — the CLI falls back to a pre-built binary automatically. You may see a brief build error followed by a successful update.

  4. EISDIR or EEXIST errors on config files: If you see errors about digitalocean.json being a directory, delete it:

    Remove-Item -Recurse -Force "$HOME\.config\spawn\digitalocean.json" -ErrorAction SilentlyContinue
    spawn openclaw digitalocean
    

Headless JSON mode — agent exits immediately

When using --headless --output json with Claude Code, you must also pass --prompt (or -p). Without it, Claude exits with Input must be provided through stdin or --prompt and the JSON output will show "status":"error":

# WRONG — Claude exits immediately
spawn claude gcp --headless --output json

# RIGHT — provide a prompt
spawn claude gcp --headless --output json --prompt "Fix all linter errors"

Note: auto-update messages may appear before the JSON on older CLI versions. Run spawn update to get the fix.

Agent launch failures

If an agent fails to install or launch on a cloud:

  1. Check credentials: Ensure cloud provider credentials are set

    # Example for Hetzner
    export HCLOUD_TOKEN=your-token-here
    spawn claude hetzner
    
  2. Try a different cloud: Some clouds may have temporary issues

    spawn <agent>  # Interactive picker to choose another cloud
    
  3. Use --dry-run: Preview what spawn will do before provisioning

    spawn claude hetzner --dry-run
    
  4. Check cloud status: Visit your cloud provider's status page

    • Many failures are transient (network timeouts, package mirror issues)
    • Retrying often succeeds

Getting help

  • View command history: spawn list shows all previous launches
  • Rerun last session: spawn last or spawn rerun
  • Check version: spawn version shows CLI version and cache status
  • Update spawn: spawn update checks for the latest version
  • Report bugs: Open an issue at https://github.com/OpenRouterTeam/spawn/issues

Matrix

Local Machine Hetzner Cloud AWS Lightsail DigitalOcean GCP Compute Engine Sprite
Claude Code
OpenClaw
Codex CLI
OpenCode
Kilo Code
Hermes Agent
Junie
Cursor CLI

How it works

Each cell in the matrix is a self-contained bash script that:

  1. Provisions a server on the cloud provider
  2. Installs the agent
  3. Injects your OpenRouter API key so every agent uses the same billing
  4. Drops you into an interactive session

Scripts work standalone (bash <(curl ...)) or through the CLI.

Development

git clone https://github.com/OpenRouterTeam/spawn.git
cd spawn
git config core.hooksPath .githooks

Structure

sh/{cloud}/{agent}.sh     # Agent deployment script (thin bash → bun wrapper)
packages/cli/             # TypeScript CLI — all provisioning logic (bun)
manifest.json             # Source of truth for the matrix

Adding a new cloud

  1. Add cloud-specific TypeScript module in packages/cli/src/{cloud}/
  2. Add to manifest.json
  3. Implement agent scripts
  4. See CLAUDE.md for full contributor guide

Adding a new agent

  1. Add to manifest.json
  2. Implement on 1+ cloud by adapting an existing agent script
  3. Must support OpenRouter via env var injection

Contributing

The easiest way to contribute is by testing and reporting issues. You don't need to write code.

Test a cloud provider

Pick any agent + cloud combination from the matrix and try it out:

spawn claude hetzner      # or any combination

If something breaks, hangs, or behaves unexpectedly, open an issue using the bug report template. Include:

  • The exact command you ran
  • The cloud provider and agent
  • What happened vs. what you expected
  • Any error output

Request a cloud or agent

Want to see a specific cloud provider or agent supported? Use the dedicated templates:

Requests with real-world use cases get prioritized.

Report auth or credential issues

Cloud provider APIs change frequently. If you hit authentication failures, expired tokens, or permission errors on a provider that previously worked, please report it — these are high-priority fixes.

Code contributions

See CLAUDE.md for the full contributor guide covering shell script rules, testing, and the shared library pattern.

License

Apache 2.0