analytics
ChartMogul CLI for Coding Agents
Use the ChartMogul CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 7 read 0 write API key auth
ChartMogul 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 ChartMogul CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# ChartMogul CLI for Coding Agents
kosmokrator integrations:configure chartmogul --set api_key="$CHARTMOGUL_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call chartmogul.chartmogul_list_customers '{"per_page":1,"page":1,"status":"example_status","email":"example_email"}' --json Discovery Before Execution
Agents and scripts can inspect ChartMogul docs and schemas before choosing a function.
kosmo integrations:docs chartmogul --json
kosmo integrations:docs chartmogul.chartmogul_list_customers --json
kosmo integrations:schema chartmogul.chartmogul_list_customers --json
kosmo integrations:search "ChartMogul" --json
kosmo integrations:list --json Useful ChartMogul CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
chartmogul.chartmogul_list_customers | Read | per_page, page, status, email | List customers from ChartMogul. Supports filtering by status or email and pagination. Returns customer details including UUID, name, email, company, and status. |
chartmogul.chartmogul_get_customer | Read | id | Get details for a single ChartMogul customer by UUID. Returns full customer information including attributes, address, and custom fields. |
chartmogul.chartmogul_list_subscriptions | Read | per_page, page, customer_uuid, status | List subscriptions from ChartMogul. Supports filtering by customer UUID or status and pagination. Returns subscription details including plan, dates, and state. |
chartmogul.chartmogul_list_plans | Read | per_page, page | List billing plans from ChartMogul. Returns plan details including name, interval, amount, and currency. |
chartmogul.chartmogul_list_invoices | Read | per_page, page, customer_uuid | List invoices from ChartMogul. Supports filtering by customer UUID and pagination. Returns invoice details including amount, dates, line items, and status. |
chartmogul.chartmogul_get_metrics | Read | start_date, end_date, interval, type | Query subscription analytics metrics from ChartMogul. Returns key metrics like MRR, ARR, churn rate, customer count, and more. Specify a date range and interval for timeseries data. |
chartmogul.chartmogul_get_current_user | Read | none | Get the currently authenticated ChartMogul user. Returns user details including name, email, and account information. Useful for verifying API credentials. |
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.