sc creates a ready-to-code Sprite environment in either repo mode or plain mode.
- Creates a new Sprite with a unique random name (repo/branch-tagged in repo mode)
- Installs OpenCode and ast-grep inside the Sprite
- Copies local auth/config files (
~/.local/share/opencode/auth.json,~/.config/opencode) - In repo mode: copies repository
.env, clones the current repo, and checks out (or creates) the target branch - In plain mode: skips all repository and git setup
- Opens a Sprite shell and launches
opencode
spriteCLI installed and authenticatedgitavailable locally (repo mode only)- Local files/directories present:
~/.local/share/opencode/auth.json~/.config/opencode<repo>/.env(repo mode only)
go run ./cmd/sc --branch <branch-name>
go run ./cmd/sc --plainTo install globally:
make installRun Opencode in an interactive Sprite session:
sprite exec -dir /home/sprite/code/alpine -tty bash -lc 'opencode run "/ralph-loop"'Examples:
go run ./cmd/sc --branch feat/my-change
go run ./cmd/sc --plainTo build a standalone binary:
go build -o sc ./cmd/sc
./sc --branch feat/my-change- The Bash script remains in the repository for reference during migration.
- The Go CLI uses
sprites-goAPIs for sprite lifecycle, command execution, and filesystem transfer. - Exit codes are now stable:
0success,1runtime failure,2usage,3preflight,4auth,5cleanup failure.
- Repo mode must run from inside the git repository you want to clone into Sprite.
- Use exactly one launch mode:
--branch <branch-name>or--plain. - In TTY mode, the CLI launches
opencodedirectly inside the sprite. - In non-TTY mode, the CLI prints
sprite_idand a reconnect command instead of attaching interactively.