mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-22 03:14:57 +00:00
The scripts were failing when run via curl | bash because they tried to read from /dev/tty which doesn't exist in piped contexts. ## Changes - Added safe_read() helper function that gracefully handles TTY absence - Updated get_sprite_name() to support SPRITE_NAME env variable - Updated all read commands to use safe_read() - Added clear error messages for non-interactive usage - Updated README with non-interactive mode documentation ## Usage Interactive: curl URL | bash Non-interactive: SPRITE_NAME=dev-mk1 curl URL | bash SPRITE_NAME=dev-mk1 OPENROUTER_API_KEY=sk-xxx curl URL | bash ## Fixes - /dev/tty: No such device or address error - Scripts now work in CI/CD and automated contexts - OAuth fallback still works via OPENROUTER_API_KEY env var Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| sprite | ||
| CHANGELOG.md | ||
| CURL_BASH_SOLUTION.md | ||
| EXAMPLES.md | ||
| OAUTH_FALLBACK.md | ||
| README.md | ||
| REFACTORING.md | ||
| test_oauth_fallback.sh | ||
Spawn
Conjure your agents!
Features
- 🔐 Automatic OAuth - Seamless authentication with OpenRouter
- 🔄 Smart Fallback - Manual API key entry if OAuth fails
- 🚀 One Command Setup - Get running in minutes
- 🔧 Environment Ready - Pre-configured shell and dependencies
Usage
Interactive Mode
Run the scripts and provide input when prompted:
# Claude Code
curl https://openrouter.ai/lab/spawn/sprite/claude.sh | bash
# OpenClaw
curl https://openrouter.ai/lab/spawn/sprite/openclaw.sh | bash
Non-Interactive Mode
For automation or CI/CD, set environment variables:
# Claude Code
SPRITE_NAME=dev-mk1 \
curl https://openrouter.ai/lab/spawn/sprite/claude.sh | bash
# OpenClaw (with optional API key)
SPRITE_NAME=dev-mk1 \
OPENROUTER_API_KEY=sk-or-v1-xxxxx \
curl https://openrouter.ai/lab/spawn/sprite/openclaw.sh | bash
Environment Variables:
SPRITE_NAME- Name for the sprite (required for non-interactive)OPENROUTER_API_KEY- Skip OAuth and use this API key (optional)