CLI Reference
Three command names point to the same entrypoint: diffpulse,
diffp, and dpulse.
Commands
| Command | Description |
diffpulse init | Scaffold .diffpulse/policy.yaml and GitHub workflow |
diffpulse check | Evaluate the current branch against a base ref |
diffpulse config validate | Validate the policy file |
diffpulse doctor | Check local environment and configuration |
diffpulse version | Print version |
check options
| Option | Description |
--base <ref> | Base git ref (default: upstream remote, then main or master) |
--policy <path> | Policy file path (default: .diffpulse/policy.yaml) |
--format <format> | json or markdown (default: markdown) |
--output <path> | Write report to file |
--fail-on <verdict> | Exit non-zero at warn or block level (default: block) |
Exit codes
| Code | Meaning |
0 | pass (or below --fail-on threshold) |
1 | warn |
2 | block |
3 | error |
With the default --fail-on block, warnings are reported but
exit 0. Use --fail-on warn to fail on warnings.
Examples
# Scaffold policy and workflow
npx @diffpulse/cli init
# Check against main
npx @diffpulse/cli check --base main
# JSON output to file
npx @diffpulse/cli check --format json --output report.json
# Fail CI on warnings
npx @diffpulse/cli check --fail-on warn