mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-08 10:09:30 +00:00
* refactor: replace python3 with bun+TS in fly/lib/common.sh, fix token validation
Three targeted fixes to the Fly.io library:
1. Replace all python3 with bun+TypeScript:
- _fly_json: stdin-piped field extractor via bun -e (no eval, no env var
size limits — handles arbitrarily large API responses)
- _fly_json_ids: dedicated machine ID extractor for destroy_server
- _fly_list_orgs: bun -e with flat dict + nodes/organizations support
- list_servers: bun -e formatted table output
Zero python3 invocations remain in the file.
2. Dual-endpoint _test_fly_token: tries Machines API first (deploy tokens),
falls back to api.fly.io/v1/user (OAuth/personal tokens). Prevents
rejecting valid personal tokens that lack Machines API access.
3. No more eval(): _fly_json uses direct property access (d[field]) instead
of python3 eval(expr), eliminating the code injection surface entirely.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: always prompt user for Fly.io org, never silently default
_fly_prompt_org now asks the user directly when the org list can't be
fetched, instead of silently falling back to "personal".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: lab <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| lib | ||
| claude.sh | ||
| codex.sh | ||
| kilocode.sh | ||
| openclaw.sh | ||
| opencode.sh | ||
| README.md | ||
| zeroclaw.sh | ||
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) |