fly_io_list_apps
List all Fly.io apps in the organization. Returns app names, IDs, status, and network details.
- Operation
- Read
read - Full name
fly-io.fly_io_list_apps
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
productivity
Agent-facing Lua documentation and function reference for the Fly.io KosmoKrator integration.
Agents call this integration through app.integrations.fly_io.*.
Use lua_read_doc("integrations.fly-io") inside KosmoKrator to discover the same reference at runtime.
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
List all Fly.io apps in the organization.
None.
local result = app.integrations["fly-io"].list_apps({})
for _, app in ipairs(result) do
print(app.name .. " - " .. app.status .. " (" .. app.organization .. ")")
end
Get details for a specific Fly.io app.
| Name | Type | Required | Description |
|---|---|---|---|
app_name | string | yes | The name of the Fly.io app |
local result = app.integrations["fly-io"].get_app({ app_name = "my-app" })
print(result.name .. " - " .. result.status)
Create a new Fly.io app.
| Name | Type | Required | Description |
|---|---|---|---|
app_name | string | yes | The desired name for the new app |
org_slug | string | no | The organization slug (uses default org if omitted) |
local result = app.integrations["fly-io"].create_app({
app_name = "my-new-app",
org_slug = "personal"
})
print("Created app: " .. result.name)
List all machines for a Fly.io app.
| Name | Type | Required | Description |
|---|---|---|---|
app_name | string | yes | The name of the Fly.io app |
local result = app.integrations["fly-io"].list_machines({ app_name = "my-app" })
for _, machine in ipairs(result) do
print(machine.id .. " - " .. machine.state .. " - " .. machine.region)
end
Get details for a specific Fly.io machine.
| Name | Type | Required | Description |
|---|---|---|---|
app_name | string | yes | The name of the Fly.io app |
machine_id | string | yes | The machine ID |
local result = app.integrations["fly-io"].get_machine({
app_name = "my-app",
machine_id = "73d8d46dbee589"
})
print(result.id .. " - state: " .. result.state .. " - region: " .. result.region)
List all persistent volumes for a Fly.io app.
| Name | Type | Required | Description |
|---|---|---|---|
app_name | string | yes | The name of the Fly.io app |
local result = app.integrations["fly-io"].list_volumes({ app_name = "my-app" })
for _, vol in ipairs(result) do
print(vol.id .. " - " .. vol.name .. " - " .. vol.size_gb .. "GB - " .. vol.region)
end
Get the current authenticated Fly.io user information.
None.
local result = app.integrations["fly-io"].get_current_user({})
print("User: " .. result.email)
If you have multiple Fly.io accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations["fly-io"].list_apps({})
-- Explicit default (portable across setups)
app.integrations["fly-io"].default.list_apps({})
-- Named accounts
app.integrations["fly-io"].production.list_apps({})
app.integrations["fly-io"].staging.list_apps({})
All functions are identical across accounts — only the credentials differ.
# Fly.io — Lua API Reference
## list_apps
List all Fly.io apps in the organization.
### Parameters
None.
### Example
```lua
local result = app.integrations["fly-io"].list_apps({})
for _, app in ipairs(result) do
print(app.name .. " - " .. app.status .. " (" .. app.organization .. ")")
end
```
---
## get_app
Get details for a specific Fly.io app.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `app_name` | string | yes | The name of the Fly.io app |
### Example
```lua
local result = app.integrations["fly-io"].get_app({ app_name = "my-app" })
print(result.name .. " - " .. result.status)
```
---
## create_app
Create a new Fly.io app.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `app_name` | string | yes | The desired name for the new app |
| `org_slug` | string | no | The organization slug (uses default org if omitted) |
### Example
```lua
local result = app.integrations["fly-io"].create_app({
app_name = "my-new-app",
org_slug = "personal"
})
print("Created app: " .. result.name)
```
---
## list_machines
List all machines for a Fly.io app.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `app_name` | string | yes | The name of the Fly.io app |
### Example
```lua
local result = app.integrations["fly-io"].list_machines({ app_name = "my-app" })
for _, machine in ipairs(result) do
print(machine.id .. " - " .. machine.state .. " - " .. machine.region)
end
```
---
## get_machine
Get details for a specific Fly.io machine.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `app_name` | string | yes | The name of the Fly.io app |
| `machine_id` | string | yes | The machine ID |
### Example
```lua
local result = app.integrations["fly-io"].get_machine({
app_name = "my-app",
machine_id = "73d8d46dbee589"
})
print(result.id .. " - state: " .. result.state .. " - region: " .. result.region)
```
---
## list_volumes
List all persistent volumes for a Fly.io app.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `app_name` | string | yes | The name of the Fly.io app |
### Example
```lua
local result = app.integrations["fly-io"].list_volumes({ app_name = "my-app" })
for _, vol in ipairs(result) do
print(vol.id .. " - " .. vol.name .. " - " .. vol.size_gb .. "GB - " .. vol.region)
end
```
---
## get_current_user
Get the current authenticated Fly.io user information.
### Parameters
None.
### Example
```lua
local result = app.integrations["fly-io"].get_current_user({})
print("User: " .. result.email)
```
---
## Multi-Account Usage
If you have multiple Fly.io accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations["fly-io"].list_apps({})
-- Explicit default (portable across setups)
app.integrations["fly-io"].default.list_apps({})
-- Named accounts
app.integrations["fly-io"].production.list_apps({})
app.integrations["fly-io"].staging.list_apps({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.fly_io.fly_io_list_apps({})
print(result) fly_io_list_appsList all Fly.io apps in the organization. Returns app names, IDs, status, and network details.
readfly-io.fly_io_list_apps| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
fly_io_get_appGet details for a specific Fly.io app, including status, network, and machine count.
readfly-io.fly_io_get_app| Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
fly_io_create_appCreate a new Fly.io app. Requires an app name and optionally an organization ID.
writefly-io.fly_io_create_app| 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_list_machinesList all machines for a Fly.io app. Returns machine IDs, state, region, and configuration.
readfly-io.fly_io_list_machines| Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
fly_io_get_machineGet details for a specific Fly.io machine, including its state, config, and region.
readfly-io.fly_io_get_machine| Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
machine_id | string | no | The machine ID. |
fly_io_list_volumesList all persistent volumes for a Fly.io app. Returns volume IDs, name, size, and region.
readfly-io.fly_io_list_volumes| Parameter | Type | Required | Description |
|---|---|---|---|
app_name | string | no | The name of the Fly.io app. |
fly_io_get_current_userGet the current authenticated Fly.io user information, including email and account details.
readfly-io.fly_io_get_current_user| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||