v0.1 · Apache-2.0 · Node 20+ · git on $PATH

One command.
Every deterministic signal in your diff.

@prcompass/cli runs the PR Compass deterministic engine — triage, churn, co-change, hotspots, risk — over any git range. JSON to stdout, or --format human for a quick terminal summary.

$ npm install -g @prcompass/cli

One subcommand, one job

analyze. Takes a repo path and a diff range. Returns a single JSON document with every metric the deterministic engine produces.

Deterministic

No clock, no PRNG, no network. Same repo state plus same range → bit-identical JSON. Re-runs always agree.

Pipe-friendly

Default output is compact JSON to stdout — chain it with jq, store as NDJSON, or feed straight into a downstream tier. --pretty for humans, --format human for terminals.

Grounded numbers

Every claim in risk points to real commit SHAs in groundedIn — or it's null. Never a hallucinated 0; never an unsupported score.

Local + GitHub

LocalAdapter shells out to git — no network. GitHubAdapter (programmatic) enriches with PR metadata via your own Octokit.

Fast core, lazy I/O

Engine work is ~7 ms over 10k commits. git log dominates wall-clock — exactly as it should for a local CLI.

Single-source-of-truth output

Versioned via ANALYSIS_SCHEMA_VERSION. Pin the major version when you integrate; new metrics arrive as new top-level keys and never break parsers.

Output schema
// One document. Stable top-level keys.
{
  "version":   "0.1.0",
  "head":      { "sha": "def…", "baseSha": "abc…" },
  "pr":        null,
  "diff":      { "fileCount": 8, "files": [...] },
  "mining":    { ... },
  "hotspots":  { ... },
  "churn":     { ... },
  "cochange":  { ... },
  "risk":      { ... },
  "triage":    { "verdicts": [...] },
  "adapter":   { "name": "local" }
}

Read your repo, not your luck.

Every metric grounded by a SHA. Every run reproducible. JSON-first.

@prcompass/cli Deterministic git-diff analysis on the command line