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.

7 functions 7 read 0 write API key auth

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: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key CHARTMOGUL_API_KEY Secret secret yes API Key
url CHARTMOGUL_URL URL url no API Base URL

Call ChartMogul Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call chartmogul.chartmogul_list_customers '{
  "per_page": 1,
  "page": 1,
  "status": "example_status",
  "email": "example_email"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:chartmogul chartmogul_list_customers '{
  "per_page": 1,
  "page": 1,
  "status": "example_status",
  "email": "example_email"
}' --json

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to ChartMogul.

chartmogul.chartmogul_list_customers

Read read

List customers from ChartMogul. Supports filtering by status or email and pagination. Returns customer details including UUID, name, email, company, and status.

Parameters
per_page, page, status, email

Generic CLI call

kosmo integrations:call chartmogul.chartmogul_list_customers '{"per_page":1,"page":1,"status":"example_status","email":"example_email"}' --json

Provider shortcut

kosmo integrations:chartmogul chartmogul_list_customers '{"per_page":1,"page":1,"status":"example_status","email":"example_email"}' --json

chartmogul.chartmogul_get_customer

Read read

Get details for a single ChartMogul customer by UUID. Returns full customer information including attributes, address, and custom fields.

Parameters
id

Generic CLI call

kosmo integrations:call chartmogul.chartmogul_get_customer '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:chartmogul chartmogul_get_customer '{"id":"example_id"}' --json

chartmogul.chartmogul_list_subscriptions

Read read

List subscriptions from ChartMogul. Supports filtering by customer UUID or status and pagination. Returns subscription details including plan, dates, and state.

Parameters
per_page, page, customer_uuid, status

Generic CLI call

kosmo integrations:call chartmogul.chartmogul_list_subscriptions '{"per_page":1,"page":1,"customer_uuid":"example_customer_uuid","status":"example_status"}' --json

Provider shortcut

kosmo integrations:chartmogul chartmogul_list_subscriptions '{"per_page":1,"page":1,"customer_uuid":"example_customer_uuid","status":"example_status"}' --json

chartmogul.chartmogul_list_plans

Read read

List billing plans from ChartMogul. Returns plan details including name, interval, amount, and currency.

Parameters
per_page, page

Generic CLI call

kosmo integrations:call chartmogul.chartmogul_list_plans '{"per_page":1,"page":1}' --json

Provider shortcut

kosmo integrations:chartmogul chartmogul_list_plans '{"per_page":1,"page":1}' --json

chartmogul.chartmogul_list_invoices

Read read

List invoices from ChartMogul. Supports filtering by customer UUID and pagination. Returns invoice details including amount, dates, line items, and status.

Parameters
per_page, page, customer_uuid

Generic CLI call

kosmo integrations:call chartmogul.chartmogul_list_invoices '{"per_page":1,"page":1,"customer_uuid":"example_customer_uuid"}' --json

Provider shortcut

kosmo integrations:chartmogul chartmogul_list_invoices '{"per_page":1,"page":1,"customer_uuid":"example_customer_uuid"}' --json

chartmogul.chartmogul_get_metrics

Read read

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.

Parameters
start_date, end_date, interval, type

Generic CLI call

kosmo integrations:call chartmogul.chartmogul_get_metrics '{"start_date":"example_start_date","end_date":"example_end_date","interval":"example_interval","type":"example_type"}' --json

Provider shortcut

kosmo integrations:chartmogul chartmogul_get_metrics '{"start_date":"example_start_date","end_date":"example_end_date","interval":"example_interval","type":"example_type"}' --json

chartmogul.chartmogul_get_current_user

Read read

Get the currently authenticated ChartMogul user. Returns user details including name, email, and account information. Useful for verifying API credentials.

Parameters
none

Generic CLI call

kosmo integrations:call chartmogul.chartmogul_get_current_user '{}' --json

Provider 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

List customers from ChartMogul. Supports filtering by status or email and pagination. Returns customer details including UUID, name, email, company, and status.

Operation
Read read
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_customers --json
ParameterTypeRequiredDescription
per_page integer no Number of results per page (default: 50, max: 200).
page integer no Page number, starting from 1 (default: 1).
status string no Filter by customer status. Common values: "Active", "Cancelled", "Future".
email string no Filter by customer email address.

chartmogul.chartmogul_get_customer

Get details for a single ChartMogul customer by UUID. Returns full customer information including attributes, address, and custom fields.

Operation
Read read
Schema command
kosmo integrations:schema chartmogul.chartmogul_get_customer --json
ParameterTypeRequiredDescription
id string yes The ChartMogul customer UUID.

chartmogul.chartmogul_list_subscriptions

List subscriptions from ChartMogul. Supports filtering by customer UUID or status and pagination. Returns subscription details including plan, dates, and state.

Operation
Read read
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_subscriptions --json
ParameterTypeRequiredDescription
per_page integer no Number of results per page (default: 50, max: 200).
page integer no Page number, starting from 1 (default: 1).
customer_uuid string no Filter subscriptions by customer UUID.
status string no Filter by subscription status. Common values: "active", "cancelled", "expired", "future".

chartmogul.chartmogul_list_plans

List billing plans from ChartMogul. Returns plan details including name, interval, amount, and currency.

Operation
Read read
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_plans --json
ParameterTypeRequiredDescription
per_page integer no Number of results per page (default: 50, max: 200).
page integer no Page number, starting from 1 (default: 1).

chartmogul.chartmogul_list_invoices

List invoices from ChartMogul. Supports filtering by customer UUID and pagination. Returns invoice details including amount, dates, line items, and status.

Operation
Read read
Schema command
kosmo integrations:schema chartmogul.chartmogul_list_invoices --json
ParameterTypeRequiredDescription
per_page integer no Number of results per page (default: 50, max: 200).
page integer no Page number, starting from 1 (default: 1).
customer_uuid string no Filter invoices by customer UUID.

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.

Operation
Read read
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", or "month" (default: "month").
type string no Type of metrics to return: "absolute" or "percentage". Omit for default.

chartmogul.chartmogul_get_current_user

Get the currently authenticated ChartMogul user. Returns user details including name, email, and account information. Useful for verifying API credentials.

Operation
Read read
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.