Commit graph

135 commits

Author SHA1 Message Date
Sprite
8f37ce3649 refactor: Automated improvements from cycle 1
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 06:02:07 +00:00
Sprite
580424189a Update README matrix: add Civo, Scaleway, Daytona clouds and OpenCode agent
The matrix table was missing 3 clouds (Civo, Scaleway, Daytona) and
1 agent (OpenCode) that are all fully implemented across the board.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:19:29 +00:00
Sprite
e3dcad797d Add Daytona cloud provider with all 12 agent scripts
Daytona is a sandbox platform (daytona.io) with sub-90ms creation and
true SSH support. Uses CLI-based approach similar to E2B: daytona create,
daytona exec, daytona ssh for interactive sessions.

- daytona/lib/common.sh: provider library with auth, create, exec, upload
  (base64-over-exec), interactive (daytona ssh), destroy
- 12 agent scripts: claude, openclaw, nanoclaw, aider, goose, codex,
  interpreter, gemini, amazonq, cline, gptme, opencode
- manifest.json: cloud entry + 12 matrix entries
- README: Daytona column added to matrix table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:18:38 +00:00
Sprite
392c9b3d66 Add homepage links to agent names in matrix table
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:13:37 +00:00
Sprite
76a944a619 Update tagline 2026-02-08 04:13:17 +00:00
Sprite
dc32466ae6 Replace agent/cloud lists with matrix table in README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 04:09:32 +00:00
Sprite
3562f9f75a Use openrouter.ai redirect for install URL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 04:07:50 +00:00
L
54330f8433
Simplify README: focus on CLI, drop per-cloud inline docs (#34)
530 lines → 97 lines. The README now documents:
- One-liner install
- CLI commands (spawn, spawn <agent> <cloud>, spawn list, etc.)
- Agent and cloud reference tables
- Link to per-cloud READMEs for detailed docs

Per-cloud details (env vars, non-interactive mode) live in each
cloud's own README.md file.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 20:05:24 -08:00
L
b6ee6b6ab1
Add guardrails: CLAUDE.md rules, hooks, pre-commit validation (#33)
* feat: add gptme agent to spawn matrix

Add gptme (https://github.com/gptme/gptme) - a personal AI agent in the
terminal with tools for code editing, terminal commands, web browsing,
and more. Natively supports OpenRouter via OPENROUTER_API_KEY.

- Add gptme agent entry to manifest.json with OpenRouter env vars
- Implement sprite/gptme.sh deployment script
- Implement hetzner/gptme.sh deployment script
- Add "missing" matrix entries for remaining 8 clouds
- Update README.md with usage instructions for Sprite and Hetzner

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add Fly.io cloud provider with claude and aider agents

Add Fly.io as a new cloud provider using the Machines REST API for
provisioning and flyctl CLI for SSH access. Docker-based machines
with pay-per-second pricing.

- Create fly/lib/common.sh with Fly.io Machines API integration
- Implement fly/claude.sh for Claude Code deployment
- Implement fly/aider.sh for Aider deployment
- Update README.md with Fly.io usage instructions and env vars

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add gemini, amazonq, cline, gptme to Fly.io

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add openclaw, nanoclaw, goose, codex, interpreter to Fly.io

Implements 5 new agent scripts for the Fly.io cloud provider:
- fly/openclaw.sh: OpenClaw with gateway + TUI, model selection, config
- fly/nanoclaw.sh: NanoClaw WhatsApp agent with .env configuration
- fly/goose.sh: Block's Goose agent with OpenRouter provider
- fly/codex.sh: OpenAI Codex CLI with OpenRouter base URL override
- fly/interpreter.sh: Open Interpreter with OpenRouter base URL override

All scripts follow the Fly.io pattern (flyctl-based, no IP args for
run_server/interactive_session) and use upload_file for env injection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add gptme agent to 8 remaining clouds

Implement gptme agent scripts for digitalocean, vultr, linode, lambda,
aws-lightsail, gcp, e2b, and modal. Each script follows the exact
pattern of that cloud's existing aider.sh, adapted for gptme's install
and launch commands. Updates manifest.json matrix entries from "missing"
to "implemented".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add guardrails from insights: CLAUDE.md rules, hooks, pre-commit

Based on usage insights analysis:

CLAUDE.md:
- Shell script rules: curl|bash compat, macOS bash 3.x compat
- Autonomous loop rules: test after each iteration, never revert fixes
- Git workflow rules: always use feature branches

.claude/settings.json:
- PostToolUse hook validates .sh files on every Write/Edit:
  syntax check, no relative source, no echo -e, no set -u

.githooks/pre-commit:
- Blocks commits with: syntax errors, relative sources, echo -e,
  set -euo, references to deleted functions
- Install: git config core.hooksPath .githooks

README.md:
- Added developer setup section with hook installation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 20:02:19 -08:00
Sprite
99e13e89ad ci: add shellcheck linting infrastructure
Added shellcheck to catch bash anti-patterns across 115 scripts:
- Created .shellcheckrc configuration
- Added GitHub Actions workflow (.github/workflows/lint.yml)
- Documented shellcheck usage in README

Currently found 3,598 warnings (expected for unlinted codebase).
Using || true temporarily to not block PRs - warnings will be fixed
incrementally in follow-up tasks.

Common issues: SC2250 (missing braces), SC2162 (read without -r),
SC2312 (command substitution masking), SC1091 (sourcing pattern).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 01:08:34 +00:00
L
3fb2e77b03
Autonomous refactoring: 5 rounds, ~1,400 lines eliminated, production-ready
Five rounds of autonomous AI agent team refactoring with security fixes, code consolidation, and expanded test coverage.
2026-02-08 00:06:46 +00:00
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
L
70399cb8a7
Add E2B + Modal sandbox providers, restructure README (#22)
New sandbox-type cloud providers (no SSH, SDK-driven exec):
- e2b/: E2B sandboxed containers via CLI (~150ms cold start)
- modal/: Modal sandboxed containers via Python SDK (sub-second cold start)

README restructure:
- Root README.md simplified to matrix table with launch links
- Per-cloud README.md files with detailed docs, env vars, non-interactive mode

Matrix now 10 agents x 10 clouds = 100/100 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 14:11:04 -08:00
L
85938a7b0d
Add GCP Compute Engine as eighth cloud provider with all 10 agents (#19)
GCP instances via gcloud CLI with startup-script for provisioning.
Uses current username for SSH (not root/ubuntu).
- gcp/lib/common.sh: gcloud wrapper, SSH key handling, instance lifecycle
- All 10 agents: claude, openclaw, nanoclaw, aider, goose, codex, interpreter, gemini, amazonq, cline

Matrix now 10 agents x 8 clouds = 80/80 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 12:06:37 -08:00
L
c3e83ea00a
Add Cline as tenth agent across all clouds (#18)
Cline is an open-source AI coding agent for the terminal.
Works with OpenRouter via OPENAI_BASE_URL override.

- Implemented on all 7 clouds
- Matrix now 10 agents x 7 clouds = 70/70 implemented

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 12:01:38 -08:00
L
74eb301d59
Add Amazon Q CLI as ninth agent across all clouds (#17)
AWS's AI coding assistant, works with OpenRouter via OPENAI_BASE_URL override.
Installed via official installer script, launched with `q chat`.

- Implemented on all 7 clouds
- Matrix now 9 agents x 7 clouds = 63/63 implemented

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 11:58:37 -08:00
L
02327d37f3
Add Lambda Cloud as seventh cloud provider with all 8 agents (#16)
Lambda GPU Cloud via REST API, uses 'ubuntu' user.
Manual tool install (no cloud-init support).
- lambda/lib/common.sh: API wrapper, SSH key management, instance lifecycle
- All 8 agents: claude, openclaw, nanoclaw, aider, goose, codex, interpreter, gemini

Matrix now 8 agents x 7 clouds = 56/56 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 11:55:42 -08:00
L
5fde5ebbdc
Add Gemini CLI (Google) as eighth agent across all clouds (#15)
Google's open-source coding agent, works with OpenRouter via
OPENAI_BASE_URL override and GEMINI_API_KEY env var.

- Implemented on all 6 clouds: sprite, hetzner, digitalocean, vultr, linode, aws-lightsail
- Matrix now 8 agents x 6 clouds = 48/48 implemented

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 11:50:40 -08:00
L
f7a97a24e6
Add AWS Lightsail as sixth cloud provider with all 7 agents (#14)
AWS Lightsail via AWS CLI, uses 'ubuntu' user and userdata for cloud-init.
- aws-lightsail/lib/common.sh: AWS CLI wrapper, SSH key import, instance lifecycle
- All 7 agents: claude, openclaw, nanoclaw, aider, goose, codex, interpreter

Matrix now 7 agents x 6 clouds = 42/42 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 11:48:13 -08:00
L
4f4d87c234
Add Open Interpreter as seventh agent across all clouds (#13)
Open Interpreter provides a natural language interface for computer control.
Works with OpenRouter via OPENAI_BASE_URL=https://openrouter.ai/api/v1.

- Implemented on all 5 clouds: sprite, hetzner, digitalocean, vultr, linode
- Matrix now 7 agents x 5 clouds = 35/35 implemented

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 09:30:27 -08:00
L
e781506604
Add Linode (Akamai) as fifth cloud provider with all 6 agents (#12)
Linode instances via REST API v4, with cloud-init via metadata.user_data.
- linode/lib/common.sh: API wrapper, token management, instance lifecycle
- All 6 agents: claude, openclaw, nanoclaw, aider, goose, codex

Matrix now 6 agents x 5 clouds = 30/30 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 09:26:31 -08:00
L
5a2f82cdbe
Add Codex CLI (OpenAI) as sixth agent across all clouds (#11)
OpenAI's open-source coding agent, works with OpenRouter via
OPENAI_BASE_URL=https://openrouter.ai/api/v1 override.

- sprite/codex.sh, hetzner/codex.sh, digitalocean/codex.sh, vultr/codex.sh
- Matrix now 6 agents x 4 clouds = 24/24 implemented

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 09:21:23 -08:00
L
38167283d2
Add Vultr as fourth cloud provider with all 5 agents (#10)
Vultr Cloud Compute via REST API (v2), with cloud-init + SSH provisioning.
- vultr/lib/common.sh: API wrapper, token management, instance lifecycle
- vultr/claude.sh, openclaw.sh, nanoclaw.sh, aider.sh, goose.sh

Matrix now 5 agents x 4 clouds = 20/20 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 09:02:53 -08:00
L
7de02db81b
Add Goose agent (Block) across all clouds (#9)
Goose is Block's open-source model-agnostic AI coding agent.
Supports OpenRouter via GOOSE_PROVIDER=openrouter env var.

- sprite/goose.sh, hetzner/goose.sh, digitalocean/goose.sh
- Matrix now 5 agents x 3 clouds = 15/15 implemented

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 08:58:51 -08:00
L
ff531d00b8
Add Aider as fourth agent across all clouds (#8)
Aider is the most popular open-source AI pair programming CLI.
Natively supports OpenRouter via OPENROUTER_API_KEY env var
and --model openrouter/... flag.

- sprite/aider.sh, hetzner/aider.sh, digitalocean/aider.sh
- Matrix now 4 agents x 3 clouds = 12/12 implemented

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 08:56:07 -08:00
L
2b129ecaaa
Add DigitalOcean as third cloud provider (#7)
New cloud provider with full agent coverage:
- digitalocean/lib/common.sh: DO API wrapper, token management, droplet lifecycle
- digitalocean/claude.sh, openclaw.sh, nanoclaw.sh: all 3 agents

Matrix is now 3 agents x 3 clouds = 9/9 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 08:53:16 -08:00
L
78e009176b
Add OpenClaw and NanoClaw scripts for Hetzner Cloud (#6)
Fills the remaining 2 gaps in the agents x clouds matrix:
- hetzner/openclaw.sh: provisions Hetzner server with OpenClaw gateway + TUI
- hetzner/nanoclaw.sh: provisions Hetzner server with NanoClaw WhatsApp agent

Matrix is now 100% complete (3 agents x 2 clouds = 6/6 implemented).

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 08:49:11 -08:00
L
bd30565d86
Add Hetzner Cloud spawn system for provisioning servers via REST API (#4)
Parallel to the existing sprite/ directory, adds hetzner/ scripts that
provision Hetzner Cloud servers with Claude Code + OpenRouter using
curl-based API calls (no hcloud CLI dependency).

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 07:25:03 -08:00
L
f43c52eb61
Add NanoClaw spawn script (#2)
* Add NanoClaw spawn script

NanoClaw is a lightweight WhatsApp-based Claude AI assistant that runs
agents in isolated containers. This script sets up a sprite with
nanoclaw pre-configured: clones the repo, installs dependencies,
configures the API key, and launches in dev mode for WhatsApp QR auth.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix verify_sprite_connectivity exiting script early after single failed check

Retry connectivity up to 6 attempts (30s) instead of trying once and
silently continuing, which caused the next sprite exec to fail under set -e.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add test harness for spawn scripts

Mocks the sprite CLI and runs each script end-to-end verifying:
- common.sh sources correctly and all functions resolve
- Log functions write to stderr (not stdout)
- Env var flow (SPRITE_NAME, OPENROUTER_API_KEY)
- Sprite commands called in correct order
- Temp files created and cleaned up
- Each script reaches its final interactive launch

Usage: bash test/run.sh

42 tests, all passing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-06 21:23:18 -08:00
Sprite
ce95cef78e Clean up README with consistent curl flags and split agent examples
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 05:08:41 +00:00
Sprite
7ff684ca1e Document interactive curl execution with process substitution
## 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>
2026-02-07 04:59:26 +00:00
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
640af6260c Refactor spawn scripts with shared library and OAuth fallback
Major refactoring to improve code maintainability and reliability:

## Shared Library Architecture
- Created sprite/lib/common.sh with reusable bash functions
- Reduced openclaw.sh from 258 to 93 lines (-64%)
- Reduced claude.sh from 272 to 101 lines (-63%)
- Eliminated ~330 lines of duplicate code

## OAuth Fallback Mechanism
- Added automatic fallback to manual API key entry
- Handles missing netcat (nc) gracefully
- Handles port conflicts and timeouts
- Validates API key format with override option
- Works in headless and minimal environments

## Dual Execution Support
- Local: bash sprite/openclaw.sh
- Remote: curl URL | bash
- Auto-detects context and sources library appropriately

## New Shared Functions
- Logging: log_info(), log_warn(), log_error()
- Sprite setup: ensure_sprite_installed/authenticated/exists()
- Environment: setup_shell_environment()
- OAuth: get_openrouter_api_key_oauth() with fallback
- Utilities: run_sprite(), verify_sprite_connectivity()

## Documentation
- REFACTORING.md - Architecture and benefits
- OAUTH_FALLBACK.md - Fallback mechanism guide
- CURL_BASH_SOLUTION.md - Execution mode details
- EXAMPLES.md - Usage scenarios
- CHANGELOG.md - Complete change history

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 04:06:11 +00:00
lab
57bf0ca2fc
Sprite setup scripts for Claude Code and OpenClaw
- OAuth authentication flow with OpenRouter to mint API keys
- Automatic sprite creation and environment configuration
- Claude Code setup with bypassed onboarding and dark theme
- OpenClaw setup with gateway and TUI launch
- Shell environment setup (bun PATH, zsh switch)
2026-02-05 13:25:30 -06:00
lab
3eaf6321a1
Initial commit: OpenClaw sprite setup script 2026-02-02 15:08:15 -06:00