CLI Installation
The Sprites CLI (sprite) is available for macOS, Linux, and Windows.
Quick Install (Recommended)
Section titled “Quick Install (Recommended)”The easiest way to install the CLI is with our install script:
curl -fsSL https://sprites.dev/install.sh | shThe install script automatically:
- Detects your operating system and architecture
- Downloads the latest release binary
- Verifies the SHA256 checksum
- Installs to
~/.local/bin
After installation, you may need to add ~/.local/bin to your PATH if it’s not already included. The script will provide instructions if needed.
Manual Installation
Section titled “Manual Installation”For specific versions or manual installation, download binaries from GitHub Releases.
macOS / Linux
Section titled “macOS / Linux”# Download and extract the appropriate binary for your platformtar xzf sprite-<platform>-<arch>.tar.gzsudo mv sprite /usr/local/bin/Windows
Section titled “Windows”# Download and extractExpand-Archive sprite-windows-amd64.zip -DestinationPath $env:USERPROFILE\bin
# Add to PATH (run in PowerShell as Administrator)[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:USERPROFILE\bin", "User")Verify Installation
Section titled “Verify Installation”sprite --helpYou should see the help output with available commands.
Upgrading
Section titled “Upgrading”If you installed from the direct download links, upgrade to the latest version:
sprite upgradeTo check for updates without installing:
sprite upgrade --checkConfiguration
Section titled “Configuration”The CLI stores configuration in ~/.sprites/sprites.json. This includes:
- Organization tokens
- Current organization selection
- Current sprite selection
Config File Location
Section titled “Config File Location”| Platform | Location |
|---|---|
| macOS/Linux | ~/.sprites/sprites.json |
| Windows | %USERPROFILE%\.sprites\sprites.json |
Note:
config.jsonis kept for backward compatibility with older clients, but current versions read/writesprites.json.
Optional: Local Directory Context
Section titled “Optional: Local Directory Context”The CLI supports a .sprite file in your project directory to remember which sprite to use:
# Set the sprite for current directorysprite use my-project-spriteThis creates a .sprite file that the CLI reads automatically. Add .sprite to your .gitignore as it’s user-specific.
Optional: Mount Helper Function
Section titled “Optional: Mount Helper Function”Add this function to your shell configuration (~/.zshrc or ~/.bashrc) to easily mount your Sprite’s filesystem locally:
sc() { local sprite_name="${1:-$(sprite use)}" local mount_point="/tmp/sprite-${sprite_name}" mkdir -p "$mount_point" sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 \ "sprite@${sprite_name}.sprites.dev:" "$mount_point" cd "$mount_point"}Usage:
sc my-sprite # Mount and cd to sprite's home directoryThis requires sshfs to be installed. On macOS, install with brew install macfuse sshfs. On Linux, use your package manager: apt install sshfs or yum install fuse-sshfs.
Troubleshooting
Section titled “Troubleshooting”Permission Denied
Section titled “Permission Denied”If you get a permission denied error on macOS or Linux:
chmod +x spritesudo mv sprite /usr/local/bin/Command Not Found
Section titled “Command Not Found”Ensure the binary is in your PATH:
# Check if sprite is in PATHwhich sprite
# If not, add /usr/local/bin to PATHexport PATH="/usr/local/bin:$PATH"macOS Security Warning
Section titled “macOS Security Warning”On macOS, you may see a security warning when first running the CLI. To allow it:
- Open System Preferences > Security & Privacy
- Click “Allow Anyway” next to the message about
sprite - Run
spriteagain and click “Open”
Or use the command line:
xattr -d com.apple.quarantine /usr/local/bin/spriteNext Steps
Section titled “Next Steps”- Authentication - Set up your Fly.io account
- Commands Reference - Full CLI documentation