--quiet, the hook is completely silent on a passing commit and only interrupts when there’s something to fix.
Exit code behavior
All hook runners respect non-zero exit codes to block commits. No additional configuration is needed.
--quiet mode is essential for hooks. On pass: completely silent. On fail: one summary line with the failing findings. Without --quiet, every commit prints the full scan output — which gets noisy fast.Setup
- hk (recommended)
- husky
- Plain shell
hk is a Git hook manager configured in Then install:Run
hk.pkl and committed to the repo, so every contributor gets the same hooks automatically.Add a Charter hook to hk.pkl:hk install again after any changes to hk.pkl to update the installed hooks.Threshold guidance
Set an explicit threshold to match your CI gate:charter.yaml says, so hook and CI always agree automatically:
charter.yaml has no policy section, Charter uses the built-in default of 80.
Next steps
Run Charter in GitHub Actions
Enforce the same gate on every pull request.
Policy Profiles
Set one threshold for hook and CI so they always agree.
charter.yaml Reference
Configure policy at the repo root.
charter doctor
The scan command the hook runs.