README.md
34 lines · 1.3 KB · Markdown@kentcdodds/fly
Intent
Fly.io helpers for organizations, apps, Machines, logs, and Prometheus metrics in Kody workflows. Apps and Machines listing use an OpenAPI-scaffolded Machines REST client; GraphQL and Prometheus helpers stay available for orgs, custom queries, logs, and metrics.
What it does
- List Fly organizations, apps, and Machines (org-wide or per app)
- Count Machines grouped by state and app for capacity checks
- Fetch app logs for an outage window with summarized incident signals
- Query Fly Prometheus metrics (CPU, memory, disk, HTTP) or custom PromQL
- Run custom Fly GraphQL queries against
api.fly.io
Prerequisites / setup
- Save a Fly API token in Kody as user secret
flyApiToken(never paste the value in chat). - Approve hosts
api.machines.dev(Machines REST) andapi.fly.io(GraphQL, logs, Prometheus) for that secret as needed. - Agents: see
AGENTS.mdfor import paths and smoke checks.
Machines REST uses Authorization: Bearer with the secret. GraphQL / logs /
Prometheus keep their existing Fly auth headers (Bearer / FlyV1).
Done when
flyApiTokenis saved and hosts are approved- Read-only smoke test returns
ok: truewith org/app (and optional machine) samples - You can list apps/machines and pull logs or metrics for a real app when needed