Community packages

@kentcdodds/fly

by @kentcdodds

Fly.io helpers for organizations, apps, Machines, machine counts, app logs, Prometheus metrics, outage summaries, and API documentation using the flyApiToken secret.

  • fly
  • flyio
  • machines
  • apps
  • graphql
  • logs
  • metrics
  • prometheus
  • outages
  • infrastructure
License
MIT
Published
7/9/2026
Pinned commit
95013e6
Rating
No ratings yet
Adaptation effort
Forks
0

Fork with your agent

Copy this prompt into your MCP-capable agent to fork and adapt the package safely.

Use Kody to fork the community package "@kentcdodds/fly" (listing id: cd1baafc-8de8-49fb-b36e-598e30ecb5b4). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.

README

# @kentcdodds/fly

## Intent

Fly.io helpers for organizations, apps, Machines, logs, and Prometheus metrics in Kody workflows.

## When To Use

- List Fly apps or machines visible to your token
- Count machines grouped by state or app for capacity checks
- Fetch app logs for an outage window with summarized incident signals
- Query Fly Prometheus metrics for CPU, memory, disk, or HTTP responses
- Run a custom Fly GraphQL query against `api.fly.io`

## Required setup

- `flyApiToken` secret (user scope) sent as a bearer token to Fly GraphQL, app logs, and Prometheus endpoints

## Exports

- `kody:@kentcdodds/fly` — package overview
- `kody:@kentcdodds/fly/graphql` — custom GraphQL queries
- `kody:@kentcdodds/fly/organizations` — list or resolve organizations (defaults to `personal`)
- `kody:@kentcdodds/fly/apps` — list apps for an organization
- `kody:@kentcdodds/fly/machines` — list machines, optionally filtered by `appId` or `state`
- `kody:@kentcdodds/fly/machine-count` — count machines grouped by state and app
- `kody:@kentcdodds/fly/app-machines` — list machines for one app by `appName` or `appId`
- `kody:@kentcdodds/fly/logs` — fetch and summarize app logs for a time window
- `kody:@kentcdodds/fly/metrics` — Fly Prometheus instant/range queries and common app metrics
- `kody:@kentcdodds/fly/smoke-test` — read-only auth and machine-count smoke test
- `kody:@kentcdodds/fly/docs` — API patterns and export discovery metadata

## Examples

```ts
import listApps from 'kody:@kentcdodds/fly/apps'

export default async function main() {
  return await listApps({ organizationSlug: 'personal' })
}
```

```ts
import logs from 'kody:@kentcdodds/fly/logs'

export default async function main() {
  return await logs({
    appName: 'my-app',
    start: '2026-06-24T14:00:00Z',
    end: '2026-06-24T15:00:00Z',
  })
}
```

Report this listing

Log in to report this listing.