← Back to CLIs
Melvynx

fly

Deploy and manage Fly.io apps via CLI - apps, machines, volumes, secrets, certificates. Use when user mentions 'fly', 'flyctl', 'fly.io', or wants to deploy on Fly.io.

Install

$ npx api2cli install fly

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

fly

Setup

macOS:

brew install flyctl

Linux:

curl -L https://fly.io/install.sh | sh

Verify installation:

fly --version

Always use --json flag when calling commands programmatically (where supported).

Authentication

fly auth login

Check auth status:

fly auth whoami

Resources

Apps

CommandDescription
fly launchCreate and configure a new app
fly apps listList all apps
fly apps create <name>Create a new app
fly apps destroy <name>Destroy an app
fly statusShow app status
fly infoShow app details

Deploy

CommandDescription
fly deployDeploy the app
fly deploy --image <image>Deploy a specific Docker image
fly deploy --strategy rollingDeploy with rolling strategy
fly releasesList recent releases

Logs

CommandDescription
fly logsStream app logs
fly logs --app <name>Stream logs for a specific app

Scaling

CommandDescription
fly scale count 2Scale to 2 instances
fly scale vm shared-cpu-1xSet VM size
fly scale vm shared-cpu-1x --memory 512Set VM size with memory
fly scale showShow current scale settings
fly regions listList available regions
fly regions add <region>Add a region

Secrets

CommandDescription
fly secrets listList all secrets
fly secrets set KEY=valueSet a secret
fly secrets set KEY1=val1 KEY2=val2Set multiple secrets
fly secrets unset KEYRemove a secret

Volumes

CommandDescription
fly volumes listList all volumes
fly volumes create <name> --size 1Create a volume (size in GB)
fly volumes create <name> --size 1 --region <region>Create volume in specific region
fly volumes destroy <id>Destroy a volume
fly volumes extend <id> --size 5Extend volume size

Certificates

CommandDescription
fly certs listList all certificates
fly certs create <domain>Add a certificate for a domain
fly certs show <domain>Show certificate details
fly certs delete <domain>Remove a certificate

Machines

CommandDescription
fly machine listList all machines
fly machine start <id>Start a machine
fly machine stop <id>Stop a machine
fly machine destroy <id>Destroy a machine
fly machine status <id>Show machine status

SSH and Proxy

CommandDescription
fly ssh consoleOpen SSH console to the app
fly ssh console --command "ls -la"Run a command via SSH
fly proxy 5432Proxy a port to local machine
fly proxy 5432:5432Proxy with explicit local:remote ports

Global Flags

FlagDescription
--jsonOutput result as JSON
--app <name>Specify app name
--config <path>Path to fly.toml config file
--region <region>Specify region
--verboseEnable verbose output
Sponsors