KosmoKrator

data

Heroku CLI for AI Agents

Use the Heroku CLI from KosmoKrator to call Heroku tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Heroku CLI Setup

Heroku can be configured headlessly with `kosmokrator integrations:configure heroku`.

Install, configure, and verify
# 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 heroku --set api_key="$HEROKU_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor heroku --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key HEROKU_API_KEY Secret secret yes API Key
url HEROKU_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call heroku.heroku_list_apps '{}' --json
Provider shortcut
kosmo integrations:heroku heroku_list_apps '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs heroku --json
kosmo integrations:docs heroku.heroku_list_apps --json
kosmo integrations:schema heroku.heroku_list_apps --json
kosmo integrations:search "Heroku" --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.

heroku.heroku_list_apps

List all Heroku apps the authenticated user has access to. Returns app names, IDs, regions, and status.

Read read
Parameters
none
Generic call
kosmo integrations:call heroku.heroku_list_apps '{}' --json
Shortcut
kosmo integrations:heroku heroku_list_apps '{}' --json

heroku.heroku_get_app

Get details for a specific Heroku app by ID or name. Returns full app information including region, stack, and Git URL.

Read read
Parameters
app_id
Generic call
kosmo integrations:call heroku.heroku_get_app '{"app_id":"example_app_id"}' --json
Shortcut
kosmo integrations:heroku heroku_get_app '{"app_id":"example_app_id"}' --json

heroku.heroku_list_dynos

List all dynos for a given Heroku app. Returns dyno names, types, sizes, states, and uptime.

Read read
Parameters
app_id
Generic call
kosmo integrations:call heroku.heroku_list_dynos '{"app_id":"example_app_id"}' --json
Shortcut
kosmo integrations:heroku heroku_list_dynos '{"app_id":"example_app_id"}' --json

heroku.heroku_list_addons

List all add-ons attached to a given Heroku app. Returns add-on names, plans, states, and provider details.

Read read
Parameters
app_id
Generic call
kosmo integrations:call heroku.heroku_list_addons '{"app_id":"example_app_id"}' --json
Shortcut
kosmo integrations:heroku heroku_list_addons '{"app_id":"example_app_id"}' --json

heroku.heroku_list_domains

List all domains for a given Heroku app. Returns domain hostnames, types (custom/Heroku), and status.

Read read
Parameters
app_id
Generic call
kosmo integrations:call heroku.heroku_list_domains '{"app_id":"example_app_id"}' --json
Shortcut
kosmo integrations:heroku heroku_list_domains '{"app_id":"example_app_id"}' --json

heroku.heroku_list_collaborators

List all collaborators for a given Heroku app. Returns collaborator emails, roles, and permissions.

Read read
Parameters
app_id
Generic call
kosmo integrations:call heroku.heroku_list_collaborators '{"app_id":"example_app_id"}' --json
Shortcut
kosmo integrations:heroku heroku_list_collaborators '{"app_id":"example_app_id"}' --json

heroku.heroku_get_current_user

Get information about the current authenticated Heroku account, including email, name, and verified status.

Read read
Parameters
none
Generic call
kosmo integrations:call heroku.heroku_get_current_user '{}' --json
Shortcut
kosmo integrations:heroku heroku_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

heroku.heroku_list_apps 0 parameters
Schema command
kosmo integrations:schema heroku.heroku_list_apps --json
ParameterTypeRequiredDescription
No parameters.
heroku.heroku_get_app 1 parameters
Schema command
kosmo integrations:schema heroku.heroku_get_app --json
ParameterTypeRequiredDescription
app_id string yes The app ID or name (e.g., "my-app" or the UUID).
heroku.heroku_list_dynos 1 parameters
Schema command
kosmo integrations:schema heroku.heroku_list_dynos --json
ParameterTypeRequiredDescription
app_id string yes The app ID or name.
heroku.heroku_list_addons 1 parameters
Schema command
kosmo integrations:schema heroku.heroku_list_addons --json
ParameterTypeRequiredDescription
app_id string yes The app ID or name.
heroku.heroku_list_domains 1 parameters
Schema command
kosmo integrations:schema heroku.heroku_list_domains --json
ParameterTypeRequiredDescription
app_id string yes The app ID or name.
heroku.heroku_list_collaborators 1 parameters
Schema command
kosmo integrations:schema heroku.heroku_list_collaborators --json
ParameterTypeRequiredDescription
app_id string yes The app ID or name.
heroku.heroku_get_current_user 0 parameters
Schema command
kosmo integrations:schema heroku.heroku_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

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.