mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-05 23:50:48 +00:00
Eliminates duplicate SSH key registration logic across 5 cloud providers (Hetzner, DigitalOcean, Vultr, Linode, Lambda) by introducing a generic callback-based pattern in shared/common.sh. Before: Each provider had ~45 lines of nearly identical code for: - Generating SSH keys if missing - Getting fingerprints - Checking if key exists with provider - Registering key if not exists - Error handling After: Providers implement 2 simple callbacks: - check_callback: provider-specific API call to check if key exists - register_callback: provider-specific API call to register key The shared function handles: - Key generation (via generate_ssh_key_if_missing) - Fingerprint extraction (via get_ssh_fingerprint) - Flow control and logging - Callback orchestration Changes: - shared/common.sh: Added ensure_ssh_key_with_provider() function - hetzner/lib/common.sh: Refactored to use callbacks - digitalocean/lib/common.sh: Refactored to use callbacks - vultr/lib/common.sh: Refactored to use callbacks - linode/lib/common.sh: Refactored to use callbacks - lambda/lib/common.sh: Refactored to use callbacks Benefits: - DRY: Eliminates ~220 lines of duplicate code - Maintainability: Bug fixes in registration flow benefit all providers - Consistency: All providers use identical registration logic - Extensibility: New providers can reuse this pattern Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| lib | ||
| aider.sh | ||
| amazonq.sh | ||
| claude.sh | ||
| cline.sh | ||
| codex.sh | ||
| gemini.sh | ||
| goose.sh | ||
| interpreter.sh | ||
| nanoclaw.sh | ||
| openclaw.sh | ||
| README.md | ||
Linode (Akamai)
Linode instances via REST API. Linode (Akamai)
Agents
Claude Code
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/claude.sh)
OpenClaw
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/openclaw.sh)
NanoClaw
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/nanoclaw.sh)
Aider
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/aider.sh)
Goose
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/goose.sh)
Codex CLI
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/codex.sh)
Open Interpreter
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/interpreter.sh)
Gemini CLI
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/gemini.sh)
Amazon Q CLI
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/amazonq.sh)
Cline
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/cline.sh)
Non-Interactive Mode
LINODE_SERVER_NAME=dev-mk1 \
LINODE_API_TOKEN=your-token \
OPENROUTER_API_KEY=sk-or-v1-xxxxx \
bash <(curl -fsSL https://openrouter.ai/lab/spawn/linode/claude.sh)