Use this page to look up a reflex command. Run reflex <command> --help for all flags.
| Command | What it does |
|---|
login [url] | Sign in with the OAuth device flow. --scope adds scopes, --no-browser only prints the code. |
logout | Sign out and delete stored tokens. |
whoami | Show your user, scopes and what works in each project. |
context list|add|use|rm | Manage several servers. |
init | Link the repository, add the .gitignore entry, write Lua type stubs (--stubs-only, --local-only, --with-reflex-yaml). |
link [owner/project] | Link the repository to a project; matches the git remote if you give none. |
projects | List visible projects. |
status | Show server, login, linked project, local agent and git state. |
doctor | Check your setup and suggest repairs. |
update | Update the CLI (and installed skills) to your server’s version. --check only compares. |
version | Print the CLI version. |
completion | Generate a shell completion script. |
| Command | What it does |
|---|
docs [Lib[.fn]] | Show signatures, parameters and examples. --search "<text>" finds functions by intent. |
libs | List the libraries available in scripts. |
validate [files] | Check scripts and reflex.yaml without running them. --strict fails on warnings. |
run <file> | Run a script locally, or with --remote on a project agent. Flags: --job, --data, --debug, --detach, --agent-label, --changed-only, --max-size. |
exec <code> | Run inline Lua, or Python with --lang python, on the local agent. |
browser <command> | Drive a browser step by step. --remote, --engine, --session, --new-session. reflex browser help --json prints the command schema. |
secret set|unset|list|check | Manage local secrets, or write server secrets with --remote (and --dev). Values are never printed. |
agent start|stop|status|logs|update | Manage the local dev agent. It stops itself after 30 minutes unused. |
skills install|list|show | Install the Reflex skills for AI tools. Targets: claude (.claude/skills), codex (.agents/skills, also read by OpenCode), agents-md, all. |
setup ai | Sign in, link, install skills and MCP configuration for an AI tool (--tool claude|codex|opencode|all). |
| Command | What it does |
|---|
runs list | List runs. --status failed --since 24h filters. |
runs view <id> | Summary of a run, with failure analysis. |
runs logs <id> | Masked console output per step. |
runs attach <id> | Follow a run; exits 1 if it fails. |
runs failures | Failed runs grouped by root cause. |
runs reproduce <id> | Rerun on the local agent with the debugger attached. |
runs rerun <id> | Run the same script, job or suite again. |
runs cancel <id> | Cancel a queued or running run. |
runs compare | Compare a good and a bad run. |
runs replay, trace, frame, dom, try, artifacts | Read a replay. |
jobs list|get|health|run|runs|logs | Work with jobs. jobs run <name> follows the run. |
suites list|get|health|run|runs|rerun | Work with suites. rerun --failed-only reruns what failed. |
jobs/suites pause <name> [--reason "…"], resume <name> | Pause or resume a schedule without changing reflex.yaml. |
agents list|enroll|attach|wait | Provision and inspect project agents. |
api <operationId> | Call any server API operation. api list and api show discover them. |
| Command | What it does |
|---|
debug attach|wait|status|inspect|eval | Attach to a run, wait for a pause, read state, evaluate code in the paused frame. |
debug retry|skip|step|continue|restart-step|abort | Change execution. |
debug breakpoint add|list|rm | Manage breakpoints. |
debug patches [--apply] | Print the live fixes as a diff, or write them to your working copy. |
heal list|show|propose|verify|patch | Work with the heal inbox. |
heal accept|reject | Decide a heal. Needs heals:review; normally a human does this. |
See Debug from the CLI or AI and Healer.
| Command | What it does |
|---|
plan | Show what reflex.yaml would change on the server. --local-file previews your working copy. |
apply | Apply reflex.yaml (SFTP and local projects only; git projects reconcile on sync). Needs --yes without a terminal. |
jobs/suites move-to-config <name> | Propose moving a UI definition to reflex.yaml. |
jobs/suites cancel-move <name> | Cancel a pending move. |
Jobs and suites show their source in the UI: UI, reflex.yaml · git or reflex.yaml · SFTP. Yaml sources lock editing in the UI. For git, change the file and push. For SFTP, change the file and run reflex apply. Pause and resume are the only overrides, need the EDIT_JOB permission and survive syncs.
| Flag | Meaning |
|---|
--server <url> | Server URL (REFLEX_SERVER). |
--context <name> | Named server context (REFLEX_CONTEXT). |
-p, --project <owner/project> | Project (REFLEX_PROJECT). |
--json | One JSON object; NDJSON for streams. |
-y, --yes | Assume yes. Required without a terminal. |
-q, --quiet | Suppress informational messages. |
--no-color | Disable colors. |
| Code | Meaning |
|---|
| 0 | OK |
| 1 | Run or command failed |
| 2 | Usage error |
| 3 | Not signed in or no permission |
| 4 | Not found |
| 5 | Server or agent unavailable |
| 130 | Interrupted |
| What | Where |
|---|
| Servers | ~/.config/reflex/config.yaml (Windows: %APPDATA%\reflex) |
| Repository link | .reflex/project.yaml (server, project, defaultTarget: local|remote); commit it |
| Local secrets | .reflex/secrets.local (gitignored) |
| Environment | REFLEX_SERVER, REFLEX_CONTEXT, REFLEX_PROJECT, REFLEX_TOKEN, REFLEX_TARGET, REFLEX_CONFIG_DIR, REFLEX_STATE_DIR, REFLEX_CACHE_DIR |
Precedence: flags, then REFLEX_* variables, then .reflex/project.yaml, then the current context.
The agent jar comes from your server, and a managed Java runtime is installed when no Java 25 is found. The agent runs bound to 127.0.0.1 with a random key. reflex agent update --prune downloads the version your server expects. Windows arm64 is not supported, because the bundled Playwright driver does not support it. Install or cache browser binaries separately.