mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-02 05:40:17 +00:00
Created inject_env_vars_local() function in shared/common.sh to eliminate
duplicate temporary file creation pattern. Converted 10 Modal scripts:
- aider, claude, amazonq, cline, codex
- gemini, goose, interpreter, nanoclaw, openclaw
Reduces ~10-15 lines per script to 3-4 lines.
Pattern before:
ENV_TEMP=$(mktemp)
trap 'rm -f "${ENV_TEMP}"' EXIT
cat > "${ENV_TEMP}" << EOF
# [spawn:env]
export KEY=value
EOF
upload_file "${ENV_TEMP}" "/tmp/env_config"
run_server "cat /tmp/env_config >> ~/.zshrc && rm /tmp/env_config"
Pattern after:
inject_env_vars_local upload_file run_server \
"KEY=value"
Special case: nanoclaw.sh has additional DOTENV_TEMP for agent-specific
.env file, which remains unchanged.
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 | ||
| gptme.sh | ||
| interpreter.sh | ||
| nanoclaw.sh | ||
| openclaw.sh | ||
| README.md | ||
Modal
Modal sandboxed containers via Python SDK. Modal
No SSH — uses Modal Python SDK for exec. Sub-second cold starts. Requires pip install modal.
Agents
Claude Code
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/claude.sh)
OpenClaw
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/openclaw.sh)
NanoClaw
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/nanoclaw.sh)
Aider
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/aider.sh)
Goose
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/goose.sh)
Codex CLI
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/codex.sh)
Open Interpreter
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/interpreter.sh)
Gemini CLI
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/gemini.sh)
Amazon Q CLI
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/amazonq.sh)
Cline
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/cline.sh)
Non-Interactive Mode
MODAL_SANDBOX_NAME=dev-mk1 \
OPENROUTER_API_KEY=sk-or-v1-xxxxx \
bash <(curl -fsSL https://openrouter.ai/lab/spawn/modal/claude.sh)