CLI reference
Ported from rex help, which is the source of truth. If this page and the binary ever
disagree, the binary is right — run rex help and
open an issue.
All commands accept --json for raw, machine-readable output. Exit codes are 0 ok,
1 command failed, 2 rexenv isn’t running.
rex status Services + DNS state (the app's ownership-and-liveness truth)rex start Start the shared stack (same as the app's Start all)rex stop Stop the shared stack (same as Stop all)rex restart stop, then startrex doctor Diagnose: DNS + resolver takeovers, edge wire identity, ports, CLI linkrex version App + CLI versions (needs the app; -v/--version works without)rex site list All sites + whether each is actually servingrex site info <domain> Full detail: config, serving state, cert, resources, WPrex site open <domain> Open https://<domain> in the browserrex site login <domain> Open a logged-in wp-admin (magic link; --print to not open)
rex site create <domain> [--name N] [--type wordpress|php|laravel] [--php 8.3] [--server nginx|frankenphp|apache] [--db mysql|mariadb] [--blueprint <name>] [--multisite subdomain|subdirectory] [--path <folder>]
rex site delete <domain> [--yes] Drops its database and docroot (asks first)rex site logs <domain> [--source K] [--lines N] [--follow]rex site rename <domain> <name> Display name only (domain unchanged)rex site domain <domain> <new-domain> Change the domain (URL rewrite; asks first)rex site move <domain> <dest-parent> Move the docroot under a new parent folderrex site env <domain> [set K=V | unset K]rex site cert <domain> [--regenerate] Certificate info / fresh leafrex blueprints Saved blueprints (for site create --blueprint)Defaults mirror the app’s New Site dialog, and WordPress sites get the one-click install.
rex php list Pinned versions: installed, default, pool portrex php default <minor> Default version for new sitesrex php install <minor>rex php uninstall <minor>rex php settings <minor> [set K=V] Whitelisted ini settings (set restarts the pool)
rex site php <domain> <minor> Switch a site's PHP versionrex site xdebug <domain> on|off Toggle the site's Xdebug debug poolrex site server <domain> nginx|frankenphp|apacheDatabases
Section titled “Databases”rex db export <domain> Dump to ~/Downloads (prints the path)rex db import <domain> <file.sql> [--yes] OVERWRITES the site's tables (asks first)rex db reset <domain> Drop + reinstall WordPress (type the domain)rex db versions [--set <engine> <version>]rex db browse Open Adminer in the browserWordPress
Section titled “WordPress”rex wp <domain> plugin list|install|activate|deactivate|update|delete [slug…] [--activate]rex wp <domain> theme list|install|activate|update|delete [slug…] [--activate]rex wp <domain> user list|create|set-password|set-role …rex wp <domain> search-replace <from> <to> [--dry-run] [--yes]rex wp <domain> cache-flush | cron run | maintenance [on|off] | core updaterex wp <domain> core versions | core switch <version>These are vetted WP-CLI operations rather than an arbitrary passthrough. For anything not
covered, the site’s Terminal tab has a full shell with the right PHP and wp on PATH.
Git-backed plugins and themes
Section titled “Git-backed plugins and themes”rex repo <domain> list [--status] --status adds live staterex repo <domain> status <dir> [--theme] Branch, changes, ahead/behind, remote, link targetrex repo <domain> branches <dir> [--theme] Local + remote branches + tagsrex repo <domain> prs <dir> [--theme] PR/MR head refs from the remote
rex repo <domain> add <url> [--branch B] [--name N] [--theme] [--install]rex repo <domain> adopt <dir> [--theme] Manage an existing checkout (metadata only)rex repo <domain> link <path> [--name N] [--theme]
rex repo <domain> pull|fetch|push <dir> [--install]rex repo <domain> checkout <dir> <ref> [--install]rex repo <domain> run <dir> <script> Run one package.json script to completionrex repo <domain> check <dir> [--theme] [--install]rex repo <domain> watch list | watch start <dir> <script> | watch stop <dir>rex repo <domain> delete <dir> [--theme] [--yes]rex repo tools [--refresh] Detected git/node (login-shell resolution)Behaviours worth knowing:
checkruns nothing. It reports whether composer/npm dependencies are missing or stale and offers the steps;--installis what actually runs them, stopping at the first failure.pullis--ff-only.pushnever forces.--installafter a git op re-installs only when the operation changed lockfiles.linksymlinks an external folder in. Deleting it later only unlinks — your real folder is never touched.addtakes publichttps/owner/repoURLs, and private repos through your own ssh keys. Output appears at completion; the live view is in the app’s panel.- Watchers run inside the app and stop when it quits.
- Checking out a listed PR ref lands you detached — those refs carry a number and a sha only.
Services, mail, tunnels
Section titled “Services, mail, tunnels”rex service start|stop <mysql|mariadb|postgres|redis|mailpit>rex logs [key] [--lines N] [--follow] No key lists all log files
rex mail List caught messages (Mailpit)rex mail open Open the Mailpit web UIrex mail clear [--yes] Deletes ALL messages
rex tunnel listrex tunnel start|stop <domain> start prints the public URLrex start/stop cover the web tier; service start|stop is for the optional engines
individually.
Everything else
Section titled “Everything else”rex tld [--set <tld>] Default TLD for new sitesrex completions zsh|bash Print a shell completion scriptrex mcp MCP stdio bridge for an AI agent's clientrex help