CLI


The GrowPanel CLI lets you access your subscription analytics, manage data, and configure settings directly from the terminal. It's designed for scripting, automation, and AI agents.


Installation

Install globally via npm (requires Node.js 20 or later):

npm install -g growpanel-cli

Verify the installation:

growpanel --version

Authentication

You need an API key from your GrowPanel dashboard. Go to Settings > API Keys and create one. See Authentication for details.

Configure the key using one of these methods (in priority order):

CLI flag (highest priority)

growpanel --api-key YOUR_API_KEY reports summary

Environment variable

export GROWPANEL_API_KEY=YOUR_API_KEY

Config file

Create ~/.growpanelrc:

{
"api_key": "YOUR_API_KEY"
}

Quick start

# Get a summary of your key metrics
growpanel reports summary

# Get MRR timeline for 2024, broken down by month
growpanel reports mrr --date 20240101-20241231 --interval month

# List your customers
growpanel customers list

# Export all customers as CSV
growpanel exports customers > customers.csv

Output formats

The CLI auto-detects the best format based on context:

  • Terminal — Colored tables with formatted numbers
  • Piped or redirected — Raw JSON for machine consumption

Override the default with --format:

growpanel reports summary --format json
growpanel reports summary --format table
growpanel reports summary --format csv

Global options

These options work with any command:

