mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-08 18:39:50 +00:00
* feat: add spawn name prompt and project confirmation to GCP flow
Ask for spawn name upfront (before auth), derive kebab-case default for
VM naming, and confirm the current GCP project before using it.
New interaction order:
1. Spawn name: "My Dev Box" → kebab "my-dev-box" exported as
GCP_INSTANCE_NAME_KEBAB
2. gcloud auth + project confirm: "Current project: X Keep? [Y/n]"
If no → project picker shown
3. SSH key
4. Machine type picker (existing)
5. Zone picker (existing)
6. Instance name prompt: "Instance name [my-dev-box]: "
User can press Enter to accept or type a custom name
New functions:
_to_kebab_case() — lowercases, replaces non-alnum with hyphens
_gcp_prompt_spawn_name() — prompts for display name, exports kebab default;
honours SPAWN_NAME env var set by CLI (--name flag)
Modified:
_gcp_resolve_project() — adds Y/n confirmation when project already set
get_server_name() — shows kebab default in prompt, accepts Enter
cloud_authenticate() — calls _gcp_prompt_spawn_name first
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* feat: add spawn name prompt to all clouds via shared/common.sh
Move _to_kebab_case() and prompt_spawn_name() to shared/common.sh so all
clouds get upfront spawn name prompting and kebab-based resource naming.
shared/common.sh:
+ _to_kebab_case() — "My Dev Box" → "my-dev-box"
+ prompt_spawn_name() — asks for display name, exports SPAWN_NAME_DISPLAY
and SPAWN_NAME_KEBAB; skips if already set;
honours SPAWN_NAME env var from CLI --name flag
~ get_resource_name() — replaces silent SPAWN_NAME fallback with a visible
prefilled default: "Enter server name [my-dev-box]: "
Per-cloud changes (cloud_authenticate gains prompt_spawn_name first):
hetzner, fly, aws, daytona, digitalocean, sprite — one-line change each
gcp/lib/common.sh:
- Remove _to_kebab_case() (now in shared)
- Remove _gcp_prompt_spawn_name() (now in shared as prompt_spawn_name)
~ cloud_authenticate: _gcp_prompt_spawn_name → prompt_spawn_name
~ get_server_name: simplified back to get_validated_server_name
(shared get_resource_name now shows the kebab default in the prompt)
Result — every cloud shows this flow upfront:
Spawn name (e.g. "My Dev Box"): My Claude Box
ℹ Resource name: my-claude-box
...
Enter server name [my-claude-box]: ⏎
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* fix: use "Use project '...'?" instead of "Keep this project?" in GCP prompt
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 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) |