KosmoKrator

productivity

Modal CLI for AI Agents

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

7 functions 7 read 0 write API key auth

Modal CLI Setup

Modal can be configured headlessly with `kosmokrator integrations:configure modal`.

# 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 modal --set api_key="$MODAL_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor modal --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
api_key MODAL_API_KEY Secret secret yes API Key
url MODAL_URL URL url no API Base URL

Call Modal Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call modal.modal_list_apps '{}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:modal modal_list_apps '{}' --json

Agent Discovery Commands

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

kosmo integrations:docs modal --json
kosmo integrations:docs modal.modal_list_apps --json
kosmo integrations:schema modal.modal_list_apps --json
kosmo integrations:search "Modal" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Modal.

modal.modal_list_apps

Read read

List all Modal apps. Returns app IDs, names, and status details.

Parameters
none

Generic CLI call

kosmo integrations:call modal.modal_list_apps '{}' --json

Provider shortcut

kosmo integrations:modal modal_list_apps '{}' --json

modal.modal_get_app

Read read

Get details for a specific Modal app by ID, including status and metadata.

Parameters
app_id

Generic CLI call

kosmo integrations:call modal.modal_get_app '{"app_id":"example_app_id"}' --json

Provider shortcut

kosmo integrations:modal modal_get_app '{"app_id":"example_app_id"}' --json

modal.modal_list_functions

Read read

List all functions for a Modal app. Returns function IDs, names, and runtime details.

Parameters
app_id

Generic CLI call

kosmo integrations:call modal.modal_list_functions '{"app_id":"example_app_id"}' --json

Provider shortcut

kosmo integrations:modal modal_list_functions '{"app_id":"example_app_id"}' --json

modal.modal_list_schedules

Read read

List all scheduled functions for a Modal app. Returns schedule IDs, cron expressions, and function details.

Parameters
app_id

Generic CLI call

kosmo integrations:call modal.modal_list_schedules '{"app_id":"example_app_id"}' --json

Provider shortcut

kosmo integrations:modal modal_list_schedules '{"app_id":"example_app_id"}' --json

modal.modal_list_volumes

Read read

List all Modal volumes. Returns volume IDs, names, and size details.

Parameters
none

Generic CLI call

kosmo integrations:call modal.modal_list_volumes '{}' --json

Provider shortcut

kosmo integrations:modal modal_list_volumes '{}' --json

modal.modal_list_secrets

Read read

List all Modal secrets. Returns secret names and creation dates (values are not exposed).

Parameters
none

Generic CLI call

kosmo integrations:call modal.modal_list_secrets '{}' --json

Provider shortcut

kosmo integrations:modal modal_list_secrets '{}' --json

modal.modal_get_current_user

Read read

Get the current authenticated Modal user information, including name, email, and account details.

Parameters
none

Generic CLI call

kosmo integrations:call modal.modal_get_current_user '{}' --json

Provider shortcut

kosmo integrations:modal modal_get_current_user '{}' --json

Function Schemas

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

modal.modal_list_apps

List all Modal apps. Returns app IDs, names, and status details.

Operation
Read read
Schema command
kosmo integrations:schema modal.modal_list_apps --json
ParameterTypeRequiredDescription
No parameters.

modal.modal_get_app

Get details for a specific Modal app by ID, including status and metadata.

Operation
Read read
Schema command
kosmo integrations:schema modal.modal_get_app --json
ParameterTypeRequiredDescription
app_id string no The ID of the Modal app.

modal.modal_list_functions

List all functions for a Modal app. Returns function IDs, names, and runtime details.

Operation
Read read
Schema command
kosmo integrations:schema modal.modal_list_functions --json
ParameterTypeRequiredDescription
app_id string no The ID of the Modal app to list functions for.

modal.modal_list_schedules

List all scheduled functions for a Modal app. Returns schedule IDs, cron expressions, and function details.

Operation
Read read
Schema command
kosmo integrations:schema modal.modal_list_schedules --json
ParameterTypeRequiredDescription
app_id string no The ID of the Modal app to list schedules for.

modal.modal_list_volumes

List all Modal volumes. Returns volume IDs, names, and size details.

Operation
Read read
Schema command
kosmo integrations:schema modal.modal_list_volumes --json
ParameterTypeRequiredDescription
No parameters.

modal.modal_list_secrets

List all Modal secrets. Returns secret names and creation dates (values are not exposed).

Operation
Read read
Schema command
kosmo integrations:schema modal.modal_list_secrets --json
ParameterTypeRequiredDescription
No parameters.

modal.modal_get_current_user

Get the current authenticated Modal user information, including name, email, and account details.

Operation
Read read
Schema command
kosmo integrations:schema modal.modal_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.