CLI Reference

Three command names point to the same entrypoint: diffpulse, diffp, and dpulse.

Commands

CommandDescription
diffpulse initScaffold .diffpulse/policy.yaml and GitHub workflow
diffpulse checkEvaluate the current branch against a base ref
diffpulse config validateValidate the policy file
diffpulse doctorCheck local environment and configuration
diffpulse versionPrint version

check options

OptionDescription
--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

CodeMeaning
0pass (or below --fail-on threshold)
1warn
2block
3error

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