spawn/fly
L fe2c0b024b
fix: prevent premature exit when Fly.io CLI session access_token is null (#1551)
The polling loop in _try_fly_browser_auth() was returning immediately
on the first poll (t=2s) because:

  access_token=$(... "d.get('access_token','')")

When the JSON has "access_token": null (before the user completes
browser auth), Python's print(None) outputs the string "None".
Bash $() captures "None" as non-empty, passes [[ -n "$access_token" ]],
and returns it as the token — before the user even sees the browser.

Then _validate_fly_token(FLY_API_TOKEN="None") sends:
  Authorization: Bearer None
which Fly.io rejects with:
  verify: invalid token: no tokens found in header

Fix:
  d.get('access_token') or ''   →  None or '' = ''  (empty, keeps polling)
  + explicit != "None" guard for belt-and-suspenders

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 21:37:34 -08:00
..
lib fix: prevent premature exit when Fly.io CLI session access_token is null (#1551) 2026-02-20 21:37:34 -08:00
claude.sh fix: use ~/.spawnrc for env vars instead of inlining into .bashrc (#1362) 2026-02-16 17:05:17 -08:00
codex.sh fix: source .spawnrc directly in agent launch commands for reliable env loading (#1546) 2026-02-20 23:37:03 -05:00
kilocode.sh fix: source .spawnrc directly in agent launch commands for reliable env loading (#1546) 2026-02-20 23:37:03 -05:00
openclaw.sh fix: source .spawnrc directly in agent launch commands for reliable env loading (#1546) 2026-02-20 23:37:03 -05:00
opencode.sh fix: source .spawnrc directly in agent launch commands for reliable env loading (#1546) 2026-02-20 23:37:03 -05:00
README.md fix: sync cloud READMEs with current agent list (#1486) 2026-02-19 17:47:57 -05:00
zeroclaw.sh feat: reorder agents and remove NanoClaw (#1477) 2026-02-19 11:39:03 -08:00

Fly.io

Fly.io Machines via REST API and flyctl CLI. Fly.io

Agents

Claude Code

bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/claude.sh)

OpenClaw

bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/openclaw.sh)

ZeroClaw

bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/zeroclaw.sh)

Codex CLI

bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/codex.sh)

OpenCode

bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/opencode.sh)

Kilo Code

bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/kilocode.sh)

Non-Interactive Mode

FLY_APP_NAME=dev-mk1 \
FLY_API_TOKEN=your-token \
OPENROUTER_API_KEY=sk-or-v1-xxxxx \
  bash <(curl -fsSL https://openrouter.ai/labs/spawn/fly/claude.sh)

Environment Variables

Variable Description Default
FLY_API_TOKEN Fly.io API token (prompted or from flyctl auth)
FLY_APP_NAME App name (prompted)
FLY_REGION Deployment region iad
FLY_VM_SIZE VM size shared-cpu-1x
FLY_VM_MEMORY VM memory (MB) 1024
FLY_ORG Organization slug personal
OPENROUTER_API_KEY OpenRouter API key (OAuth or prompted)