p202 CLI Reference

Run Prosper202 ClickServer from a terminal, a script or an AI agent: reports, campaigns, tracking links, attribution and LTV.

The p202 CLI is the command line for Prosper202 ClickServer. It covers the same ground as the web UI, including reports, campaigns, tracking links, attribution and customer LTV, so you can run your tracker from a terminal, a script or an AI agent. It connects through your install's API with the same key, data and permissions as the web UI, so nothing extra goes on the server.

Getting the binary

The binary ships inside the ClickServer download at go-cli/dist/<os>-<arch>/p202. Put it on your PATH, or build it from a source checkout with cd go-cli && make build. p202 comes with Prosper202 Pro, and a 7-day trial counts. Your install checks its Customer API key for Pro. Without it, whoami and the config commands still work, but most other commands halt with a link to start the trial.

Quickstart

p202 --version
p202 config set-url https://track.example.com
p202 config set-key
p202 whoami
  1. Confirm the binary runs.
  2. Point it at the address where you open ClickServer.
  3. Add an API key created under My Account > Personal Settings. Leave the key off and p202 asks for it at a prompt that doesn't echo.
  4. See the user, roles and scopes the key acts as.

Commands by job

The reference groups its starting points by what you're trying to get done:

  • Report: clicks, conversions, revenue, cost, profit and ROI for any period, as in p202 report breakdown.
  • Optimize: the sources, keywords and countries losing money, and the ones worth more budget.
  • Launch: create a campaign, get its tracking link and test the link before spending.
  • Attribute: the touches behind each sale, and each channel's credit under different models.
  • Retain: lifetime value, repeat rate and subscription revenue, traced to the acquiring campaign.
  • Automate: hand the work to an AI agent with guardrails in place.

To find a command, p202 search matches plain words to commands offline, and p202 commands --brief prints the whole catalog, one line per command.

Built for AI agents

  • JSON output: when AI_AGENT, CLAUDECODE, GEMINI_CLI, CODEX_SANDBOX or CURSOR_AGENT is set, output switches to compact JSON (--table overrides it). Errors land on stderr as JSON, with a category, an exit code and a hint for the next step. Exit code 6 (category licence) means the install has no Pro.
  • Scoped keys: p202 whoami shows what a key can do. A read-only key suits a reporting agent, and p202 user apikey create <user_id> --scope read,stage makes a propose-only key.
  • Staged changes: on commands that support it, --staged turns a write into a proposal. A person reviews it with p202 change list and runs p202 change apply. A propose-only key can't apply its own changes.

For direct HTTP calls instead, see the Prosper202 ClickServer API.

📘

Full guide on prosper.tracking202.com

The full reference documents every command with captured output, a flag builder and the machine-readable commands.json: the Prosper202 p202 CLI reference


Did this page help you?