Skip to content
← Community packages

Manage Fly.io apps, Machines, logs, and metrics.

  • fly
  • flyio
  • machines
  • apps
  • openapi
  • graphql
  • logs
  • metrics
  • prometheus
  • outages
  • infrastructure
License
MIT
Published
July 13, 2026
Pinned commit
7d91f02
Rating
No ratings yet
Forks
0
Stars
0
Adaptation effort

One-click install

Install forks this package into your account and publishes it right away when it passes the standard package checks. This listing has not been reviewed by an admin.

Log in to install this package.

Fork with your agent

Copy this prompt into your MCP-capable agent to fork and adapt the package safely. Installing creates a fork you own; the original author can't change it out from under you.

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. Apps and Machines listing use an OpenAPI-scaffolded Machines REST client; GraphQL and Prometheus helpers stay available for orgs, custom queries, logs, and metrics.

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)
    • Machines REST (api.machines.dev): Authorization: Bearer {{secret:flyApiToken}}
    • GraphQL / logs / Prometheus (api.fly.io): existing package headers (Bearer / FlyV1)
  • Host approval for api.machines.dev and api.fly.io as needed

Machines OpenAPI

  • Spec: https://docs.machines.dev/spec/openapi3.json
  • Scaffolded ops: apps_list, apps_show, machines_list, machines_show, machines_org_list, currenttoken_show
  • Client: src/lib/openapi-client.ts (dependency-free ESM, returns raw Response)

Exports

  • kody:@kentcdodds/fly — package overview
  • kody:@kentcdodds/fly/graphql — custom GraphQL queries
  • kody:@kentcdodds/fly/organizations — list or resolve organizations via GraphQL (defaults to personal)
  • kody:@kentcdodds/fly/apps — list/get apps via Machines REST (org_slug, default personal)
  • kody:@kentcdodds/fly/machines — list/get machines via Machines REST (org-wide or by appName)
  • 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

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

export default async function main() {
	return await listApps({ organizationSlug: 'personal' })
}
import machines from 'kody:@kentcdodds/fly/machines'

export default async function main() {
	return await machines({ appName: 'my-app' })
}
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',
	})
}

Stars

0 stars

Log in to star this package.

Report this listing

Log in to report this listing.