p202 goal list

List goals (filter by owner)

All commands

01Run it

Replace the <placeholders> with your own values, or use the builder below.

p202 goal list

02What 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
$ 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
Real output · p202 1.9.77 · demo dataexit 0

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 goal list

Set flags below; the command updates as you type.

04Flags

7 flags, plus the global flags every command takes.

FlagWhat it does
--accountboolOnly the account's goals
--allboolFetch all rows across pages
--campaign-idstringOnly this campaign's own goals
--include-archivedboolInclude archived goals
--limit, -lstringMax results
--offset, -ostringPagination offset
--registration-idstringOnly 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, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
p202 commands goal list --json
{
  "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
    }
  ]
}