Fly.io CLI (flyctl)
$ flyctl Official High RiskFly.io's flyctl (aliased as fly) deploys and inspects microVMs, volumes, secrets, and Postgres clusters across global regions, featuring -j / --json output on read commands, --yes prompt bypass, and scoped FLY_API_TOKEN tokens.
brew install flyctl flyctl reads local fly.toml and streams builds/machine inspections directly with --json, beating generic MCP wrappers.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Most read commands (apps, status, machines, secrets list) support --json, and --yes suppresses interactive prompts.
- Supports
--json(-j) and--yes(-y) across core subcommands
App-scoped deploy tokens (FLY_API_TOKEN) and --stage secret updates help, though flyctl deploy lacks a general --dry-run.
- Supports scoped
FLY_API_TOKENandsecrets set --stage
Single static Go binary via Homebrew and official install scripts across macOS, Linux, and Windows.
- Single Go binary via
brew install flyctl
Manages builds, Machines, volumes, and WireGuard networking cleanly from one CLI.
- Full Fly Machines and
fly.tomllifecycle
Official superfly/flyctl repository updated rapidly by Fly.io.
- Official
superfly/flyctlunder Apache-2.0
Comprehensive fly.io/docs/flyctl/ reference and Cobra --help.
- Official documentation at fly.io/docs/flyctl/
Security, Auth & Guardrails
Stores session tokens in ~/.fly/config.yml, or accepts scoped deploy tokens via FLY_API_TOKEN / --access-token.
CLI is free (Apache-2.0); Fly Machines, Volumes, and bandwidth incur Fly.io billing.
# flyctl Agent Rules - Always pass `--app <name>` and `--json` on status/list/logs queries. - Prefer app-scoped `FLY_API_TOKEN` (`fly tokens create deploy`) over personal account tokens. - Never run `flyctl apps destroy` or `flyctl volumes destroy` without explicit user approval.
Agent-Ready Command Recipes
Safe Read-Only Queries
flyctl status --app my-app --json
Returns app state, allocation/machine IDs, regions, and health checks as JSON.
flyctl apps list --json
Lists accessible Fly apps and organizations in structured JSON.
Controlled Writes & Previews
flyctl secrets set MY_FLAG=true --stage --app my-app
Queues a secret update with --stage so it applies only on the next deliberate deploy.
Strengths for Agents
- + Fast Go binary with widespread
--jsonsupport on read commands. - + App-scoped
FLY_API_TOKENminimizes credential blast radius. - +
flyctl secrets set --stageavoids unintended immediate restarts.
Caveats & Pitfalls
- !
flyctl launchis heavily interactive unless configured carefully with--no-deployand flags. - ! No universal
--dry-runmode onflyctl deploy.