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> --help

Global flags

Available on every command:

FlagDescription
--output, -oOutput format: table (default), json, yaml, csv
--jsonShorthand for --output json (pretty-printed)
--tableShorthand for --output table
--agentMachine-readable mode: compact JSON, no color, errors as JSON on stderr
--no-colorDisable colored output
--api-keyOverride the API key for this invocation
--help, -hShow help
--versionPrint 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
VariableDescription
REVKEEN_API_KEYAPI 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 credentials

config

revkeen config set <key> <value>   # api-key, base-url, environment, output
revkeen config list

api

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_xxx

cart

revkeen cart status
revkeen cart keys issue
revkeen cart origins list|add|remove
revkeen cart webhooks setup --url https://example.com/hooks

doctor

revkeen doctor --cms sanity
revkeen doctor --cms sanity --project-path ./studio --json

init

revkeen init --cms sanity --dry-run
revkeen init --cms sanity --path ./storefront

listen / 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.paid

On 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/hooks

webhooks list

revkeen webhooks list   # not implemented — use revkeen webhook-endpoints list

terminal

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.

GroupActions
analyticsrevenue-mrr-summary, revenue-time-series
cart-api-keysstatus, ensure, rotate
cart-sessionscreate, get, add-line-item, update-line-item, remove-line-item, toggle-add-on, apply-discount-code, set-contact, convert
checkout-sessionscreate, get, expire
credit-noteslist, create, get, void, list-lines, preview
customer-meterslist, get
customer-portalsessions-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
customerscreate, list, get, update, payment-rails-get, preferred-rails-get, payment-methods-list
ddmandate-requests-get, validate, preview
entitlementslist, check
eventslist, get, resend
integrationsaccounting-invoice-payment-requests-create, accounting-invoice-payment-requests-get
invoice-line-itemslist-usage-events
invoiceslist, create, get, update, margin-estimate, finalize, void, send
mandatescreate, list, get, cancel, suspend, reinstate, schedule-collection
payment-intentscreate, list, get, confirm, capture, cancel
payment-linkscreate, list, get, expire, update, deactivate, activate, archive
priceslist, create, get, update, archive
productslist, create, get, update
refundslist, create, get
storefrontproducts-list, products-get, origins-list, origins-create, origins-delete, status-get
subscriptionscreate, list, get, update, cancel
transactionslist, get
webhook-deliverieslist, get, retry
webhook-endpointslist, 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-summary

When 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/customers

Error handling

ScenarioBehavior
No credentialsPrompts 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 responseNon-zero exit code

See also

On this page