Quick Setup
The simplest way to authenticate:Authentication Flow
1. Authenticate with Fly.io
If you’re already logged intoflyctl, the Sprites CLI can use your existing session:
2. Select an Organization
If you belong to multiple Fly.io organizations, select one:Token Management
You can also create and manage tokens at sprites.dev/account.Viewing Your Token
Your Sprites API token is stored securely. To view it:Token Storage
By default, tokens are stored in your system keyring for security. You can switch to file-based storage:Config File Structure
When using file-based storage,~/.sprites/sprites.json contains:
Multiple Organizations
Adding Organizations
Add tokens for multiple organizations:Switching Organizations
Per-Directory Organization
Use different organizations in different directories:.sprite file.
Logging Out
Remove a Single Organization
Remove All Credentials
CI/CD Authentication
For CI/CD or automated environments, usesprite auth setup --token to configure authentication:
GitHub Actions Example
Environment Variables
After authentication is configured, you can use environment variables to override settings:Troubleshooting
”Not authenticated” Error
Token Not Found
If the CLI can’t find your token:Browser Doesn’t Open
If the authentication browser doesn’t open automatically:- Look for the URL printed in the terminal
- Copy and paste it into your browser
- Complete authentication
- Return to the terminal
Permission Errors
If you get permission errors after authentication:- Verify your Fly.io account has access to the organization
- Check that your
flyctlsession is valid:fly apps list - Try re-authenticating:
sprite org auth
Security Best Practices
- Use keyring storage (default) for interactive use
- Use
sprite auth setup --tokenfor CI/CD pipelines with tokens stored as secrets - Never commit
.sprites/or.spritefiles to version control - Rotate tokens periodically by re-authenticating
- Use organization-specific tokens rather than personal tokens in shared environments
Next Steps
Commands Reference
Full CLI documentation and command examples
Quickstart
Create your first Sprite in minutes