CLI command reference

The command reference, split by command group the same way the CLI organizes itself:

  • Environment commands: init, server, destroy, lint, acf install, version
  • Partials and blocks: partial create / list / sync / check-drift / add-js / remove / install-manifest, block create / list / remove
  • Templates and static assets: template create / list / remove / validate, static compile
  • Agents and output: agents write, mcp, readme create, --format json

Every command also documents itself: wonderpress alone prints the command map, and wonderpress <command> help (or -h) prints help for that command.

Global options

These flags work across most commands and are not repeated on every page.

FlagDescription
--dir <path>Environment root (default: current directory, or the detected project root).
--theme <name>Target a theme by slug instead of the active lookup.
--env <backend>host (default) or wp-env. Needed at init; later commands read .wonderpressrc. Override per invocation with WONDERPRESS_ENV.
--format jsonStructured { ok, data, error } envelope. Unknown values are refused.
-h, --helpHelp for the current command.

Exit codes

CodeMeaning
0Success.
1Failure.
2Usage: ambiguous theme, bad flags, and similar.