Local-first codebase context extraction for any AI chat (Claude, ChatGPT, Grok, DeepSeek, etc.).
Get precise, token-efficient context on demand without uploading your entire repo or wasting tokens on irrelevant files.
No cloud • No API keys • No telemetry • Fully local
▶ Try Interactive Demo • Install
Map → Extract → Apply: Smart local context bridge that prepares focused codebase snippets for any LLM chat.
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
Perfect for Claude token saving, local LLM workflows, code reviews, design sessions, and debugging.
- Universal compatibility — Works with any AI chat interface or local model
- Local-first codebase context tool — Complete privacy, no uploads
- Token efficient — Stop burning agent tokens on reviews, explanations, or brainstorming
- Precise & lightweight — Built in Go, fast, minimal overhead
- Specialized modes —
reviewanddesignfor common workflows
brew install pvrlabs/tap/badgercurl -fsSL https://raw.githubusercontent.com/PVRLabs/aibadger/main/install.sh | shSee docs/install.md for Windows, source builds, and more.
Also available with an official VS Code companion.
- Run
badgerin your project root. Interactive sessions start in Design focus. - Type your goal (or leave the editor empty and press Enter to explore the project).
- Copy Prompt 1 → paste into your AI chat.
- When the AI asks for files, copy its response → paste back into Badger.
- Copy Prompt 2 → paste back to the AI.
- Paste the AI’s response into Badger → review and apply changes.
badger code— explicitly start in Code focusbadger review— Git changes and bounded supporting context for immediate findingsbadger design— explicitly start in Design focus with an empty editor
For editor integrations and scripts, the stable badger api review-context
operation generates a standalone, topology-free review request from one Git
repository; the optional review-continuation operation supplies
selector-requested context.
Full usage: docs/usage.md
- Usage Examples & Walkthrough
- Browser Handoff Guide
- API Reference — Non-interactive commands for editors and scripts
- Agent Integrations — Compact repository orientation for coding agents
- Articles
- Protocol Reference
- Limitations & Supported Projects
- Privacy & Safety
- Contributing
Star if this local AI coding context tool solves a real pain for you ⭐
Built in San Diego by PVR Labs. 🌊

