data
Fly.io CLI for AI Agents
Use the Fly.io CLI from KosmoKrator to call Fly.io tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Fly.io CLI Setup
Fly.io can be configured headlessly with `kosmokrator integrations:configure fly-io`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure fly-io --set access_token="$FLY_IO_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor fly-io --json
kosmokrator integrations:status --json Credentials
Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | FLY_IO_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | FLY_IO_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call fly-io.fly_io_list_apps '{}' --json kosmo integrations:fly-io fly_io_list_apps '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs fly-io --json
kosmo integrations:docs fly-io.fly_io_list_apps --json
kosmo integrations:schema fly-io.fly_io_list_apps --json
kosmo integrations:search "Fly.io" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
fly-io.fly_io_list_apps
List all Fly.io apps in the organization. Returns app names, IDs, status, and network details.
read - Parameters
- none
kosmo integrations:call fly-io.fly_io_list_apps '{}' --json kosmo integrations:fly-io fly_io_list_apps '{}' --json fly-io.fly_io_get_app
Get details for a specific Fly.io app, including status, network, and machine count.
read - Parameters
- app_name
kosmo integrations:call fly-io.fly_io_get_app '{"app_name":"example_app_name"}' --json kosmo integrations:fly-io fly_io_get_app '{"app_name":"example_app_name"}' --json fly-io.fly_io_create_app
Create a new Fly.io app. Requires an app name and optionally an organization ID.
write - Parameters
- app_name, org_slug
kosmo integrations:call fly-io.fly_io_create_app '{"app_name":"example_app_name","org_slug":"example_org_slug"}' --json kosmo integrations:fly-io fly_io_create_app '{"app_name":"example_app_name","org_slug":"example_org_slug"}' --json fly-io.fly_io_list_machines
List all machines for a Fly.io app. Returns machine IDs, state, region, and configuration.
read - Parameters
- app_name
kosmo integrations:call fly-io.fly_io_list_machines '{"app_name":"example_app_name"}' --json kosmo integrations:fly-io fly_io_list_machines '{"app_name":"example_app_name"}' --json fly-io.fly_io_get_machine
Get details for a specific Fly.io machine, including its state, config, and region.
read - Parameters
- app_name, machine_id
kosmo integrations:call fly-io.fly_io_get_machine '{"app_name":"example_app_name","machine_id":"example_machine_id"}' --json kosmo integrations:fly-io fly_io_get_machine '{"app_name":"example_app_name","machine_id":"example_machine_id"}' --json fly-io.fly_io_list_volumes
List all persistent volumes for a Fly.io app. Returns volume IDs, name, size, and region.
read - Parameters
- app_name
kosmo integrations:call fly-io.fly_io_list_volumes '{"app_name":"example_app_name"}' --json kosmo integrations:fly-io fly_io_list_volumes '{"app_name":"example_app_name"}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
fly-io.fly_io_list_apps 0 parameters
kosmo integrations:schema fly-io.fly_io_list_apps --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
fly-io.fly_io_get_app 1 parameters
kosmo integrations:schema fly-io.fly_io_get_app --json | Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
fly-io.fly_io_create_app 2 parameters
kosmo integrations:schema fly-io.fly_io_create_app --json | Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The desired name for the new app. |
org_slug | string | no | The organization slug to create the app in (optional, uses default org if omitted). |
fly-io.fly_io_list_machines 1 parameters
kosmo integrations:schema fly-io.fly_io_list_machines --json | Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
fly-io.fly_io_get_machine 2 parameters
kosmo integrations:schema fly-io.fly_io_get_machine --json | Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
machine_id | string | no | The machine ID. |
fly-io.fly_io_list_volumes 1 parameters
kosmo integrations:schema fly-io.fly_io_list_volumes --json | Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.