01Jobs it does
Each one is a real command line. Copy it, or open it in the builder below to change it.
customer lifetime value
p202 ltv summary02What you get
Captured from the real binary, run against a demo store with 30 days of traffic. Switch tabs to see the same run as JSON, the shape scripts and agents parse.
$ p202 ltv summary --period last30 active_subscriptions: 45 aov: 122.2963 avg_ltv: 143.5652 customers: 115 mrr: 1454 purchasing_customers: 115 refunded_amount: 59 repeat_customers: 20 repeat_rate: 0.1739 total_orders: 135 total_revenue: 16510
$ p202 ltv summary --period last30 --json { "data": { "active_subscriptions": 45, "aov": 122.296296296, "avg_ltv": 143.565217391, "customers": 115, "mrr": 1454, "purchasing_customers": 115, "refunded_amount": 59, "repeat_customers": 20, "repeat_rate": 0.1739, "total_orders": 135, "total_revenue": 16510 } }
$ p202 ltv summary active_subscriptions: 45 aov: 122.2963 avg_ltv: 143.5652 customers: 115 mrr: 1454 purchasing_customers: 115 refunded_amount: 59 repeat_customers: 20 repeat_rate: 0.1739 total_orders: 135 total_revenue: 16510
$ p202 ltv summary --json { "data": { "active_subscriptions": 45, "aov": 122.296296296, "avg_ltv": 143.565217391, "customers": 115, "mrr": 1454, "purchasing_customers": 115, "refunded_amount": 59, "repeat_customers": 20, "repeat_rate": 0.1739, "total_orders": 135, "total_revenue": 16510 } }
03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 ltv summarySet flags below; the command updates as you type.
04Flags
4 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --cfstringArray | Only customers whose custom field matches: key=value, or key.min=value / key.max=value for a number or date field (repeatable, at most 3; p202 ltv fields list shows the keys) |
| --period, -pstring | Period: today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltimetodayyesterdaylast7last14last30last90thismonthlastmonththisyearlastyearalltime |
| --time-fromstring | Acquisition window start: unix seconds, a date (2026-10-01, from its first second in the account's timezone) or a time with its offset (2026-10-01T09:30:00Z) |
| --time-tostring | Acquisition window end, inclusive: unix seconds, a date (2026-10-01, through its last second in the account's timezone) or a time with its offset |
05For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands ltv summary --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
{
"path": "p202 ltv summary",
"use": "summary",
"short": "Realized LTV totals — customers, revenue, avg LTV, AOV, repeat rate, MRR",
"runnable": true,
"tasks": [
{
"run": "p202 ltv summary",
"ui_pages": [
"Analyze › Customer LTV"
],
"phrases": [
"customer lifetime value"
]
}
],
"flags": [
{
"name": "cf",
"type": "stringArray",
"default": "[]",
"usage": "Only customers whose custom field matches: key=value, or key.min=value / key.max=value for a number or date field (repeatable, at most 3; `p202 ltv fields list` shows the keys)",
"required": false
},
{
"name": "period",
"shorthand": "p",
"type": "string",
"default": "",
"usage": "Period: today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltime",
"allowed_values": [
"today",
"yesterday",
"last7",
"last14",
"last30",
"last90",
"thismonth",
"lastmonth",
"thisyear",
"lastyear",
"alltime"
],
"required": false
},
{
"name": "time-from",
"type": "string",
"default": "",
"usage": "Acquisition window start: unix seconds, a date (2026-10-01, from its first second in the account's timezone) or a time with its offset (2026-10-01T09:30:00Z)",
"required": false
},
{
"name": "time-to",
"type": "string",
"default": "",
"usage": "Acquisition window end, inclusive: unix seconds, a date (2026-10-01, through its last second in the account's timezone) or a time with its offset",
"required": false
}
]
}