cwp bricks
shipped 1.0.0cwp bricks [flags]
cwp bricks groups the commands below and takes no action of its own; run it alone and it prints its help.
| Flag | What it does | Default |
|---|---|---|
--with-agent | with —dry-run on a host with no shell: install and remove the PHP agent so the plan is real | off |
| Subcommand | What it does |
|---|---|
cwp bricks status | Compare the design system on a site against the committed bricks/ tree |
cwp bricks pull | Pull the Bricks design system down into bricks/ as a tree of JSON |
cwp bricks push | Push the bricks/ tree to an environment (an upward write against a remote) |
cwp bricks audit | Report design-system rot: orphan references, unused classes, variables and colours |
cwp bricks post-types | Which post types the Bricks builder opens for (bricks_global_settings.postTypes) |
What it does
cwp bricks covers the design system, the MCP wiring and the builder’s post
types. It requires builder.id: bricks in cwp.yml.
cwp doctor checks the whole chain before you need any of it.
Omitting the environment means the local DDEV site, exactly as with
cwp open. The environment map in cwp.yml describes your
remotes. The local site is not in it. It is the one you normally point a
builder client at.
This is not a pass-through like cwp wp,
cwp shell and cwp logs. Each subcommand has an
opinion about guards and output. All of them take --json, --dry-run and
--verbose.
How cwp talks to Bricks
cwp talks to Bricks through Bricks’ own 145 abilities. It invokes them over a
PHP shim piped into wp eval-file - on whichever conduit the environment
needs. You do not need the WordPress MCP Adapter plugin for any of this: the
abilities are WordPress core’s Abilities API and exist without it. The adapter
lets an AI client reach them over HTTP. So cwp mcp is the one
command that checks for it.
Two consequences:
- It runs as a WordPress user. Every ability tests the current user, and
WP-CLI has none of its own. So cwp resolves one:
builder.options.wp_userif you set it, otherwise the first administrator. Set it explicitly on a site with several admins, or on production where you want a dedicated service account. - It needs Bricks ≥ 2.4, WordPress ≥ 6.9 and the Bricks AI surface switched
on. Bricks registers no abilities when that toggle is off or when
wp-config.phpsetsBRICKS_DISABLE_MCP.cwp brickscannot reach a site in that state.cwp doctornames which of the four causes applies. The four fixes differ.
Two commands that live elsewhere
cwp ability and cwp abilities and cwp mcp
are top-level commands. The mechanism underneath them is not Bricks’. The
transport is WordPress’s own Abilities API. mcp wires up an environment and
a credential, and every site has those.
What it does not do
It does nothing on a project whose builder.id is none, and says so.
It is not a Bricks installer, and it does not switch the AI surface on for you. That is a setting in the Bricks admin. Flipping it from a CLI would change a live site nobody asked to change.