Skip to content

cwp bricks status

shipped 1.0.0
cwp bricks status [env] [flags]

This name is an alias. The work moved to cwp status --drift, and that page documents it. This spelling still runs for one minor cycle.

Acts on the local site. Name an environment to act there instead.

ArgumentWhat it isDefault
[env]environment to compare (default: default_environment in cwp.yml)
FlagWhat it doesDefault
--alllist every item, including the ones in syncoff
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.

What it does

cwp bricks status compares the design system on a site against the committed bricks/ tree. It writes nothing on either side.

The tree is the middle, and the comparison goes through it. bricks pull writes the tree. bricks push sends it up. This command says how far apart the two ends of that one movement are. cwp content status has the same shape for pages.

Items that agree collapse to one line. A design system is mostly files that agree. The row you are looking for is the one that does not:

✓ 23 in sync
  item                            state
! styles/classes/classes.json     differs from dev
! styles/variables.json           differs from dev
– structure/templates/header.json tree only

--all lists every item instead.

tree only is its own state rather than a kind of difference: a file the tree has and the site does not is usually a push that never happened, not an edit.

It cannot say which side moved, and does not pretend to

A page carries a sync marker in its postmeta. That marker lets cwp content status tell “changed here” from “changed in the tree”. A Bricks package carries nothing of the kind. So this command has two inputs where that one has three. It reports only same or differs.

So the closing block names both directions and recommends neither:

what to do next:
  2 item(s) differ, and nothing records which side moved
  → cwp bricks pull dev — take the site's version into the tree
  → cwp bricks push dev — send the tree's version up

Two environments, compared

Run it twice, once per environment, both against the same tree. That composes, and it says which of the two moved. A direct environment-to-environment comparison would have to answer “given that dev and production differ, which one is right”. That question has no answer without the tree.

It is not bricks audit

Neither writes anything, and they answer different questions:

  • bricks audit looks for rot within one design system: orphan references, unused classes, variables nothing points at. One site, no counterpart.
  • bricks status reports the difference between two versions of the same design system, the site’s and the tree’s. Two sides, one artifact.

Example

cwp bricks status
cwp bricks status dev
cwp bricks status prod --all
cwp bricks status dev --json

What it does not do

It writes nothing, moves nothing and takes no backup. Nothing changes, so there is nothing to guard. bricks pull and bricks push are the commands that act on what it reports.

It does not compare two environments with each other, and it does not say which side is right.