KosmoKrator

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, configure, and verify
# 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
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
Provider shortcut
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.

Discovery commands
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 read
Parameters
per_page, cursor, status, email, data_source_uuid, external_id, system
Generic call
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
Shortcut
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 read
Parameters
id
Generic call
kosmo integrations:call chartmogul.chartmogul_get_customer '{"id":"example_id"}' --json
Shortcut
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 read
Parameters
per_page, cursor, customer_uuid
Generic call
kosmo integrations:call chartmogul.chartmogul_list_subscriptions '{"per_page":1,"cursor":"example_cursor","customer_uuid":"example_customer_uuid"}' --json
Shortcut
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 read
Parameters
per_page, cursor, data_source_uuid
Generic call
kosmo integrations:call chartmogul.chartmogul_list_plans '{"per_page":1,"cursor":"example_cursor","data_source_uuid":"example_data_source_uuid"}' --json
Shortcut
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 read
Parameters
per_page, cursor, customer_uuid, external_id
Generic call
kosmo integrations:call chartmogul.chartmogul_list_invoices '{"per_page":1,"cursor":"example_cursor","customer_uuid":"example_customer_uuid","external_id":"example_external_id"}' --json
Shortcut
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 read
Parameters
start_date, end_date, interval, geo, plans, filters
Generic call
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
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call chartmogul.chartmogul_get_current_user '{}' --json
Shortcut
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
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_customers --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema chartmogul.chartmogul_get_customer --json
ParameterTypeRequiredDescription
id string yes The ChartMogul customer UUID.
chartmogul.chartmogul_list_subscriptions 3 parameters
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_subscriptions --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_plans --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_invoices --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema chartmogul.chartmogul_get_metrics --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema chartmogul.chartmogul_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.