Skip to content

cwp configure

shipped 1.0.0
cwp configure [section] [flags]

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

tree ← site

ArgumentWhat it isDefault
[section]one section: settings, features or pull (default: all three)
FlagWhat it doesDefault
--env <env>the environment to read the evidence from (default: the local site)
--yesapply every proposal without askingoff
--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

Walks the declaration section by section, with the evidence the site gives: what the census found, what the inventory names, what the tree already carries. Each section shows its proposals, each with the reason it would write beside the line, and asks once:

✓ configure settings — 2 proposal(s)
  + settings.smtp: keys: [smtp_*]
    because: coverage found 7 option(s) under smtp_* that no group carries (plugin smtp-mailer)
  + settings.core: preset: wordpress-settings
    because: coverage found the options behind the Settings screens carried by no group
? apply all 2 to cwp.yml?
✓ settings — 2 key(s) written to cwp.yml, each with its reason
✓ configure features — 1 proposal(s)
  + features.snn-brx-child-theme/seo: on
    because: the inventory names snn-brx-child-theme, and the family is known
– configure pull — nothing to propose
  review the diff before committing: git diff cwp.yml

A no to the lot asks per proposal. No section writes without a yes. The lines you wrote stay: cwp edits the file rather than re-serialising it. Every key written carries because, since and by: cwp configure (the reason beside a line).

Three sections in this cut:

sectionevidence fromproposes
settingscwp coveragea group per option prefix nothing carries; the two presets for core; nothing for an owner a family covers
featuresthe inventory and the families cwp knowsevery available family features: does not name
pullthe census and the builder’s log tablesthe log tables pull.truncate_tables does not hold yet
cwp configure                    # all three sections, against the local site
cwp configure settings           # one section
cwp configure --env prod --yes   # the evidence from prod, every proposal applied

What it does not do

  • It does not run on its own. No other command makes these proposals; they name findings, and cwp configure is where the findings become lines.
  • It does not walk content, scope, environments, perimeter or edge yet. cwp adopt derives the scope, and the rest is still the editor.
  • It does not write to the site. Reading is all it does there.

TODO