Skip to content

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 start
rex doctor Diagnose: DNS + resolver takeovers, edge wire identity, ports, CLI link
rex version App + CLI versions (needs the app; -v/--version works without)
rex site list All sites + whether each is actually serving
rex site info <domain> Full detail: config, serving state, cert, resources, WP
rex site open <domain> Open https://<domain> in the browser
rex 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 folder
rex site env <domain> [set K=V | unset K]
rex site cert <domain> [--regenerate] Certificate info / fresh leaf
rex 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 port
rex php default <minor> Default version for new sites
rex 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 version
rex site xdebug <domain> on|off Toggle the site's Xdebug debug pool
rex site server <domain> nginx|frankenphp|apache
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 browser
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 update
rex 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.

rex repo <domain> list [--status] --status adds live state
rex repo <domain> status <dir> [--theme] Branch, changes, ahead/behind, remote, link target
rex repo <domain> branches <dir> [--theme] Local + remote branches + tags
rex 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 completion
rex 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:

  • check runs nothing. It reports whether composer/npm dependencies are missing or stale and offers the steps; --install is what actually runs them, stopping at the first failure.
  • pull is --ff-only. push never forces.
  • --install after a git op re-installs only when the operation changed lockfiles.
  • link symlinks an external folder in. Deleting it later only unlinks — your real folder is never touched.
  • add takes public https/owner/repo URLs, 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.
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 UI
rex mail clear [--yes] Deletes ALL messages
rex tunnel list
rex tunnel start|stop <domain> start prints the public URL

rex start/stop cover the web tier; service start|stop is for the optional engines individually.

rex tld [--set <tld>] Default TLD for new sites
rex completions zsh|bash Print a shell completion script
rex mcp MCP stdio bridge for an AI agent's client
rex help