analytics
ChartMogul CLI for AI Agents
Use the ChartMogul CLI from KosmoKrator to call ChartMogul tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.ChartMogul CLI Setup
ChartMogul can be configured headlessly with `kosmokrator integrations:configure chartmogul`.
# 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 chartmogul --set api_key="$CHARTMOGUL_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor chartmogul --json
kosmokrator integrations:status --json Credentials
Authentication type: basic auth api key basic_auth_api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
api_key | CHARTMOGUL_API_KEY | Secret secret | yes | API Key |
url | CHARTMOGUL_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call chartmogul.chartmogul_list_customers '{"per_page":1,"cursor":"example_cursor","status":"example_status","email":"example_email","data_source_uuid":"example_data_source_uuid","external_id":"example_external_id","system":"example_system"}' --json kosmo integrations:chartmogul chartmogul_list_customers '{"per_page":1,"cursor":"example_cursor","status":"example_status","email":"example_email","data_source_uuid":"example_data_source_uuid","external_id":"example_external_id","system":"example_system"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities 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 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.
chartmogul.chartmogul_list_customers
List customers from ChartMogul. Supports cursor pagination and filters including status, email, data source UUID, external ID, and billing system.
read - Parameters
- per_page, cursor, status, email, data_source_uuid, external_id, system
kosmo integrations:call chartmogul.chartmogul_list_customers '{"per_page":1,"cursor":"example_cursor","status":"example_status","email":"example_email","data_source_uuid":"example_data_source_uuid","external_id":"example_external_id","system":"example_system"}' --json kosmo integrations:chartmogul chartmogul_list_customers '{"per_page":1,"cursor":"example_cursor","status":"example_status","email":"example_email","data_source_uuid":"example_data_source_uuid","external_id":"example_external_id","system":"example_system"}' --json chartmogul.chartmogul_get_customer
Get details for a single ChartMogul customer by UUID. Returns full customer information including attributes, address, and custom fields.
read - Parameters
- id
kosmo integrations:call chartmogul.chartmogul_get_customer '{"id":"example_id"}' --json kosmo integrations:chartmogul chartmogul_get_customer '{"id":"example_id"}' --json chartmogul.chartmogul_list_subscriptions
List subscriptions for a specific ChartMogul customer. The current API endpoint is /v1/customers/{CUSTOMER_UUID}/subscriptions and uses cursor pagination.
read - Parameters
- per_page, cursor, customer_uuid
kosmo integrations:call chartmogul.chartmogul_list_subscriptions '{"per_page":1,"cursor":"example_cursor","customer_uuid":"example_customer_uuid"}' --json kosmo integrations:chartmogul chartmogul_list_subscriptions '{"per_page":1,"cursor":"example_cursor","customer_uuid":"example_customer_uuid"}' --json chartmogul.chartmogul_list_plans
List billing plans from ChartMogul. Supports cursor pagination and optional filtering by data source UUID.
read - Parameters
- per_page, cursor, data_source_uuid
kosmo integrations:call chartmogul.chartmogul_list_plans '{"per_page":1,"cursor":"example_cursor","data_source_uuid":"example_data_source_uuid"}' --json kosmo integrations:chartmogul chartmogul_list_plans '{"per_page":1,"cursor":"example_cursor","data_source_uuid":"example_data_source_uuid"}' --json chartmogul.chartmogul_list_invoices
List invoices from ChartMogul. Supports cursor pagination and filters by customer UUID or invoice external ID.
read - Parameters
- per_page, cursor, customer_uuid, external_id
kosmo integrations:call chartmogul.chartmogul_list_invoices '{"per_page":1,"cursor":"example_cursor","customer_uuid":"example_customer_uuid","external_id":"example_external_id"}' --json kosmo integrations:chartmogul chartmogul_list_invoices '{"per_page":1,"cursor":"example_cursor","customer_uuid":"example_customer_uuid","external_id":"example_external_id"}' --json chartmogul.chartmogul_get_metrics
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.
read - Parameters
- start_date, end_date, interval, geo, plans, filters
kosmo integrations:call chartmogul.chartmogul_get_metrics '{"start_date":"example_start_date","end_date":"example_end_date","interval":"example_interval","geo":"example_geo","plans":"example_plans","filters":"example_filters"}' --json kosmo integrations:chartmogul chartmogul_get_metrics '{"start_date":"example_start_date","end_date":"example_end_date","interval":"example_interval","geo":"example_geo","plans":"example_plans","filters":"example_filters"}' --json chartmogul.chartmogul_get_current_user
Verify ChartMogul API credentials with the /v1/ping endpoint. Returns pong data when the API key is valid.
read - Parameters
- none
kosmo integrations:call chartmogul.chartmogul_get_current_user '{}' --json kosmo integrations:chartmogul chartmogul_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
chartmogul.chartmogul_list_customers 7 parameters
kosmo integrations:schema chartmogul.chartmogul_list_customers --json | Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | no | Number of results per page (default: 50, max: 200). |
cursor | string | no | Cursor from a previous response. Use only when has_more is true. |
status | string | no | Filter by customer status. Common values: "Active", "Cancelled", "Future". |
email | string | no | Filter by customer email address. |
data_source_uuid | string | no | Filter by ChartMogul data source UUID. |
external_id | string | no | Filter by customer external ID. |
system | string | no | Filter by billing system name, e.g. Stripe or Custom. |
chartmogul.chartmogul_get_customer 1 parameters
kosmo integrations:schema chartmogul.chartmogul_get_customer --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The ChartMogul customer UUID. |
chartmogul.chartmogul_list_subscriptions 3 parameters
kosmo integrations:schema chartmogul.chartmogul_list_subscriptions --json | Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | no | Number of results per page (default: 50, max: 200). |
cursor | string | no | Cursor from a previous response. Use only when has_more is true. |
customer_uuid | string | yes | The ChartMogul customer UUID. |
chartmogul.chartmogul_list_plans 3 parameters
kosmo integrations:schema chartmogul.chartmogul_list_plans --json | Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | no | Number of results per page (default: 50, max: 200). |
cursor | string | no | Cursor from a previous response. Use only when has_more is true. |
data_source_uuid | string | no | Filter by ChartMogul data source UUID. |
chartmogul.chartmogul_list_invoices 4 parameters
kosmo integrations:schema chartmogul.chartmogul_list_invoices --json | Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | no | Number of results per page (default: 50, max: 200). |
cursor | string | no | Cursor from a previous response. Use only when has_more is true. |
customer_uuid | string | no | Filter invoices by customer UUID. |
external_id | string | no | Filter invoices by external ID. |
chartmogul.chartmogul_get_metrics 6 parameters
kosmo integrations:schema chartmogul.chartmogul_get_metrics --json | Parameter | Type | Required | Description |
|---|---|---|---|
start_date | string | yes | Start date for the metrics period (ISO 8601, e.g. "2025-01-01"). |
end_date | string | yes | End date for the metrics period (ISO 8601, e.g. "2025-01-31"). |
interval | string | no | Interval for grouping results: "day", "week", "month", "quarter", or "year" (default: "month"). |
geo | string | no | Comma-separated ISO country codes, e.g. US,GB,DE. |
plans | string | no | Comma-separated plan UUIDs, external IDs, or names. |
filters | string | no | ChartMogul advanced filter expression. |
chartmogul.chartmogul_get_current_user 0 parameters
kosmo integrations:schema chartmogul.chartmogul_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.