Skip to content

CLI Commands Reference

Complete reference for all sprite CLI commands.

sprite login - Authenticate with Fly.io

Terminal window
sprite login [flags] [api-url]

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -h, --help Show - this help message

Examples:

Terminal window
sprite login
sprite login -o my-org
sprite login https://custom-api.sprites.dev
Related Commands:
sprite auth --help Non-interactive token setup (CI/CD)
sprite org --help Manage organizations and tokens after login

sprite logout - Remove Sprites configuration

Terminal window
sprite logout [flags]

Options:

  • -h, --help Show - this help message

Examples:

Terminal window
sprite logout

sprite org auth - Add an API token

Terminal window
sprite org auth [-o <api>:<org>] [api-url|alias] Arguments: api-url|alias Optional API endpoint URL or alias (default: https://api.sprites.dev)

Aliases: sprite orgs, sprite organizations, sprite o

Options:

  • -o, --org <name> - Specify organization
  • -h, --help Show - this help message

Examples:

Terminal window
sprite org auth # Use default API
sprite org auth https://custom-api.sprites.dev # Custom API URL
sprite org auth prod # Use 'prod' alias
sprite org auth -o myorg # Specific organization
sprite org auth -o prod:my-org # Alias with org override
sprite org auth https://staging-api.sprites.dev -o staging:test-org

sprite org list - Show configured tokens

Terminal window
sprite org list [api-url|alias] Arguments: api-url|alias Optional filter by API endpoint URL or alias

Options:

  • -h, --help Show - this help message

sprite org logout - Remove all tokens

Terminal window
sprite org logout [flags]

Options:

  • --force Skip - confirmation prompt
  • -h, --help Show - this help message

sprite org keyring disable - Disable keyring usage

Terminal window
sprite org keyring disable

Options:

  • -h, --help Show - this help message

Examples:

Terminal window
sprite org keyring disable

sprite org keyring enable - Enable keyring usage

Terminal window
sprite org keyring enable

Options:

  • -h, --help Show - this help message

sprite auth setup - Set up authentication using a pre-generated token.

Terminal window
sprite auth setup --token <token>

Options:

  • --token <token> - Token in format: org-slug/org-id/token-id/token-value
  • -h, --help Show - this help message

Examples:

Terminal window
sprite auth setup --token "org-slug/org-id/token-id/token-value"

sprite create - Create a new sprite

Terminal window
sprite create [flags] [sprite-name]

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • --skip-console Exit - after creating instead of connecting to console
  • -h, --help Show - this help message

Creates a new sprite with the specified name. The sprite will be created in the selected organization. If sprite name is not provided, you will be prompted. Lifecycle:

  • Sprites pause when idle (no HTTP requests and no active sessions)
  • Services keep sprites alive and auto-restart on boot
  • Use checkpoints to save and restore filesystem state Related Commands: sprite list —help List your sprites sprite destroy —help Delete a sprite permanently sprite console —help Open an interactive shell

Examples:

Terminal window
sprite create my-sprite
sprite create -o myorg development-sprite
sprite create

sprite use - Activate a sprite for the current directory

Terminal window
sprite use [flags] [sprite-name]

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • --unset Remove - the .sprite file from current directory
  • -h, --help Show - this help message

Creates a .sprite file in the current directory to set the active sprite. This file will be used by other commands when no sprite is explicitly specified. Similar to ‘nvm use’ or ‘asdf local’ for version management. If no sprite name is provided, shows an interactive list to choose from.

Examples:

Terminal window
sprite use my-sprite
sprite use -o myorg dev-sprite
sprite use

sprite list - List all sprites

Terminal window
sprite list [flags]

Aliases: sprite ls

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -w, --watch Watch - for live updates
  • --prefix <prefix> - Filter sprites by name prefix
  • -h, --help Show - this help message

Lists all sprites in the selected organization. Use —prefix to filter sprites by name prefix.

Examples:

Terminal window
sprite list
sprite list -o myorg
sprite list --prefix dev

sprite destroy - Destroy a sprite

Terminal window
sprite destroy [flags] [sprite-name]

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • --force Skip - confirmation prompt
  • -h, --help Show - this help message

Examples:

Terminal window
sprite destroy mysprite
sprite destroy -o myorg mysprite
sprite destroy -s mysprite
sprite destroy --force mysprite # Skip confirmation
Related Commands:
sprite create --help Create a new sprite
sprite checkpoint --help Save state before destroying

sprite exec - Execute a command in the sprite environment

Terminal window
sprite exec [flags] <command> [args...]

Aliases: sprite x

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • --dir <path> - Working directory for command
  • --tty Allocate - pseudo-TTY
  • --env <vars> - Environment variables (KEY=value,KEY2=value2)
  • --http-post Use - HTTP/1.1 POST instead of WebSockets (non-TTY only)
  • --file <source:dest> - Upload file before exec (repeatable)
  • -h, --help Show - this help message

When using —tty, terminal environment variables (TERM, COLORTERM, LANG, LC_ALL) are automatically passed through from your local environment. Use ‘sprite sessions’ to list, attach to, or kill running sessions.

Examples:

Terminal window
sprite exec ls -la
sprite exec --dir /app echo hello world
sprite exec --env KEY=value,FOO=bar env
sprite exec --tty /bin/bash
sprite exec -o myorg -s mysprite npm start

sprite console - Open an interactive shell in the sprite environment

Terminal window
sprite console [flags]

Aliases: sprite c

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -h, --help Show - this help message

Opens an interactive shell with a TTY allocated. Uses shell environment variables to determine which shell to use. Supported shells: bash, zsh, fish, tcsh, ksh. Falls back to bash if shell detection fails. Detach with Ctrl+\ to leave the session running in the background. Related Commands: sprite exec —help Run a command without an interactive shell sprite attach —help Reconnect to a detached session sprite sessions —help List and manage running sessions

Examples:

Terminal window
sprite console
sprite console -o myorg -s mysprite

sprite checkpoint create - Create a new checkpoint

Terminal window
sprite checkpoint create [flags]

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • --comment <text> - Optional comment describing this checkpoint
  • -h, --help Show - this help message

sprite checkpoint list - List all checkpoints

Terminal window
sprite checkpoint list [flags]

Aliases: sprite checkpoint ls, sprite checkpoints ls

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • --history <version> - Filter by history version
  • --include-auto Include - auto-generated checkpoints
  • -h, --help Show - this help message

sprite checkpoint info - Show information about a specific checkpoint

Terminal window
sprite checkpoint info [flags] <version-id>

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -h, --help Show - this help message

Examples:

Terminal window
sprite checkpoint info v2 # Show details for checkpoint v2

sprite checkpoint delete - Delete a checkpoint

Terminal window
sprite checkpoint delete [flags] <version-id>

Aliases: sprite checkpoint rm

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -h, --help Show - this help message

Examples:

Terminal window
sprite checkpoint delete v3 # Delete checkpoint v3

sprite restore - Restore from a checkpoint version

Terminal window
sprite restore [flags] <version-id>

Aliases: sprite checkpoint restore

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -h, --help Show - this help message

Examples:

Terminal window
sprite restore v1
sprite restore -o myorg -s mysprite v2
# Safe restore workflow
sprite checkpoint create --comment "before rollback"
sprite restore v1
See also:
sprite checkpoint --help Full checkpoint documentation

sprite proxy - Forward local ports through the remote server proxy

Terminal window
sprite proxy [flags] <port1> [port2] ... or <local1:remote1> [local2:remote2] ...

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -W, --stdio <[host]:port> - Forward stdin and stdout to host:port on the Sprite
  • -h, --help Show - this help message

Each port will be forwarded from localhost to the remote environment. Use LOCAL:REMOTE syntax to map different local and remote ports. Multiple ports can be specified to forward multiple services simultaneously. Related Commands: sprite url —help Manage the sprite’s always-on HTTP URL

Examples:

Terminal window
sprite proxy 8080
sprite proxy 3000 8080
sprite proxy 4005:4000
sprite proxy 3001:3000 8081:8080
sprite proxy -W :22
sprite proxy -o myorg -s mysprite 8080

sprite url - Manage sprite URL settings

Terminal window
sprite url Show sprite URL and auth setting sprite url update [flags] Update URL authentication settings URL Format: https://<sprite-name>-<org>.sprites.dev/ Authentication Modes: sprite Allows access via browser to Sprite org members, and via org tokens (default) public No authentication - anyone with URL can access Subcommands: update Update URL authentication settings

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -h, --help Show - this help message
  • --auth <type> - Authentication type: ‘public’ or ‘sprite’

Examples:

Terminal window
sprite url # Show current URL and auth setting
sprite url update --auth public # Make URL publicly accessible
sprite url update --auth sprite # Require org membership (default)
sprite url -o myorg -s mysprite # Show URL for specific sprite
Accessing Authenticated URLs:
Visit the URL in your browser and log in with Fly.io, or use an org token:
curl -H "Authorization: Bearer $SPRITE_API_TOKEN" https://mysprite-myorg.sprites.dev/
Security Notes:
- Public URLs are accessible to anyone on the internet
- Never expose secrets, env vars, or sensitive data via HTTP
- Use 'public' only for demos, webhooks, or truly public services

sprite url update - Update URL authentication settings

Terminal window
sprite url update --auth <type> [flags] Authentication Types: sprite Require org membership to access (default) public No authentication - anyone with URL can access

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -a, --auth <type> - Authentication type: ‘public’ or ‘sprite’
  • -h, --help Show - this help message

Examples:

Terminal window
sprite url update --auth public # Make URL publicly accessible
sprite url update --auth sprite # Require org membership (default)
sprite url update --auth public -s demo # Make specific sprite public

sprite api - Make authenticated API calls with curl

Terminal window
sprite api [flags] <path> [curl options]

Options:

  • -o, --org <name> - Specify organization
  • -s, --sprite <name> - Specify sprite
  • -h, --help Show - this help message

This command wraps curl to automatically add authentication headers. If a sprite is specified with -s, the path is relative to /v1/sprites/<sprite-name>/. If no sprite is specified, the path is relative to /v1/. Paths starting with /v1/sprites/ are always used as-is, ignoring any sprite context. All arguments after the path are passed directly to curl.

Examples:

Terminal window
sprite api -o myorg /sprites
sprite api -o myorg -s my-sprite /upgrade -X POST
sprite api -o myorg -s my-sprite /exec -X GET
sprite api -o myorg -s my-sprite /checkpoints

sprite upgrade - Upgrade the sprite client to the latest version

Terminal window
sprite upgrade [flags]

Options:

  • --check Check - for updates without installing
  • --force Force - upgrade even if already up to date
  • --version <version> - Upgrade to a specific version
  • --channel <channel> - Release channel (release, rc, dev)
  • -h, --help Show - this help message

Examples:

Terminal window
sprite upgrade # Upgrade to the latest version
sprite upgrade --check # Check for available updates
sprite upgrade --force # Force upgrade even if up to date
sprite upgrade --channel dev # Switch to the dev channel
sprite upgrade --channel rc # Switch to the rc channel
CodeMeaning
0Success
1General error
2Command not found
126Command cannot execute
127Command not found (in sprite)
128+Command terminated by signal
VariableDescription
SPRITE_TOKENAPI token override (legacy; falls back if no stored token)
SPRITE_URLDirect sprite URL (for local/dev direct connections)
SPRITES_API_URLAPI URL override (default: https://api.sprites.dev)

~/.sprites/sprites.json (managed by the CLI; format may evolve):

{
"version": "1",
"current_selection": {
"url": "https://api.sprites.dev",
"org": "personal"
},
"urls": {
"https://api.sprites.dev": {
"url": "https://api.sprites.dev",
"orgs": {
"personal": {
"name": "personal",
"keyring_key": "sprites-cli:<user-id>",
"use_keyring": true,
"sprites": {}
}
}
}
}
}

.sprite (in project directory):

{
"organization": "personal",
"sprite": "my-project-sprite"
}
Installation

Install the Sprites CLI on your platform

Authentication

Set up your Fly.io account and manage tokens

Working with Sprites

Beyond the basics guide

Checkpoints

Save and restore sprite state