React PlumberInstall package

Reference

CLI

npx plumber --help lists every command and flag for the version you have installed. These are the ones you will use most.

CommandWhat it does
plumberA few lines about your project, and the next step.
plumber initAsks for your rules, writes the config and records the baseline.
plumber checkThe report. Once set up, new errors fail.
plumber doctorWhat is set up, and the command for what isn’t.
plumber decisionsYour tokens, where each came from and its reason.
plumber habitsEvery habit, how often it would break and whether it is on.
plumber stateWhere your project starts: no system, part of one or a whole one.
plumber proposeTokens drafted from the values your code already uses.
plumber tryJudges a snippet from standard input without touching a file.
plumber baselineRecords today’s findings as debt.
plumber acceptRecords an exception, with its reason.
plumber accept-decisionsAccepts your current tokens.
plumber ledgerLowers or prunes recorded debt.
plumber installAdds the overlay, the GitHub Action, agent instructions or hooks.
plumber agent-docsWrites PLUMBER.md for agents.
plumber craftRuns the page checks in a headless browser.

Exit codes are 0 for OK, 1 for failing findings and 2 for a usage or config error.

plumber craft

plumber craft checks the page as it renders. It opens each route of a running dev server in headless Chromium, reads the elements on it, and prints each finding at the line of JSX that made it. It also tries other widths and states, such as dark mode, hover, press and the keyboard.

sh
npx plumber craft --url http://localhost:5173/ --routes / /settings --sarif craft.sarif

It exits 1 when there are findings and 0 when there are none. It needs Playwright, which is installed separately: npm i -D playwright && npx playwright install chromium. To use a Chrome or Chromium you already have, set PLUMBER_CHROMIUM to its path. Inside the page, await window.__plumb.craft() returns the findings as plain JSON.