Skip to content

Sandbox containers (Sprites)

Run commands remotely

Terminal window
sprite exec echo hello # run a command on the sprite
sprite x echo hello # shorthand
sprite console # interactive shell
sprite c # shorthand
sprite help

Piping & redirection gotcha

>, >>, < are parsed by your local shell before sprite exec runs.

Terminal window
# WRONG: writes to local hello.txt
sprite exec echo 42 >> hello.txt
# RIGHT: wrap in bash -c so redirect happens remotely
sprite exec bash -c 'echo 42 >> hello.txt'
# BETTER: use pipe + tee, no quoting needed
echo 42 | sprite exec tee hello.txt > /dev/null
echo 42 | sprite exec tee -a hello.txt > /dev/null # append

Copy files to a sprite

Terminal window
cat local-file.txt | sprite exec tee /remote/path.txt > /dev/null

Copy credentials (Claude Code auth)

Terminal window
cat ~/.claude/.credentials.json | sprite exec tee ~/.claude/.credentials.json > /dev/null

Persistent sessions (tmux)

Terminal window
sprite exec tmux new -s claude # start a named session
# Ctrl+B, D to detach
sprite exec tmux attach -t claude # reattach later

GitHub auth (for push, PRs, issues)

Create a fine-grained PAT: https://github.com/settings/personal-access-tokens/new

Scope it to the repos you want the agent to access. Required permissions:

  • Contents: Read and write (clone, push)
  • Pull requests: Read and write (create/update PRs)
  • Issues: Read and write (optional, for reading/creating issues)
  • Metadata: Read (auto-selected)
  • Actions: Read (optional, for checking CI status)
Terminal window
sprite exec fish -c "set -Ux GITHUB_TOKEN <your-pat>"
sprite exec fish -c "gh auth login --with-token <<< \$GITHUB_TOKEN"

Debug output

Terminal window
sprite --debug exec cmd # debug to stdout (flows back to you)
sprite --debug=./debug.log exec cmd # debug to file on the sprite
sprite exec cmd 2>local.log # capture remote stderr locally