CLI overview
Install the Reflex CLI, learn the global flags, and find the right command group.
The reflex CLI is shipped as part of the Python SDK package. Use it to
authenticate, manage datasets and training runs, deploy models, and drive
robots from your terminal or from CI.
Install
pip install reflex-sdk
# or, to install into an isolated environment:
pipx install reflex-sdkTo use the WebRTC connect path you also need the optional webrtc extras:
pip install "reflex-sdk[webrtc]"Verify the install:
reflex --helpPython 3.9 or newer is required.
Global flags
Every command supports:
| Flag | Purpose |
|---|---|
--help, -h | Print help for the command or subcommand. |
--json | Emit a structured JSON response instead of human-readable. |
--json is the recommended output mode for scripts. Successful responses are
shaped as {"ok": true, ...}; errors are {"ok": false, "error": "..."}.
Authentication flags
Commands that hit the Reflex API also accept:
| Flag | Purpose |
|---|---|
--api-key | API key. Overrides REFLEX_API_KEY and the credentials file. |
--convex-url | Reflex backend URL. Defaults to production; only set if you've been told to. |
See Authentication for the full key resolution order and environment variables.
Command groups
| Group | What it does |
|---|---|
init | Scaffold a project (agentic hardware wizard when logged in). |
signup / login / logout / whoami | Create an account and manage local credentials. |
datasets | Register and validate training datasets. |
training | Start, watch, list, and stop training runs. |
artifacts | Inspect trained model artifacts. |
deployments / deploy / doctor | Create and validate deployments. |
sessions | Manage session lifecycle and promote dry_run → apply_actions. |
robots | Register robot schemas, register robots, mint pairing tokens. |
connect | Drive a robot from your terminal with a YAML config. |
agent | Run the resident device agent for dashboard-driven control. |
model | Scaffold, test, and deploy your own Policy. |
Exit codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | Any failure: validation, authentication, API error, or timeout. |
When --json is set, the JSON payload tells you why; without it, the message
is printed to stderr.
Getting help
Add --help to any command:
reflex training start --help
reflex connect --help