justinburdett

Fly.io CLI

运维安全v1.0.3
作者:justinburdett更新于 2026-05-11共 4 个版本 · 最新版本发布于 2026-02-08flyio-cli@clawhub_justinburdett/flyio-cli
服务器运维配置生成DevOps#PostgreSQL#Deploy#GitHub

据 AlphaMoat 统计,截至 2026-09,Fly.io CLI 累计下载 3,452 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 3,218 位,在「运维安全」分类(264 个)中排名第 208 位。

累计安装
160
累计下载
3,452
星标
1
全站排名
#3,218
全站前 64% · 「运维安全」前 79%
平台累计安装累计下载星标评论
ClawHub ↗1133,3801-
SkillHub ↗1603,4521—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

默认先做状态、日志、配置和发布记录等只读诊断;部署、SSH、密钥、扩缩容、机器、卷和数据库变更必须有用户明确批准。 需要已认证的flyctl和已确认应用/仓库;FLY_API_TOKEN用于文档CI分支,限制权限,预览使用测试秘密。verbose部署仍是修改状态的部署。

资料发布于 2026-10-27

可以用来做什么

  • 以只读诊断排查Fly.io部署或运行失败

什么时候用

  • 目标应用和账户已核实,修改会逐项明确批准时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

只读查看这个Fly应用的状态、日志和配置,列出拟议变更,不部署或修改密钥。

月度数据趋势

累计下载3,452
2,4672,9963,5252026-03 · 累计下载 2,5402026-05 · 累计下载 2,8762026-06 · 累计下载 2,9942026-07 · 累计下载 3,1962026-08 · 累计下载 3,2862026-09 · 累计下载 3,45226-0326-09
星标1
0122026-03 · 星标 12026-05 · 星标 12026-06 · 星标 12026-07 · 星标 12026-08 · 星标 12026-09 · 星标 126-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,452—1
2026-083,286+2.8%1
2026-073,196+6.7%1
2026-062,994+4.1%1
2026-052,876—1
2026-032,540—1

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

3.8 KB · ClawHub v1.0.3
---
name: flyio-cli
description: "Use the Fly.io flyctl CLI for deploying and operating apps on Fly.io. Default to read-only diagnostics (status/logs/config/releases). Only perform state-changing operations (deploys, SSH exec, secrets, scaling, machines, volumes, Postgres changes) with explicit user approval. Use when asked to deploy to Fly.io, debug fly deploy/build/runtime failures, set up GitHub Actions deploys/previews, or safely manage Fly apps and Postgres."
---

# Fly.io (flyctl) CLI

Operate Fly.io apps safely and repeatably with `flyctl`.

## Defaults / safety
展开全部(共 106 行)

- Prefer **read-only** commands first: `fly status`, `fly logs`, `fly config show`, `fly releases`, `fly secrets list`.
- **Do not edit/modify Fly.io apps, machines, secrets, volumes, or databases without your human’s explicit approval.**
  - Read-only actions are OK without approval.
  - Destructive actions (destroy/drop) always require explicit approval.
- When debugging builds, capture the exact error output and determine whether it’s a:
  - build/packaging issue (Dockerfile, Gemfile.lock platforms, assets precompile)
  - runtime issue (secrets, DB, migrations)
  - platform issue (regions, machines, health checks)

## Quick start (typical deploy)

From the app repo directory:

1) Confirm which app you’re targeting
- `fly app list`
- `fly status -a <app>`
- Check `fly.toml` for `app = "..."`

2) Validate / inspect (read-only)
- `fly status -a <app>`
- `fly logs -a <app>`
- `fly config show -a <app>`

(Deploys are in **High-risk operations** below and require explicit user approval.)

## 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.lock` includes the Linux platform used by Fly’s builder (usually `x86_64-linux`).
  - Example: `bundle lock --add-platform x86_64-linux`
- Ensure Dockerfile’s Ruby version matches `.ruby-version`.

(See `references/rails-docker-builds.md`.)

## Logs & config (read-only)

- Stream logs:
  - `fly logs -a <app>`
- Show config:
  - `fly config show -a <app>`
- List secrets (names only):
  - `fly secrets list -a <app>`

## High-risk operations (ask first)

These commands can execute arbitrary code on servers or mutate production state.
Only run them when the user explicitly asks you to.

- Deploy:
  - `fly deploy` / `fly deploy --remote-only`
- SSH exec / console:
  - `fly ssh console -a <app> -C "<command>"`
- Secrets changes:
  - `fly secrets set -a <app> KEY=value`

See `references/safety.md`.

## 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 run `flyctl deploy`.
- 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/safety.md`: safety rules (read-only by default; ask before mutating state).
- `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 (shell-only; no ruby).

「运维安全」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。