Command Reference
Command structure, global flags, operator commands, and resource command groups for the RevKeen CLI
The RevKeen CLI (apps/cli, a Go binary built with Cobra) has two kinds of
commands: operator commands (hand-written: auth, config, api,
cart, doctor, init, dashboard, terminal, webhooks) and resource
commands generated from the RevKeen OpenAPI contract via Climate.
Command pattern
revkeen <resource> <action> [arguments] [flags]The authoritative, always-current list for your installed version is:
revkeen --help # all top-level commands
revkeen <resource> --help # actions + flags for a resource
revkeen <resource> <action> --helpGlobal flags
Available on every command:
| Flag | Description |
|---|---|
--output, -o | Output format: table (default), json, yaml, csv |
--json | Shorthand for --output json (pretty-printed) |
--table | Shorthand for --output table |
--agent | Machine-readable mode: compact JSON, no color, errors as JSON on stderr |
--no-color | Disable colored output |
--api-key | Override the API key for this invocation |
--help, -h | Show help |
--version | Print the CLI version |
--agent, --json, and --table are mutually exclusive.
Configuration & environment
Configuration is stored in ~/.revkeen/config.toml and managed with config:
revkeen config set api-key rk_live_...
revkeen config set environment staging # or: production
revkeen config set base-url https://staging-api.revkeen.com
revkeen config set output json
revkeen config list| Variable | Description |
|---|---|
REVKEEN_API_KEY | API key (rk_live_* / rk_sandbox_*). Overrides the stored key. |
See CLI authentication → for the full precedence.
Operator commands
dashboard
revkeen dashboard # interactive TUI
revkeen # same on a TTY (opens dashboard)auth / login
revkeen login # OAuth PKCE (default)
revkeen login --device # RFC 8628 device grant
revkeen login --api-key # interactive API key
revkeen login --with-token # token from env / stdin
revkeen auth login # same as revkeen login
revkeen auth status # show current auth mode + base URL
revkeen auth logout # clear stored credentialsconfig
revkeen config set <key> <value> # api-key, base-url, environment, output
revkeen config listapi
A raw, authenticated request to any RevKeen endpoint — the escape hatch for
anything not exposed as a named command. Paths should include the /v2 prefix.
revkeen api GET /v2/customers
revkeen api POST /v2/invoices -d '{"customerId":"cus_xxx"}'
revkeen api DELETE /v2/webhook-endpoints/we_xxxcart
revkeen cart status
revkeen cart keys issue
revkeen cart origins list|add|remove
revkeen cart webhooks setup --url https://example.com/hooksdoctor
revkeen doctor --cms sanity
revkeen doctor --cms sanity --project-path ./studio --jsoninit
revkeen init --cms sanity --dry-run
revkeen init --cms sanity --path ./storefrontlisten / trigger
Forward live webhook events to your local server (Stripe CLI–style). Requires
revkeen login or REVKEEN_API_KEY, and Redis-backed Engine API (staging/prod).
revkeen listen --forward-to http://localhost:3000/webhooks
revkeen listen --forward-to http://127.0.0.1:4242/hooks --events invoice.paid,payment.succeeded
revkeen webhooks listen --forward-to http://localhost:3000/webhooks # alias
revkeen trigger payment.succeeded
revkeen trigger invoice.paidOn connect the CLI prints a session signing secret (rk_wh_…) for verifying
X-Revkeen-Signature on your local handler. trigger publishes fixtures to
active listen sessions only (no billing side effects).
Register durable HTTPS endpoints with:
revkeen webhook-endpoints list
revkeen cart webhooks setup --url https://example.com/hookswebhooks list
revkeen webhooks list # not implemented — use revkeen webhook-endpoints listterminal
PAX terminal / POS management — not implemented yet (commands return a clear error).
revkeen terminal pair --serial <serial>
revkeen terminal status
revkeen terminal pay <amount> --terminal <serial>Resource commands
Generated from the API. Common actions are list, create, get, and
update; many groups add resource-specific actions. Use
revkeen <resource> --help for the exact set.
Generated from the API contract — 25 resource groups, 118 commands. Run revkeen <resource> --help for the exact actions and flags for your installed version.
| Group | Actions |
|---|---|
analytics | revenue-mrr-summary, revenue-time-series |
cart-api-keys | status, ensure, rotate |
cart-sessions | create, get, add-line-item, update-line-item, remove-line-item, toggle-add-on, apply-discount-code, set-contact, convert |
checkout-sessions | create, get, expire |
credit-notes | list, create, get, void, list-lines, preview |
customer-meters | list, get |
customer-portal | sessions-create, customer-get, subscriptions-list, subscriptions-get, subscriptions-cancel, invoices-list, invoices-get, mandates-list, mandates-reauthorize, mandates-cancel, mandates-reauthorize-send-otp, mandates-reauthorize-verify-otp |
customers | create, list, get, update, payment-rails-get, preferred-rails-get, payment-methods-list |
dd | mandate-requests-get, validate, preview |
entitlements | list, check |
events | list, get, resend |
integrations | accounting-invoice-payment-requests-create, accounting-invoice-payment-requests-get |
invoice-line-items | list-usage-events |
invoices | list, create, get, update, margin-estimate, finalize, void, send |
mandates | create, list, get, cancel, suspend, reinstate, schedule-collection |
payment-intents | create, list, get, confirm, capture, cancel |
payment-links | create, list, get, expire, update, deactivate, activate, archive |
prices | list, create, get, update, archive |
products | list, create, get, update |
refunds | list, create, get |
storefront | products-list, products-get, origins-list, origins-create, origins-delete, status-get |
subscriptions | create, list, get, update, cancel |
transactions | list, get |
webhook-deliveries | list, get, retry |
webhook-endpoints | list, create, get, update, delete, rotate-secret |
Examples
# List and inspect
revkeen customers list
revkeen customers get cus_01HT3N... --json
revkeen invoices list -o csv
# Invoice lifecycle
revkeen invoices create
revkeen invoices finalize inv_01HT...
revkeen invoices send inv_01HT...
# Subscriptions & entitlements
revkeen subscriptions list
revkeen subscriptions cancel sub_01HT...
revkeen entitlements check --customer-id cus_01HT... --benefit-key premium
# Reporting
revkeen analytics revenue-mrr-summaryWhen you create a webhook endpoint, the API returns a signing secret. Store it immediately — it is not shown again.
Agent mode
--agent makes the CLI tool/LLM-friendly: compact JSON to stdout, errors as JSON
to stderr, and no color. Combine it with the api command for arbitrary calls:
revkeen --agent api GET /v2/customersError handling
| Scenario | Behavior |
|---|---|
| No credentials | Prompts to run revkeen auth login or set REVKEEN_API_KEY |
| API error (4xx/5xx) | Prints the API error; in --agent mode, JSON on stderr |
| Non-2xx response | Non-zero exit code |