The Progressive Theme Development Rig for WordPress
The rig CLI: Complete Command Reference
Every WP Rig workflow runs through npm/Bun scripts (plus a few Composer and WP-CLI commands). This is the canonical command reference — the same list lives in the repo at docs/commands.md, and npm run with no arguments lists everything available in your checkout.
Development & build
Command
Purpose
npm run dev
Watch source files and rebuild on changes (all-in-one dev loop with live reload).
npm run dev:modern
Vite-like dev server without BrowserSync (opt-in).
npm run build
One-time build of source files without watching.
npm run build:css / build:js
Build only CSS (Lightning CSS) or JS/TS (esbuild).
Production bundle prepped for WordPress.org submission.
Initialization & setup
Command
Purpose
npm run rig-init
Install dependencies and run the interactive theme initializer (paradigm choice, dev URL, etc.).
npm run rig-init:bun
Same, with bun install.
npm run setup-child
rig-init + childify in one command (paradigm-aware child themes).
npm run block-based
Convert the theme toward a strictly block-based (FSE) setup.
npm run theme:enable-blocks
Enable block compilation (enableBlocks: true).
npm run generateCert
Generate local SSL certificates.
npm run get-dev-url
Print the resolved dev URL.
Quality & linting
Command
Purpose
npm run lint:js
ESLint on assets/js/src/**.
npm run lint:css
Stylelint with the WP Rig budget: nesting ≤ 3 levels, specificity ≤ (0,4,1), no !important, var()-required custom properties, no descending specificity. Also regenerates tokens first.
npm run fix:css
Auto-fix stylelint violations.
npm run lint:blocks
Validate block markup in templates/ + parts/ against live core block schemas.
npm run lint:patterns
Validate block patterns (metadata + markup) in patterns/ and component patterns/ dirs.
npm run ai:check
Full pre-flight gate: e2e + screenshots + all linters. Run before submitting work.
Design tokens
Command
Purpose
npm run rig:tokens
Regenerate CSS variables + theme.json (+ Tailwind when enabled) from config/tokens.json. Merges any baked overlay last.