spawn/lambda
L 6ac59e6bb3
Fix OAuth server for macOS bash 3.x (#24)
Three issues broke the OAuth callback server on macOS:

1. echo -e doesn't work in bash 3.x — \r\n appears as literal text
   in the HTTP response, browser gets malformed headers.
   Fix: pre-write response with printf to a file before the subshell.

2. local variables inside ( ... ) & subshell — undefined behavior in
   bash 3.x since subshells aren't function scope.
   Fix: use plain variables in subshells.

3. ((elapsed++)) when elapsed=0 evaluates to falsy — set -e kills
   the script on the first iteration of the timeout loop.
   Fix: use elapsed=$((elapsed + 1)) instead.

Also simplified nc_listen detection to only check for BusyBox
(the -p flag check could misfire on macOS nc).

Applied to all 10 lib/common.sh files.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 14:21:47 -08:00
..
lib Fix OAuth server for macOS bash 3.x (#24) 2026-02-07 14:21:47 -08:00
aider.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
amazonq.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
claude.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
cline.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
codex.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
gemini.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
goose.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
interpreter.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
nanoclaw.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
openclaw.sh Fix macOS bash compatibility: replace source <(curl) with eval (#23) 2026-02-07 14:13:56 -08:00
README.md Add E2B + Modal sandbox providers, restructure README (#22) 2026-02-07 14:11:04 -08:00

Lambda Cloud

Lambda GPU Cloud instances via REST API. Lambda Cloud

GPU cloud, uses 'ubuntu' user. Manual tool install (no cloud-init).

Agents

Claude Code

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

OpenClaw

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

NanoClaw

bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/nanoclaw.sh)

Aider

bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/aider.sh)

Goose

bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/goose.sh)

Codex CLI

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

Open Interpreter

bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/interpreter.sh)

Gemini CLI

bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/gemini.sh)

Amazon Q CLI

bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/amazonq.sh)

Cline

bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/cline.sh)

Non-Interactive Mode

LAMBDA_SERVER_NAME=dev-mk1 \
LAMBDA_API_KEY=your-key \
OPENROUTER_API_KEY=sk-or-v1-xxxxx \
  bash <(curl -fsSL https://openrouter.ai/lab/spawn/lambda/claude.sh)