KosmoKrator

analytics

ChartMogul CLI for Shell Scripts

Use the ChartMogul CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 7 read 0 write API key auth

ChartMogul CLI for Shell Scripts

Call integration functions from shell scripts with stable JSON input and output.

Use shell scripts for small local automations that need one or more integration calls. 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 Shell Scripts
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

FunctionTypeParametersDescription
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

Related ChartMogul CLI Pages