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”Download the binary
curl -LO https://sprites-binaries.t3.storage.dev/client/v0.0.1-rc30/sprite-darwin-arm64.tar.gzVerify checksum (recommended)
curl -LO https://sprites-binaries.t3.storage.dev/client/v0.0.1-rc30/sprite-darwin-arm64.tar.gz.sha256shasum -a 256 -c sprite-darwin-arm64.tar.gz.sha256Extract and install
tar xzf sprite-darwin-arm64.tar.gzsudo mv sprite /usr/local/bin/For Intel Macs, replace "arm64" with "amd64" in the URLs above.
Download the binary
curl -LO https://sprites-binaries.t3.storage.dev/client/v0.0.1-rc30/sprite-linux-amd64.tar.gzVerify checksum (recommended)
curl -LO https://sprites-binaries.t3.storage.dev/client/v0.0.1-rc30/sprite-linux-amd64.tar.gz.sha256sha256sum -c sprite-linux-amd64.tar.gz.sha256Extract and install
tar xzf sprite-linux-amd64.tar.gzsudo mv sprite /usr/local/bin/For ARM64, replace "amd64" with "arm64" in the URLs above.
Download the binary
Invoke-WebRequest -Uri "https://sprites-binaries.t3.storage.dev/client/v0.0.1-rc30/sprite-windows-amd64.zip" -OutFile "sprite-windows-amd64.zip"Extract to your bin directory
Expand-Archive sprite-windows-amd64.zip -DestinationPath $env:USERPROFILE\binAdd to PATH (run as Administrator)
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:USERPROFILE\bin", "User")For ARM64 Windows, replace "amd64" with "arm64" in the URL above.
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/sprite