
AI Badger
Badger is a lightweight local bridge between your codebase and any AI chat (Claude, ChatGPT, DeepSeek, Grok, etc.).
How it works
1. Map
Enter your goal. Badger builds a prompt.
↳ You copy it → paste into your AI chat
2. Extract
AI replies asking for specific files.
↳ You copy that → paste back into Badger
3. Apply
Badger fetches those files, builds a second prompt.
↳ You copy it → paste into AI → review before writing
✓ Fully local — nothing leaves your machine until you copy it
✓ You control every paste and every write
▶ Watch the interactive demo

Map → Extract → Apply: prepare focused code context for any AI chat.
Why AI Badger?
- Works with any AI chat — Prepares clean, local code context for manual paste into any chat interface.
- Local-first by design — No API keys, no cloud service, no telemetry, and no network required.
- Precise context extraction — AI requests only the files or spans it needs using
FILE:, PREFIX:, or NEAR: selectors.
Install
Install from the public Homebrew tap:
brew tap pvrlabs/aibadger
brew install pvrlabs/aibadger/badger
Or install the latest release with curl:
curl -fsSL https://raw.githubusercontent.com/PVRLabs/aibadger/main/install.sh | sh
For source builds, release builds, version checks, and Windows install instructions, see docs/install.md.
Quick Start
- Run
badger in your project root.
- Type your goal (or paste a git diff).
- Copy Prompt 1 (Map) and paste into your AI chat.
- When the AI asks for files, copy its response and paste back into Badger.
- Copy Prompt 2 (Code Context) back to the AI.
- Paste the AI’s final response into Badger to review and apply changes.
Specialized Modes
badger review — Starts directly in review mode with the current git diff pre-loaded.
badger design — Starts in design mode, focused on architecture, tradeoffs, and planning.
For more commands, flags, and advanced usage, see docs/usage.md.
Example
badger
Then type your goal:
Help me understand how authentication works. Check @internal/auth.go
For walkthroughs and more examples, see docs/usage.md.
Learn more