Find a file
Sprite 71246abc26 Fix source detection for process substitution (bash <(curl ...))
BASH_SOURCE[0] is /proc/self/fd/N with process substitution, not
"-" or "bash". Instead of guessing execution context, just check
if the local lib/common.sh file actually exists.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 05:03:02 +00:00
sprite Fix source detection for process substitution (bash <(curl ...)) 2026-02-07 05:03:02 +00:00
CHANGELOG.md Refactor spawn scripts with shared library and OAuth fallback 2026-02-07 04:06:11 +00:00
CURL_BASH_SOLUTION.md Refactor spawn scripts with shared library and OAuth fallback 2026-02-07 04:06:11 +00:00
EXAMPLES.md Refactor spawn scripts with shared library and OAuth fallback 2026-02-07 04:06:11 +00:00
INTERACTIVE_CURL.md Document interactive curl execution with process substitution 2026-02-07 04:59:26 +00:00
NON_INTERACTIVE_MODE.md Document interactive curl execution with process substitution 2026-02-07 04:59:26 +00:00
OAUTH_FALLBACK.md Refactor spawn scripts with shared library and OAuth fallback 2026-02-07 04:06:11 +00:00
README.md Document interactive curl execution with process substitution 2026-02-07 04:59:26 +00:00
REFACTORING.md Refactor spawn scripts with shared library and OAuth fallback 2026-02-07 04:06:11 +00:00
test_oauth_fallback.sh Refactor spawn scripts with shared library and OAuth fallback 2026-02-07 04:06:11 +00:00

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

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)