Command Line (blaze)
Blaze ships with a blaze command-line tool that mirrors core app actions from your terminal. Run WP-CLI against the right PHP version, tail logs, open a shell in a site’s directory, start and stop sites — all without leaving the terminal.
The CLI talks to the running Blaze app over a local Unix socket, so the app must be running. No headless mode.
Installing the CLI
Section titled “Installing the CLI”- Open Settings → Command Line
- Click Install CLI — Blaze symlinks
/usr/local/bin/blazeto the bundled binary (requires your admin password) - When prompted, allow Blaze to install shell tab completion for zsh, bash, or fish
- Verify with
blaze --version
To remove the CLI, open the same pane and click Uninstall CLI.
Site Resolution
Section titled “Site Resolution”Commands that take a [site] argument resolve the site in this order:
- Explicit positional argument:
blaze start myblog --siteflag:blaze start --site myblog- Current working directory — if you
cdinto a site’s folder (or any subfolder),blazedetects it automatically.blaze wpwith no site argument just works.
If you mistype a site name, the CLI suggests the closest match:
Error: no site named "myblg". Did you mean "myblog"?Commands
Section titled “Commands”Inspection
Section titled “Inspection”blaze list # list all sites (alias: ls)blaze info [site] # site metadata, URL, PHP version, statusblaze doctor # check CLI ↔ app connection, PATH, completionsblaze --versionLifecycle
Section titled “Lifecycle”blaze start [site]blaze stop [site]blaze restart [site]blaze open [site] # open the site URL in your browserWP-CLI, PHP, Shell
Section titled “WP-CLI, PHP, Shell”blaze wp [site] -- <wp-cli args> # runs WP-CLI with the site's PHP versionblaze php [site] -- <args> # invokes the site's PHP binaryblaze shell [site] # spawns $SHELL with PATH and cwd set to the siteExamples:
blaze wp myblog -- plugin install woocommerce --activateblaze wp -- user list # uses cwd detectionblaze php -- -v # show PHP version for the current siteblaze logs [site] # tail the nginx error logblaze logs [site] --follow # stream new lines as they appearblaze logs [site] --php # PHP-FPM log instead of nginxTunnel (Pro)
Section titled “Tunnel (Pro)”blaze tunnel start [site]blaze tunnel stop [site]blaze tunnel statusThese require an active Blaze Pro license. Without one, the CLI exits with a clear upgrade message.
Global Flags
Section titled “Global Flags”--json— machine-readable JSON output (supported on commands that have output)--site <name>— override cwd detection--quiet— suppress non-essential output--help,--version
Example:
blaze list --json | jq '.[] | select(.status == "running")'Tab Completion
Section titled “Tab Completion”Completion is installed automatically during CLI setup. To install or reinstall it later:
blaze completion install --shell zsh # or bash, fishblaze completion uninstallCompletion covers commands, flags, and live site names — press TAB after blaze start to see the current list.
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Generic error |
| 2 | Bad usage / unknown command |
| 3 | Site not found |
| 4 | Blaze app not running |
| 5 | Pro license required |
Troubleshooting
Section titled “Troubleshooting””Blaze app isn’t running”
Section titled “”Blaze app isn’t running””The CLI requires the Blaze app to be open. Launch Blaze.app and try again — the CLI does not auto-start the app.
”Installed (different version — reinstall)”
Section titled “”Installed (different version — reinstall)””You’re running a newer Blaze app than the CLI binary on disk. Open Settings → Command Line and click Install CLI again.
blaze doctor to diagnose
Section titled “blaze doctor to diagnose”blaze doctor checks the symlink target, socket reachability, version match, and PATH. Run it first whenever something feels off.