productivity
Modal CLI for Coding Agents
Use the Modal CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 7 read 0 write API key auth
Modal CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The Modal CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Modal CLI for Coding Agents
kosmokrator integrations:configure modal --set api_key="$MODAL_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call modal.modal_list_apps '{}' --json Discovery Before Execution
Agents and scripts can inspect Modal docs and schemas 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 Useful Modal CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
modal.modal_list_apps | Read | none | List all Modal apps. Returns app IDs, names, and status details. |
modal.modal_get_app | Read | app_id | Get details for a specific Modal app by ID, including status and metadata. |
modal.modal_list_functions | Read | app_id | List all functions for a Modal app. Returns function IDs, names, and runtime details. |
modal.modal_list_schedules | Read | app_id | List all scheduled functions for a Modal app. Returns schedule IDs, cron expressions, and function details. |
modal.modal_list_volumes | Read | none | List all Modal volumes. Returns volume IDs, names, and size details. |
modal.modal_list_secrets | Read | none | List all Modal secrets. Returns secret names and creation dates (values are not exposed). |
modal.modal_get_current_user | Read | none | Get the current authenticated Modal user information, including name, email, and account details. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.