@@ -37,7 +37,7 @@ With becwright, the commit never happens:
3737> ** See it yourself in 5 seconds** — no setup, no git, nothing on your machine is
3838> touched:
3939> ``` bash
40- > npx becwright demo # zero-install · or: pipx run becwright demo
40+ > npx becwright demo # zero-install · or: uvx becwright demo · pipx run becwright demo
4141> ` ` `
4242
4343# # Get started
@@ -53,6 +53,10 @@ becwright init # detects your language, writes .bec/rules.yaml, ins
5353That' s it. From now on every ` git commit` runs the checks by itself and stops a
5454commit that breaks a blocking rule. You never call becwright by hand again.
5555
56+ > ** Which install?** ` npm install -g` to try it out or for solo use;
57+ > ` npm install --save-dev becwright` for a team repo, so the version is pinned
58+ > in ` package.json` and the hook finds it in ` node_modules/.bin` .
59+
5660- ** Existing codebase with debt?** ` becwright init --baseline` starts
5761 already-violated rules as ` warning` (nothing legitimate is blocked) and clean
5862 rules as ` blocking` . Fix the debt over time, then graduate each rule.
@@ -66,7 +70,7 @@ commit that breaks a blocking rule. You never call becwright by hand again.
6670
6771` ` ` bash
6872pnpm add -g becwright
69- pipx install becwright # or: pip install becwright
73+ pipx install becwright # or: pip install becwright / uv tool install becwright
7074npm install --save-dev becwright # project-local; the hook finds it in node_modules/.bin
7175```
7276
@@ -75,6 +79,26 @@ platform (`linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`, `win32-x64`)
7579On any other platform, use ` pipx install becwright ` .
7680</details >
7781
82+ ### Feel it block, in 90 seconds
83+
84+ The fastest way to trust a guard is to watch it stop you once:
85+
86+ ``` bash
87+ cd your-project && becwright init # rules + hook, one command
88+
89+ echo ' api_key = "AKIAIOSFODNN7EXAMPLE"' >> demo_leak.py
90+ git add demo_leak.py && git commit -m " test the guard"
91+ # BLOCK no-hardcoded-secrets (blocking)
92+ # Why it matters: a secret in the repo stays in git history forever...
93+ # >>> Commit BLOCKED: a blocking rule was broken.
94+
95+ git reset demo_leak.py && rm demo_leak.py # undo the experiment
96+ git commit -m " ..." # normal commits just pass
97+ ```
98+
99+ That loop — violate, get blocked * with the why* , fix, commit — is everything
100+ becwright does, forever, automatically.
101+
78102## Why a guard, not a sign
79103
80104An AI agent writes a module and notes * "this must never log session tokens."*
@@ -258,7 +282,29 @@ constraint, not the whole style guide re-read into context.
258282Each check is a module invoked from the `check` field. They work by searching
259283the text of your files for a pattern — simple and predictable on purpose; the
260284real value is in tying each rule to its *why*. For deeper analysis, point a
261- rule at any tool you already trust (gitleaks, ruff, semgrep) as its check.
285+ rule at any tool you already trust as its check — the rule carries the *why*,
286+ the tool does the detection :
287+
288+ ` ` ` yaml
289+ - id: no-secrets-gitleaks
290+ intent: >
291+ No secret may ever be committed, as judged by gitleaks' full ruleset.
292+ why_it_matters: >
293+ A leaked credential in git history is exposed forever, even after a revert.
294+ paths: ["**/*"]
295+ check: "gitleaks detect --no-git --redact --exit-code 1"
296+ severity: blocking
297+
298+ - id: python-passes-ruff
299+ intent: "Python code must pass the team's ruff ruleset before commit."
300+ why_it_matters: "Consistent lint keeps review focused on logic, not style."
301+ paths: ["**/*.py"]
302+ check: "xargs ruff check --force-exclude"
303+ severity: warning
304+ ` ` `
305+
306+ More ready-made patterns (semgrep, eslint, frozen paths, architecture
307+ boundaries, CI) : **[recipes](documentation/recipes.md)**.
262308
263309| Check | What it detects | Language | Suggested severity |
264310|---|---|---|---|
@@ -344,6 +390,8 @@ Full docs live in [`documentation/`](documentation/):
344390
345391- **Just getting started:** [usage](documentation/usage.md) — install, the
346392 commands, exit codes, and how to write a rule.
393+ - **Copy-paste rules for common jobs** (gitleaks/ruff/semgrep as checks, frozen
394+ paths, architecture boundaries, CI) : [recipes](documentation/recipes.md).
347395- **Want to add your own rule:** [writing checks](documentation/writing-checks.md).
348396- **Sharing rules between projects:** [portability](documentation/portability.md).
349397- **Curious how it works inside:** [architecture & flow](documentation/architecture.md).
@@ -395,8 +443,11 @@ rule that carries its *why* and travels between repos. You can even run becwrigh
395443**Do I need Python?** No. `npm i -g becwright` installs a self-contained binary;
396444` pipx install becwright` also works.
397445
398- **Does it work on Windows?** Yes, via Git Bash (the git hook is a `sh` script,
399- which Git for Windows provides). The `becwright` CLI itself is cross-platform.
446+ **Does it work on Windows?** In beta. The CLI and hook run under Git Bash
447+ (which Git for Windows provides), but Windows is not yet exercised in CI —
448+ known gaps are tracked in
449+ [#31](https://github.com/DataDave-Dev/becwright/issues/31) and first-class
450+ support is the v1.3 milestone. Until then, treat Windows as best-effort.
400451
401452**How do I ignore a single line?** Add a `becwright: ignore` comment on it.
402453
0 commit comments