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,
terminal, webhooks) and resource commands generated from the RevKeen
OpenAPI contract.
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
auth
revkeen auth login # interactive OAuth device flow
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.
revkeen api GET /v2/customers
revkeen api POST /v2/invoices -d '{"customerId":"cus_xxx"}'
revkeen api DELETE /v2/webhook-endpoints/we_xxxterminal
PAX terminal / POS management.
revkeen terminal pair --serial <serial>
revkeen terminal status
revkeen terminal pay <amount> --terminal <serial>webhooks
revkeen webhooks list
revkeen webhooks listen --forward-to http://localhost:3000/webhooksResource 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 — 24 resource groups, 117 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 |
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 |