01Run it
Straight from the command's own help.
p202 system retention set --days 180p202 system retention set --days 002What you get
--json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 system retention setSet flags below; the command updates as you type.
04Flags
2 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --daysstringrequired | Days of click data to keep, 0-36500 (0 keeps every click) (required) |
| --force, -fbool | Set it without asking, even when it deletes more |
05How it works
Sets how many days of click data the cron job's automatic deletion keeps (0 to 36500; 0 keeps everything), for the whole install. When the new value keeps less than the current one (turning deletion on, or a shorter period) it asks first, because what the cron job deletes cannot be recovered; --force skips the question. Cannot be staged.
Needs an Admin or Super user key whose role has access_to_settings (as Account › Settings asks), and system:write.
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands system retention set --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.
- This command writes and cannot be staged:
--stagedis refused before anything is sent. Have a person run it, or give the agent a key without write scope.
{
"path": "p202 system retention set",
"use": "set --days <n>",
"short": "Set the automatic click-data deletion to N days (0 keeps every click); asks when it would keep less",
"long": "Sets how many days of click data the cron job's automatic deletion keeps (0 to 36500; 0 keeps\neverything), for the whole install. When the new value keeps less than the current one (turning\ndeletion on, or a shorter period) it asks first, because what the cron job deletes cannot be\nrecovered; --force skips the question. Cannot be staged.\n\nNeeds an Admin or Super user key whose role has access_to_settings (as Account › Settings asks), and system:write.",
"runnable": true,
"example": "p202 system retention set --days 180\n p202 system retention set --days 0",
"flags": [
{
"name": "days",
"type": "string",
"default": "",
"usage": "Days of click data to keep, 0-36500 (0 keeps every click) (required)",
"required": true
},
{
"name": "force",
"shorthand": "f",
"type": "bool",
"default": "false",
"usage": "Set it without asking, even when it deletes more",
"required": false
}
]
}