flyio-cli-public
Fly.io (flyctl) CLI
Operate Fly.io apps safely and repeatably with flyctl.
Common tasks
- Deploy:
fly deploy/fly deploy --remote-only - Logs:
fly logs -a <app> - SSH / run commands:
fly ssh console -a <app> -C "…" - Secrets:
fly secrets list/set -a <app> - Postgres:
fly postgres list/connect/db create/attach - GitHub Actions deploys / PR previews
Defaults / safety
- Prefer read-only commands first:
fly status,fly logs,fly config show,fly releases,fly secrets list. - Do not run state-changing Fly.io commands without explicit user approval (deploy/scale, secrets set/unset, volume/db create/drop, app destroy, attach/detach).
- Read-only actions are OK without approval.
- Destructive actions (destroy/drop) always require explicit approval.
- When debugging, classify the failure as: build/packaging vs runtime vs platform.
Quick start (typical deploy)
From the app repo directory:
- Confirm which app you’re targeting
fly app listfly status -a <app>- Check
fly.tomlforapp = "..."
- Deploy
fly deploy(default)fly deploy --remote-only(common when local docker/build env is inconsistent)
- Validate
fly status -a <app>fly logs -a <app>fly open -a <app>
Debugging deploy/build failures
Common checks
fly deploy --verbose(more build logs)- If using Dockerfile builds: verify Dockerfile Ruby/version and Gemfile.lock platforms match your builder OS/arch.
Rails + Docker + native gems (nokogiri, pg, etc.)
Symptoms: Bundler can’t find a platform gem like nokogiri-…-x86_64-linux during build.
Fix pattern:
- Ensure
Gemfile.lockincludes the Linux platform used by Fly’s builder (usuallyx86_64-linux).- Example:
bundle lock --add-platform x86_64-linux
- Example:
- Ensure Dockerfile’s Ruby version matches
.ruby-version.
(See references/rails-docker-builds.md.)
Logs, SSH, console
- Stream logs:
fly logs -a <app>
- SSH console:
fly ssh console -a <app>
- Run a one-off command:
fly ssh console -a <app> -C "bin/rails db:migrate"
Secrets / config
- List secrets:
fly secrets list -a <app>
- Set secrets:
fly secrets set -a <app> KEY=value OTHER=value
- Show config:
fly config show -a <app>
Fly Postgres basics
Identify the Postgres app
fly postgres list
Attach Postgres to an app
fly postgres attach <pg-app> -a <app>
Create a database inside the cluster
fly postgres db create <db_name> -a <pg-app>fly postgres db list -a <pg-app>
Connect (psql)
fly postgres connect -a <pg-app>
GitHub Actions deploys / previews
- For production CD: use Fly’s GitHub Action (
superfly/flyctl-actions/setup-flyctl) and runfly deploy(often with--remote-only). - For PR previews:
- Prefer one preview app per PR and one database per PR inside a shared Fly Postgres cluster.
- Automate create/deploy/comment on PR; destroy on close.
(See references/github-actions.md.)
Bundled resources
references/rails-docker-builds.md: Rails/Docker/Fly build failure patterns + fixes.references/github-actions.md: Fly deploy + preview workflows.scripts/fly_app_from_toml.sh: tiny helper to print the Fly app name from fly.toml.
More from thinkfleetai/thinkfleet-engine
local-whisper
Local speech-to-text using OpenAI Whisper. Runs fully offline after model download. High quality transcription with multiple model sizes.
148kagi-search
Web search using Kagi Search API. Use when you need to search the web for current information, facts, or references. Requires KAGI_API_KEY in the environment.
22feishu-bridge
Connect a Feishu (Lark) bot to ThinkFleet via WebSocket long-connection. No public server, domain, or ngrok required. Use when setting up Feishu/Lark as a messaging channel, troubleshooting the Feishu bridge, or managing the bridge service (start/stop/logs). Covers bot creation on Feishu Open Platform, credential setup, bridge startup, macOS launchd auto-restart, and group chat behavior tuning.
13bambu-local
Control Bambu Lab 3D printers locally via MQTT (no cloud). Supports A1, A1 Mini, P1P, P1S, X1C.
10voice-transcribe
Transcribe audio files using OpenAI's gpt-4o-mini-transcribe model with vocabulary hints and text replacements. Requires uv (https://docs.astral.sh/uv/).
10video-subtitles
Generate SRT subtitles from video/audio with translation support. Transcribes Hebrew (ivrit.ai) and English (whisper), translates between languages, burns subtitles into video. Use for creating captions, transcripts, or hardcoded subtitles for WhatsApp/social media.
10