RevKeenDocs
CLI

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

auth

revkeen auth login      # interactive OAuth device flow
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.

revkeen api GET /v2/customers
revkeen api POST /v2/invoices -d '{"customerId":"cus_xxx"}'
revkeen api DELETE /v2/webhook-endpoints/we_xxx

terminal

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/webhooks

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 — 24 resource groups, 117 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
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