← All tools

rogerchappel/patchscope

Popularity 65 Updated Content & Media

Local-first git patch risk radar with deterministic Markdown and JSON output.

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

PatchScope

PatchScope is a tiny local-first review radar for git patches. Feed it a unified diff, a staged change, stdin, or your current worktree and it returns deterministic evidence: what changed, where the risk sits, which secret-like additions were caught, and what verification commands probably matter next.

It is built for developers and agentic coding loops that want a calm pre-review check before code hits GitHub.

Why it exists

Raw diffs are noisy. PatchScope turns them into a compact map:

  • touched directories, extensions, and likely subsystems
  • review risk classes such as secret, lockfile, generated, and missing-tests
  • redacted secret-like additions
  • suggested local tests from changed paths and package scripts
  • Markdown or JSON output that stays stable for the same input

Install

Build and install the package directly from this repository:

git clone https://github.com/rogerchappel/patchscope.git
cd patchscope
npm ci
npm run build
package_archive="$(npm pack)"
npm install --global "./$package_archive"

Verify the installed CLI:

patchscope version
patchscope scan examples/feature.patch

Quick start

patchscope scan --staged
patchscope scan examples/feature.patch --json
patchscope scan --stdin --fail-on secret,huge-generated < feature.patch
patchscope suggest-tests --staged

Write a Markdown report for review:

patchscope scan --staged --out patchscope.md

Use it as a local gate:

patchscope scan --staged --fail-on secret,huge-generated

CLI