Prompt file imported from kevin-earl-denny/city-doodle (
.claude/commands/fly.md). Copyright stays with the author.
/fly - Fly.io Deployment Management
Manage Fly.io deployments, secrets, scaling, and monitoring.
Subcommands
deploy
Deploy to Fly.io.
/fly deploy # Deploy current app
/fly deploy --no-cache # Deploy without build cache
secrets
Manage application secrets.
/fly secrets list # List secret names
/fly secrets sync # Sync .env.local to Fly.io
/fly secrets set KEY=value # Set a secret
logs
View application logs.
/fly logs # Stream logs
/fly logs --no-tail # View recent logs
status
Check application status.
/fly status # App and machine status
ssh
SSH into running machine.
/fly ssh # Interactive shell
/fly ssh "command" # Run command
Instructions
When the user invokes /fly:
For deploy:
- Check if Fly CLI is installed and authenticated
- Check if
fly.tomlexists - Run deployment:
# Standard deploy
fly deploy
# Without cache
fly deploy --no-cache
- Report deployment status and URL
For secrets list:
- Run
fly secrets list - Display secret names (values are hidden by Fly.io)
For secrets sync:
- Check if
.env.localor.env.productionexists - Use the Fly secrets provider:
from lib.vibe.secrets.providers.fly import FlySecretsProvider
provider = FlySecretsProvider(app_name="app-name-from-fly-toml")
results = provider.sync_from_local(".env.local", "production")
provider.deploy() # Deploy the staged secrets
- Report success/failure for each secret
For secrets set:
- Parse KEY=value from arguments
- Run
fly secrets set KEY=value - Report success
For logs:
# Stream logs
fly logs
# Recent logs only
fly logs --no-tail
For status:
- Run
fly statusfor app overview - Run
fly machine listfor machine details - Report app URL, machine status, regions
For ssh:
# Interactive
fly ssh console
# Command
fly ssh console -C "command"
Example Session
User: /fly deploy
Claude: I'll deploy to Fly.io.
Checking prerequisites...
✓ Fly CLI authenticated
✓ fly.toml found (app: my-app)
Deploying...
✓ Deployment complete!
App URL: https://my-app.fly.dev
Machines: 2 running in iad
Version: v42
Common Issues
| Issue | Solution |
|---|---|
| Not authenticated | Run fly auth login |
| No fly.toml | Run fly launch to create |
| Build failed | Check Dockerfile and logs |
| Health check failing | Verify /health endpoint |
| Out of memory | Increase memory_mb in fly.toml |
Related
recipes/deployment/fly-io.md- Full Fly.io documentationrecipes/security/secret-management.md- Secrets handling
