CLI
Install and use the Rheo CLI to read and write workspace apps, flows, channels, experiments, analytics, rollouts, and media with a workspace API key.
Purpose
The Rheo CLI (@getrheo/cli) is a terminal client for workspace members. Use it to fetch and mutate product content (apps, flows, channels, experiments, rollouts, media) from scripts, CI, or agents without opening the dashboard.
It authenticates with a workspace API key (rheo_wk_…), not a publishable SDK key (ob_pk_…). Writes use the same capability checks as the dashboard for the key creator's current role.
Install
npm install -g @getrheo/cli
rheo --helpOr run without a global install:
npx @getrheo/cli --helpRequires Node.js 20+.
Create a workspace API key
- Sign in to the Rheo dashboard (any role: owner, admin, editor, or viewer).
- Open Account → Personal.
- Under CLI API keys, create a named key and copy the secret once.
Each key is bound to your user and one workspace. Mutations follow your live role; viewers can read but most product writes return 403.
Revoke unused keys from the same page. Rotating a key means create a new one, update login / RHEO_API_KEY, then revoke the old key.
Auth
rheo auth login --api-key rheo_wk_…
rheo auth status
rheo auth logoutCredentials are stored under ~/.config/rheo/config.json (or $XDG_CONFIG_HOME/rheo/config.json). Use --profile <name> for multiple profiles.
Aliases: rheo login / rheo logout (same as auth login / auth logout).
CI / env
export RHEO_API_KEY=rheo_wk_…
export RHEO_API_URL=https://api.getrheo.io # optional; default production
rheo apps list --json| Variable | Purpose |
|---|---|
RHEO_API_KEY | Overrides the saved profile key |
RHEO_API_URL | Overrides API base URL |
RHEO_CONFIG_PATH | Custom path for the config file |
Default API base URL: https://api.getrheo.io. Override per command with --api-url.
Role → product writes
| Role | Typical product writes |
|---|---|
| Owner | Apps, flows, channels, experiments, media, rollout policy, approve/reject |
| Admin | Apps, flows, channels, experiments, media, approve/reject (when designated) |
| Editor | Flows, channels, experiments, media, submit rollout requests |
| Viewer | Reads (product writes return 403) |
Run rheo whoami to see your workspace, role, plan, and which write capabilities the key currently has.
Global flags
| Flag | Description |
|---|---|
--json | Machine-readable list output (mutations, analytics, and stats always print JSON) |
--body <json> | Inline JSON request body for writes |
--file <path> | JSON request body from a file (writes); for media upload, the local file to upload |
--confirm-name <name> | Required for destructive app/channel delete or archive |
--profile <name> | Config profile |
--api-url <url> | Override API base URL |
-h, --help | Show help |
Prefer --file for large payloads (flow drafts, experiment configs).
Command reference
Auth and identity
rheo auth login --api-key <key> [--profile <name>] [--api-url <url>]
rheo auth logout [--profile <name>]
rheo auth status [--profile <name>]
rheo whoami
rheo workspace show # alias of whoamiApps
rheo apps list
rheo apps get <appId>
rheo apps create --body|--file
rheo apps update <appId> --body|--file
rheo apps branding <appId> --body|--file
rheo apps delete <appId> --confirm-name <name>Flows
rheo flows list <appId>
rheo flows get <flowId>
rheo flows draft <flowId> [--out <file>]
rheo flows versions <flowId>
rheo flows version <flowId> <versionId> [--out <file>]
rheo flows create <appId> --body|--file
rheo flows update <flowId> --body|--file
rheo flows save-draft <flowId> --body|--file
rheo flows publish <flowId> [--body|--file]
rheo flows archive|unarchive <flowId>
rheo flows duplicate <flowId> [--body|--file]Use --out on draft / version to write the manifest JSON to disk.
Channels
rheo channels list <appId> [--include-archived]
rheo channels history <appId> <channelId> [--limit N] [--offset N]
rheo channels create <appId> --body|--file
rheo channels update <appId> <channelId> --body|--file
rheo channels archive <appId> <channelId> --confirm-name <name>
rheo channels unarchive <appId> <channelId>
rheo channels assign <appId> <channelId> --body|--file
rheo channels unassign <appId> <channelId>Experiments
rheo experiments list <appId> [--include-archived]
rheo experiments get <experimentId>
rheo experiments stats <experimentId> [--start] [--end] [--cohorts] …
rheo experiments stats-timeseries <experimentId> …
rheo experiments cohort-keys <experimentId> …
rheo experiments cohort-values <experimentId> --dimension <dim> …
rheo experiments create <appId> --body|--file
rheo experiments update|delete <experimentId> …
rheo experiments add-variant|reorder-variants <experimentId> --body|--file
rheo experiments update-variant|delete-variant <experimentId> <variantId> …
rheo experiments status|extend|stop|promote <experimentId> --body|--fileStats commands accept optional --start / --end (UTC dates), plus cohort filters (--cohorts, --cohort-dimension, --cohort-key, --custom-key) where applicable. --dimension is required for cohort-values.
Analytics
Default environment is live. If you omit --start / --end, the CLI uses the last 7 UTC days.
rheo analytics app-overview <appId> [--env live|test] [--flow-id <id>] [--start] [--end]
rheo analytics <kind> <flowId> [--env live|test] [--version-id <id>] [--start] [--end]Flow analytics kinds: overview, funnel, dropoff, timeseries, timeseries-cohorts, cvr-heatmap, step-duration, cohorts, cohort-keys, purchases, responses.
For cohorts and timeseries-cohorts, pass --dimension. When --dimension=custom_property, also pass --custom-key.
Rollouts
rheo rollouts policy
rheo rollouts policy-set --body|--file
rheo rollouts list
rheo rollouts get <id>
rheo rollouts channel-list <appId> <channelId>
rheo rollouts submit --body|--file
rheo rollouts approve <id> [--body|--file]
rheo rollouts reject <id> [--body|--file]Media
rheo media list
rheo media sign-upload --body|--file
rheo media confirm --body|--file
rheo media upload --file <path> [--type] [--content-type] [--name]
rheo media rename <assetId> --name-stem <stem>
rheo media archive <assetId>media upload signs, uploads bytes, and confirms in one step. Omit --type / --content-type to infer from the filename.
Examples
List apps as JSON, then fetch a flow draft:
rheo apps list --json
rheo flows draft <flowId> --out draft.jsonPublish a flow after editing a draft file:
rheo flows save-draft <flowId> --file draft.json
rheo flows publish <flowId>Upload an image asset:
rheo media upload --file ./hero.png --name heroPull last-week funnel analytics for a flow (live):
rheo analytics funnel <flowId> --env liveExit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Usage error, validation failure, or non-auth HTTP error |
2 | Unauthorized or forbidden (401 / 403) |
Related
- Account settings (CLI API keys live under Personal)
- Authentication
- SDK environment
- SDK overview