
AI Badger
AI Badger helps you use any AI chat with your local codebase without uploading your repository or requiring an AI provider API key.
It scans a project on your machine, maps the important project structure into a compact prompt, and helps you extract only the files or code spans your AI chat requests. You stay in control of what gets copied, reviewed, and written back.
It stays local by default: no telemetry, no file uploads, and no cloud service required to prepare code context.
No API keys. No cloud dependency. No vendor lock-in.
Map → Extract → Apply: prepare focused code context for any AI chat.
Why AI Badger?
- Works with any AI chat — AI Badger prepares local code context for manual paste into ChatGPT, Claude, Gemini, or any other chat interface when you choose to use one.
- Local-first by design — normal use requires no API keys, no cloud service, no telemetry, and no network connection.
- Precise context extraction — AI can ask for
FILE:, PREFIX:, or NEAR: references, and AI Badger extracts the relevant file or nearby logical code block instead of dumping the whole repository.
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
Watch the interactive demo - See how AI Badger works in a simple animated walkthrough.
- Goal — Run
badger in your project, type a goal like Review this change for bugs, paste a git diff, and press Enter.
- Map — AIBadger scans your project and shows Prompt 1: Topology (project structure and files, not source code). Copy it and paste into any AI chat (Claude, ChatGPT, Gemini, etc.).
- Extract — The AI asks for the files it needs. Copy its reply (e.g.
FILE:internal/scanner/scanner.go) and paste it back into AIBadger. AIBadger prepares Prompt 2: Code Context with the relevant source.
- Analyze — Copy Prompt 2 back to the AI chat. The AI reads the code and responds with analysis or code changes.
- Apply — Paste the AI's final response into AIBadger, review the write plan, and confirm.
Example tasks
- Review a change before committing.
- Find bugs or performance issues in a focused area.
- Understand an unfamiliar part of a codebase.
- Make a focused implementation request.
Example review goal:
Review the following change for bugs.
[Paste git diff here]
For walkthroughs and more examples, see docs/usage.md.
Learn more