01Run it
Replace the <placeholders> with your own values, or use the builder below.
p202 goal list02What 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 goal list name archived_at builtin created_at current_version definition definition_valid effective_at goal_id scope scope_id updated_at ---------------- ----------- ------- ---------- --------------- ------------------------------------------ ---------------- ------------ ------- -------- -------- ---------- trial_started 1791540186 1 {"after":[],"name":"trial_started","repea… true 1791540186 1 campaign 5 1791540186 upgraded_to_paid 1791540186 1 {"after":[1],"name":"upgraded_to_paid","r… true 1791540186 2 campaign 5 1791540186 Total: 2 | Limit: 50 | Offset: 0
$ p202 goal list --json { "data": [ { "archived_at": null, "builtin": null, "created_at": 1791540186, "current_version": 1, "definition": { "after": [], "name": "trial_started", "repeat": { "mode": "once" }, "threshold": { "count": 1 }, "trigger": { "event": "trial_started", "where": [] }, "value": { "type": "none" }, "within": null }, "definition_valid": true, "effective_at": 1791540186, "goal_id": 1, "name": "trial_started", "scope": "campaign", "scope_id": 5, "updated_at": 1791540186 }, { "archived_at": null, "builtin": null, "created_at": 1791540186, "current_version": 1, "definition": { "after": [ 1 ], "name": "upgraded_to_paid", "repeat": { "mode": "once" }, "threshold": { "count": 1 }, "trigger": { "event": "subscription_paid", "where": [] }, "value": { "amount": "29.00", "type": "fixed" }, "within": null }, "definition_valid": true, "effective_at": 1791540186, "goal_id": 2, "name": "upgraded_to_paid", "scope": "campaign", "scope_id": 5, "updated_at": 1791540186 } ], "pagination": { "limit": 50, "offset": 0, "total": 2 } }
03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 goal listSet flags below; the command updates as you type.
04Flags
7 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --accountbool | Only the account's goals |
| --allbool | Fetch all rows across pages |
| --campaign-idstring | Only this campaign's own goals |
| --include-archivedbool | Include archived goals |
| --limit, -lstring | Max results |
| --offset, -ostring | Pagination offset |
| --registration-idstring | Only this app registration's goals |
05For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands goal list --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 goal list",
"use": "list",
"short": "List goals (filter by owner)",
"runnable": true,
"flags": [
{
"name": "account",
"type": "bool",
"default": "false",
"usage": "Only the account's goals",
"required": false
},
{
"name": "all",
"type": "bool",
"default": "false",
"usage": "Fetch all rows across pages",
"required": false
},
{
"name": "campaign-id",
"type": "string",
"default": "",
"usage": "Only this campaign's own goals",
"required": false
},
{
"name": "include-archived",
"type": "bool",
"default": "false",
"usage": "Include archived goals",
"required": false
},
{
"name": "limit",
"shorthand": "l",
"type": "string",
"default": "",
"usage": "Max results",
"required": false
},
{
"name": "offset",
"shorthand": "o",
"type": "string",
"default": "",
"usage": "Pagination offset",
"required": false
},
{
"name": "registration-id",
"type": "string",
"default": "",
"usage": "Only this app registration's goals",
"required": false
}
]
}