Find a file
Sprite 10ada0e04d Fix non-interactive mode for curl | bash execution
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>
2026-02-07 04:48:48 +00:00
sprite Fix non-interactive mode for curl | bash execution 2026-02-07 04:48:48 +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
OAUTH_FALLBACK.md Refactor spawn scripts with shared library and OAuth fallback 2026-02-07 04:06:11 +00:00
README.md Fix non-interactive mode for curl | bash execution 2026-02-07 04:48:48 +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

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)