diffstat
v0.1.0
Published
CLI for categorized git diff stats between refs (code, test, docs).
Downloads
136
Maintainers
Readme
diffstat
CLI to compare git refs and show categorized diff stats for code, test, and docs files.
Also available as the diff-stat command (alias).
Install
npm
npm install -g diffstatOr run without installing:
npx diffstatLocal development
bun install
bun run devBun global link (standalone binary)
bun run install:globalThis builds a compiled executable and symlinks diffstat into Bun's global bin directory (usually ~/.bun/bin).
To remove the global link:
bun unlinkUsage
Run inside any git repository:
diffstat
diff-stat # alias
diffstat --base develop
diffstat --base abc1234 --head def5678
diffstat abc1234..def5678
diffstat --no-color
diffstat --helpExample output:
feature/auth → main
Category Files Added Removed
──────── ───── ───── ───────
Total 6 +120 -30
Code 3 +95 -25
Test 2 +20 -5
Docs 1 +5 -0Options
| Option | Description |
|--------|-------------|
| -b, --base <ref> | Base ref to compare against (default: main) |
| -H, --head <ref> | Head ref to compare (default: current branch HEAD) |
| --no-color | Disable colored terminal output |
| -h, --help | Show help |
| -v, --version | Show version |
Build
Node bundle for npm:
bun run build
node dist/cli.jsStandalone binary:
bun run build:binary
./dist/diffstatTest
bun testPublish
npm login
npm pack
npm publish --access publicLicense
MIT