OptionDescription
--api-key <key>API key (overrides env var and config file)
--api-url <url>API base URL (default: https://api.growpanel.io)
--format <fmt>Output format: json, table, or csv
--no-colorDisable colored output
--verboseLog HTTP requests and responses to stderr
--versionShow version number
--helpShow help for any command

Reports

Fetch any subscription analytics report by name. New reports added to the API work automatically without a CLI update.

growpanel reports <name> [options]

Report options

OptionDescription
--date <range>Date range in yyyyMMdd-yyyyMMdd format
--interval <val>Aggregation: day, week, month, quarter, year
--currency <code>Filter by currency code (e.g., usd, eur)
--region <region>Filter by geographic region
--plan <id>Filter by plan group ID
--country <code>Filter by ISO country code
--data-source <id>Filter by data source ID
--breakdown <field>Group by: plan, currency, billing_freq

Available reports

mrr, mrr-table, mrr-table-subtypes, summary, cmrr-summary, movement-table, map, cohort, leads, leads-table, leads-days, leads-summary, transactions, transactions-table, transactions-detail, transactions-summary, invoices-detail, churn-scheduled, churn-scheduled-movements, churn-scheduled-summary, customer-concentration, cashflow-failed-payments, cashflow-failed-payments-summary, cashflow-failed-payments-detail, cashflow-failed-payments-table, cashflow-refunds, cashflow-refunds-table, cashflow-refunds-detail, cashflow-failure-rate, cashflow-failure-rate-summary, cashflow-outstanding-unpaid, custom-variables

Examples

# MRR over the last year, grouped by month
growpanel reports mrr --date 20240101-20241231 --interval month

# Summary metrics as JSON
growpanel reports summary --format json

# Cohort retention filtered to USD customers
growpanel reports cohort --currency usd

# MRR broken down by plan
growpanel reports mrr --breakdown plan

# Failed payments for Q4
growpanel reports cashflow-failed-payments --date 20241001-20241231

Customers

# List all customers
growpanel customers list
growpanel customers list --limit 50 --offset 100

# Get a specific customer
growpanel customers get cus_abc123

# Trigger a resync (admin/owner only)
growpanel customers resync cus_abc123

Plans

growpanel plans list

Data management

Generic CRUD operations for data resources. Supported resources: customers, plans, plan-groups, data-sources, invoices.

Standard CRUD

growpanel data customers list
growpanel data customers get cus_abc123
growpanel data customers create --body '{"id":"cus_new","name":"Acme Inc","email":"[email protected]"}'
growpanel data customers update cus_abc123 --body '{"name":"Updated Name"}'
growpanel data customers delete cus_abc123

Data source operations

growpanel data data-sources list
growpanel data data-sources reset ds_123
growpanel data data-sources connect ds_123
growpanel data data-sources full-import ds_123
growpanel data data-sources progress ds_123
growpanel data data-sources abort ds_123

Plan group operations

growpanel data plan-groups list
growpanel data plan-groups ai-suggest --body '{"plans":["plan1","plan2"]}'
growpanel data plan-groups merge --body '{"source":"pg1","target":"pg2"}'
growpanel data plan-groups delete-multiple --body '{"ids":["pg1","pg2"]}'

Exports

Export data as CSV. Output goes directly to stdout, so redirect to a file:

growpanel exports customers > customers.csv
growpanel exports mrr-movements > movements.csv
growpanel exports customers --date 20240101-20241231 > customers_2024.csv

Settings

# Get all account settings
growpanel settings get

# Update settings
growpanel settings update --body '{"base_currency":"usd"}'

# Integration settings (GET without --body, update with --body)
growpanel settings notifications
growpanel settings notifications --body '{"email_reports":true}'
growpanel settings stripe
growpanel settings hubspot
growpanel settings webhook
growpanel settings slack
growpanel settings teams
growpanel settings looker-studio

Integrations

Manage webhook subscriptions for third-party platforms like n8n or Zapier.

growpanel integrations verify
growpanel integrations webhooks list
growpanel integrations webhooks get wh_123
growpanel integrations webhooks create --body '{"url":"https://example.com/hook","events":["customer.created"]}'
growpanel integrations webhooks delete wh_123
growpanel integrations webhooks sample customer.created

Account management

Account

growpanel account get
growpanel account update --body '{"name":"New Account Name"}'

Billing

growpanel account billing details
growpanel account billing invoices
growpanel account billing portal
growpanel account billing subscribe --body '{"plan":"pro"}'
growpanel account billing change-plan --body '{"plan":"enterprise"}'
growpanel account billing undo-cancellation

Team

growpanel account team list
growpanel account team invite --body '{"email":"[email protected]","role":"admin"}'
growpanel account team edit user_123 --body '{"role":"readonly"}'
growpanel account team remove user_123

API keys

growpanel account api-keys list
growpanel account api-keys create --body '{"name":"CI Key","role":"readonly"}'
growpanel account api-keys update key_123 --body '{"name":"Renamed"}'
growpanel account api-keys delete key_123

Generic API passthrough

Call any API endpoint directly. Useful for new endpoints or one-off requests:

# GET with query parameters
growpanel api GET /reports/mrr date=20240101-20250131 interval=month

# POST with JSON body
growpanel api POST /data/customers --body '{"name":"Acme","email":"[email protected]"}'

# DELETE
growpanel api DELETE /data/customers/cus_123

Request body input

Commands that accept a request body support three input methods:

# Inline JSON
growpanel data customers create --body '{"name":"Acme"}'

# From a file
growpanel data customers create --body @customer.json

# Piped from stdin
echo '{"name":"Acme"}' | growpanel data customers create
cat customer.json | growpanel data customers create

Usage with AI agents

The CLI is optimized for AI agents and automation:

  • JSON output by default when piped (no extra flags needed)
  • Consistent error messages on stderr, data on stdout
  • Exit code 0 on success, 1 on error
  • All commands are non-interactive
  • Detailed --help on every command
  • New API endpoints work automatically via growpanel api passthrough
# AI agent workflow
export GROWPANEL_API_KEY=your-key

# Get structured data
growpanel reports summary --format json

# Chain with jq
growpanel reports mrr --format json | jq '.[0].total_mrr'

# Pipe CSV to other tools
growpanel exports customers | csvtool col 1,2 -

Need help?

  • Run growpanel --help or growpanel <command> --help for usage details
  • Check the API documentation for endpoint specifics
  • Review Authentication for API key setup
  • Use the support widget for help