Reflex Docs
CLI

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

To use the WebRTC connect path you also need the optional webrtc extras:

pip install "reflex-sdk[webrtc]"

Verify the install:

reflex --help

Python 3.9 or newer is required.

Global flags

Every command supports:

FlagPurpose
--help, -hPrint help for the command or subcommand.
--jsonEmit 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:

FlagPurpose
--api-keyAPI key. Overrides REFLEX_API_KEY and the credentials file.
--convex-urlReflex 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

GroupWhat it does
initScaffold a project (agentic hardware wizard when logged in).
signup / login / logout / whoamiCreate an account and manage local credentials.
datasetsRegister and validate training datasets.
trainingStart, watch, list, and stop training runs.
artifactsInspect trained model artifacts.
deployments / deploy / doctorCreate and validate deployments.
sessionsManage session lifecycle and promote dry_runapply_actions.
robotsRegister robot schemas, register robots, mint pairing tokens.
connectDrive a robot from your terminal with a YAML config.
agentRun the resident device agent for dashboard-driven control.
modelScaffold, test, and deploy your own Policy.

Exit codes

CodeMeaning
0Success.
1Any 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