@dharminnagar/bruh
v0.1.1
Published
AI-powered git commit range summarizer CLI
Maintainers
Readme
bruh - Git Commit Summarizer
A Bun CLI that explains what changed in git history after a base commit by combining:
- Commit messages
- Full commit diffs (with safe truncation for large patches)
- AI-generated analysis (OpenAI, Claude, or Cloudflare Workers AI)
Install
Prerequisite: Bun must be installed on the machine where bruh runs.
Global install from npm:
npm install -g bruhOr run without installing globally:
npx bruh --helpFor local development in this repo:
bun installFirst-run setup
Run interactive setup once:
bruh --initInteractive prompts use @clack/prompts and setup now provides provider-specific model choices from a list (with a custom model option). For Cloudflare, model choices are fetched dynamically from your account when available, with built-in fallback options.
This stores provider and API key in a local config file:
- macOS:
~/Library/Application Support/bruh/config.json - Linux:
$XDG_CONFIG_HOME/bruh/config.jsonor~/.config/bruh/config.json
If config is deleted or key is missing, setup is prompted again automatically.
Usage
Analyze commits after a base commit hash:
bruh --commit <commit-hash>or positional style:
bruh <commit-hash>Options
-c, --commit <hash>: base commit hash-p, --provider <name>:openai | claude | cloudflare-k, --api-key <key>: override API key for current run-m, --model <model>: override model for current run--config <path>: custom config path-f, --format <format>:text | json | markdown(default:text)-o, --output <path>: write report to a file--init: run interactive setup-h, --help: help text
Output formats
text: human-readable terminal reportjson: machine-readable report for automationmarkdown: markdown report for docs/changelogs
In interactive terminals, the CLI now includes progress indicators for key analysis stages and a visually clearer text report hierarchy for faster scanning. When output is non-interactive (for example piped in CI), it falls back to plain deterministic logs.
Example markdown export:
bruh <commit-hash> --format markdown --output commit-report.mdProvider notes
- OpenAI uses
https://api.openai.com/v1/chat/completions - Claude uses
https://api.anthropic.com/v1/messages - Cloudflare Workers AI requires both API token and account ID
For Cloudflare, setup prompts for account ID and stores it in config.
Development
bun run check
bun run lint
bun run start -- --helpHelp and recipes
bun run src/index.ts --helpThe help output includes a quick-start path and common recipes for setup, analysis, and exports.
