mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
## Problem The command `curl URL | bash` isn't interactive because curl's output consumes bash's stdin, preventing user prompts from working. ## Solution Use bash process substitution instead: `bash <(curl URL)` This keeps stdin available for the script while downloading from curl. ## Changes - Added INTERACTIVE_CURL.md - Complete guide to interactive execution - Added NON_INTERACTIVE_MODE.md - Guide to automation/CI usage - Updated README.md to recommend `bash <(curl ...)` format - Documented OpenRouter URL alias pattern ## Recommended Usage Interactive (best UX): bash <(curl -fsSL https://openrouter.ai/lab/spawn/sprite/claude.sh) Non-interactive (CI/CD): SPRITE_NAME=dev-mk1 curl URL | bash ## Why Process Substitution? - Stdin available for prompts ✅ - Works like normal bash script ✅ - No /dev/tty workarounds needed ✅ - Better user experience ✅ Both methods are supported for maximum compatibility. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
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 (Recommended)
Use process substitution for full interactivity:
# Claude Code - Prompts for sprite name and OAuth
bash <(curl -fsSL https://openrouter.ai/lab/spawn/sprite/claude.sh)
# OpenClaw - Prompts for sprite name, OAuth, and model selection
bash <(curl -fsSL https://openrouter.ai/lab/spawn/sprite/openclaw.sh)
Why bash <(curl ...) instead of curl | bash?
- Process substitution keeps stdin available for interactive prompts
- No special TTY handling required
- Works like a normal bash script
Alternative: Piping (Requires env vars)
If using the shorter curl | bash pattern (like the OpenRouter documentation shows), you must set environment variables:
# Claude Code - As shown on openrouter.ai/lab/spawn
SPRITE_NAME=dev-mk1 curl https://openrouter.ai/lab/spawn/sprite/claude.sh | bash
# OpenClaw
SPRITE_NAME=dev-mk1 curl https://openrouter.ai/lab/spawn/sprite/openclaw.sh | bash
Note: The OpenRouter URLs (openrouter.ai/lab/spawn/...) may redirect or proxy to this repository.
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)