Skip to main content
PlainRouter CLI 0.5.0 exposes nine commands backed by @plainrouter/sdk 0.5.0. The signed API contract also includes ingestion verification, which is available through the SDKs, direct REST, or MCP rather than a CLI command.

Global options

You can place --json on any API command. Authentication commands also support it.

Authentication

The CLI resolves configuration in this order:
  1. PLAINROUTER_TOKEN for authentication.
  2. PLAINROUTER_BASE_URL for the API origin.
  3. The token and baseUrl in the local configuration file.
  4. The production base URL, https://plainrouter.com/api/v1.

Events

Use a stable event ID when creating an event so retries remain idempotent.

Destination test operations

destinations test-mode requires exactly one of --on or --off. The test purchase accepts optional --value, --currency, and --order-id values.

Replay deliveries

Repeat --delivery-id to select multiple deliveries. You can also filter by event name and cap the number of deliveries evaluated.

Reports

The reconciliation date must use YYYY-MM-DD format.

Delete user data

The identifier type is email, phone, or external_id. The command asks for confirmation before sending the deletion request. Use --yes only in an automation that has already applied an equivalent confirmation gate:

Handle errors

The CLI writes errors to standard error and exits with status 1. Validation errors include field-level details when the API returns them. A 401 response means the tracker token is missing, invalid, or no longer active. Stop retrying and replace the credential.