I manage a SaaS on Creem. I used to have the dashboard open all day — checking subscriptions, looking up failed payments, generating checkout links. Now I don't open it at all.
Last Tuesday at 11pm I got a Slack alert about a past-due subscription. Instead of opening a browser, logging in, and clicking through three screens, I typed creem subs list --status past_due --json | jq '.items[] | {email: .customer.email, product: .product.name}' and had the answer in 2 seconds. Then I paused the subscription, sent the customer an email, and went back to sleep. All from the terminal.
The Creem CLI gives you three increasingly powerful ways to manage payments: direct commands for quick lookups, --json | jq pipelines for analytics and automation, and an MCP server that lets Claude or Cursor manage your store through natural language. Here's the full playbook — with a ready-to-use toolkit repo containing 9 shell scripts, MCP configs, and a Claude Code skill.
Setup (2 minutes)
brew tap armitage-labs/creem
brew install creem
creem login --api-key creem_test_xxx
creem whoami
Switch between test and live:
creem config set environment test # test-api.creem.io
creem config set environment live # api.creem.io
creem config show # verify current state
Level 1: Direct Commands
Every resource — products, subscriptions, customers, transactions, discounts — is a subcommand:
creem products list # Table view
creem subs list --status active # Filter subscriptions
creem customers list # All customers
creem txn list --limit 5 # Recent transactions
creem discounts get --code LAUNCH20 # Look up a discount
Run any resource command without a subcommand for an interactive TUI:
creem products # Navigate with j/k, select with Enter
creem subs # Same for subscriptions
creem customers # Browse and inspect
The TUI is keyboard-driven — j/k to scroll, / to search, Enter to view details. Perfect for quick lookups.
Create Resources
# New product
creem products create \
--name "Pro Plan" \
--price 2900 \
--billing-type recurring \
--billing-period every-month
# Checkout link (copy to clipboard)
creem checkouts create \
--product prod_xxx \
--success-url "https://myapp.com/thanks" \
--json | jq -r '.checkoutUrl' | pbcopy
Subscription Lifecycle
The full lifecycle without opening a browser:
creem subs list --status active # Who's paying?
creem subs get sub_xxx # Details + billing dates
creem subs pause sub_xxx # Pause billing
creem subs resume sub_xxx # Resume
creem subs cancel sub_xxx # Cancel (end of period)
creem subs cancel sub_xxx --mode immediate # Cancel now
Level 2: --json | jq Pipelines
Every command supports --json. The response shape is always { items: [...] }. This makes the CLI fully composable with jq, shell scripts, and cron jobs.
This is where the terminal approach starts beating the dashboard. You can't GROUP BY product in a web UI. You can't pipe dashboard results into a Slack webhook. You can't run your revenue report at 9am every day automatically. With --json | jq, all of that is one line.
Calculate MRR — the number every SaaS founder checks first:
creem subs list --status active --json | jq '
[.items[] | .product.price] | add / 100
'
# 125
Revenue by product:
creem txn list --json | jq '
[.items[] | select(.status=="paid")]
| group_by(.description)
| map({
product: .[0].description,
total: ([.[].amount] | add / 100),
count: length
})
| sort_by(-.total)
'
Customers by country:
creem customers list --json | jq '
[.items[] | .country]
| group_by(.) | map({country: .[0], count: length})
| sort_by(-.count)
'
High-value transactions (over $20):
creem txn list --json | jq '
[.items[] | select(.amount > 2000)]
| map({id: .id, amount: (.amount/100), status: .status})
'
Product pricing table (tab-separated for spreadsheets):
creem products list --json | jq -r '
.items[] | [.name, "$\(.price/100)", .billingPeriod] | @tsv
'
# Starter $9 every-month
# Pro $29 every-month
# Enterprise $99 every-month
# Lifetime $49 once
Find all past-due subscriptions with customer emails — this is the query I ran at 11pm on a Tuesday instead of opening the dashboard:
creem subs list --status past_due --json | jq '
.items[] | {sub: .id, email: .customer.email, product: .product.name, since: .currentPeriodEndDate}
'
Bulk generate checkout links for all products:
creem products list --json | jq -r '.items[] | .id' | while read pid; do
URL=$(creem checkouts create --product "$pid" --success-url "https://myapp.com/thanks" --json | jq -r '.checkoutUrl')
NAME=$(creem products get "$pid" --json | jq -r '.name')
echo "$NAME: $URL"
done
Daily revenue cron job:
#!/bin/bash
# Add to crontab: 0 9 * * * ~/daily-revenue.sh
REVENUE=$(creem txn list --json | jq '[.items[] | select(.status=="paid") | .amount] | add / 100')
SUBS=$(creem subs list --status active --json | jq '.items | length')
echo "$(date +%Y-%m-%d) | Revenue: \$$REVENUE | Active subs: $SUBS" >> ~/creem-daily.log
Count subscriptions by status:
for status in active trialing past_due paused canceled; do
COUNT=$(creem subs list --status $status --json | jq '.items | length')
echo "$status: $COUNT"
done
Level 3: AI Agent via MCP Server
This is where it gets wild. The creem npm package ships with an MCP server — 22 tools that any MCP-compatible AI agent can call directly via the Creem SDK. This is not a wrapper that shells out to the CLI. The MCP server calls the Creem SDK directly, which means it can do things the CLI can't — create discounts, manage licenses, upgrade subscriptions.
The key insight: other CLI-to-MCP solutions parse text output from shell commands. This one is SDK-native. The AI gets structured data and typed tool definitions, not string-munged terminal output.
Setup for Claude Code / Claude Desktop:
Add to your MCP config:
{
"mcpServers": {
"creem": {
"command": "npx",
"args": ["-y", "--package", "creem", "--", "mcp", "start",
"--api-key", "creem_test_xxx",
"--server-index", "1"]
}
}
}
For Cursor, same format in .cursor/mcp.json.
What the AI can do:
| You say | MCP tool called |
|---|---|
| "Show me all active subscriptions" | subscriptions-search-subscriptions |
| "Create a 20% discount for the Pro plan" | discounts-create |
| "Generate a checkout link for Enterprise" | checkouts-create |
| "Pause Bob's subscription" | subscriptions-pause |
| "Activate this license key" | licenses-activate |
| "Upgrade to the Enterprise plan" | subscriptions-upgrade |
The MCP server exposes tools the CLI doesn't have. discounts-create and discounts-delete are MCP-only — the CLI can read discounts but can't create them. licenses-activate/deactivate/validate and subscriptions-upgrade are also MCP-only. Through MCP, your AI agent has full CRUD access to your store.
All 22 tools:
products-get, products-create, products-search
customers-list, customers-retrieve, customers-generate-billing-links
subscriptions-get, subscriptions-cancel, subscriptions-update,
subscriptions-upgrade, subscriptions-pause, subscriptions-resume,
subscriptions-search-subscriptions
checkouts-retrieve, checkouts-create
licenses-activate, licenses-deactivate, licenses-validate
discounts-get, discounts-create, discounts-delete
transactions-get-by-id, transactions-search
stats-get-metrics-summary
Creem is one of the first payment platforms with native agent support. Their onboarding spec at creem.io/SKILL.md describes 7 routing workflows for AI agents — from selling products to managing subscriptions to handling support tickets.
Bonus: Migrate from Lemon Squeezy
Switching? One command:
creem migrate lemon-squeezy
Preview first with --dry-run:
creem migrate lemon-squeezy --dry-run
Or export the migration plan as JSON for review:
creem migrate lemon-squeezy --json > migration-plan.json
Skip discounts if you want to recreate them manually:
creem migrate lemon-squeezy --exclude-discounts
The wizard maps your products, pricing, and billing periods. No CSV exports, no manual data entry.
When to Use What
| Task | CLI | JSON + jq | MCP Agent |
|---|---|---|---|
| Quick lookup | creem subs get id |
— | "Show sub X" |
| Bulk analysis | — | jq 'group_by...' |
"Analyze churn" |
| Shell scripts | creem txn list |
pipe to jq | — |
| CI/CD | CLI commands | parse output | — |
| Checkout links | creem checkouts create |
jq .url → pbcopy |
"Create checkout" |
| Revenue metrics | — | jq math | transactions-search |
| Create discounts | — | — |
discounts-create (MCP-only) |
| License management | — | — |
licenses-activate/validate (MCP-only) |
| Migration | creem migrate |
--json > plan.json |
— |
Three interfaces, one payment platform. Use each where it's strongest.
Grab the Toolkit
All the scripts, MCP configs, and the Claude Code skill from this article are packaged in a ready-to-use repo:
git clone https://github.com/malakhov-dmitrii/creem-cli-toolkit
What's inside:
- 9 shell scripts — MRR, revenue by product, sub health, checkout links, daily cron, bulk ops, past-due alerts, customers by country, pricing table
- MCP configs — copy-paste JSON for Claude Code, Cursor, and Claude Desktop
-
Claude Code skill —
SKILL.mdwith full CLI reference and safety rules (install viaclawhub install creem-cli-toolkitor copy to.claude/skills/) - Demo script — step-through version of all 3 levels for live demos
Get Started
brew tap armitage-labs/creem && brew install creem
creem login
creem products list
Terminal to payments in 2 minutes. No dashboard required.
Video walkthrough: youtube.com/watch?v=td6hwGfLvxQ
Built for the Creem Scoops bounty program. CLI v0.1.3, MCP server via creem v1.4.4.
Top comments (0)