Purpose
AI Badger is a local-first repository context bridging tool, primarily serving code review, design question answering, and coding agent workflows. It helps users leverage existing AI chat tools (such as Claude, ChatGPT, Grok, etc.) to get a "second opinion" on code changes. Its core goal is to prepare focused context locally, giving users full control over what is shared with AI and avoiding wasting tokens by repeatedly submitting the entire repository.
Main Capabilities
- Local Processing: All context preparation is done locally, with no automatic uploads, no API keys required, and no telemetry data.
- Universal Compatibility: Works with any AI chat interface or local model.
- User-Controlled Sharing: Nothing is uploaded automatically; users have full control over every paste and write.
- Saves Tokens and Cost: Send only relevant context instead of repeatedly feeding the entire repository to cloud models.
- Precise and Lightweight: Built with the Go language, fast and with minimal overhead.
- Dedicated Modes: Built-in
reviewanddesignmodes, corresponding to common workflows. - Independent Review of Git Changes: Supports independent review of Git changes via CLI or VS Code extension.
- Map → Extract Flow: For deeper repository or design questions.
How to Use
Installation
- Homebrew (Recommended): Install via Homebrew.
- Quick Curl Install: Install using the Curl script.
- Other Methods: For Windows installation, building from source, etc., see docs/install.md.
- VS Code Companion Extension: An official VS Code companion extension is also provided (GitHub link).
Independently Review Git Changes
- VS Code: Use the optional companion extension, open Source Control, select "AI Badger: Copy All Changes for Review", then paste the request into AI chat. This direct review requires no CLI.
- CLI: In the project root directory, run
badger review, copy the prepared review request, and paste it into AI chat.
For Deeper Repository or Design Questions (Map → Extract)
- In the project root directory, run
badger. The interactive session starts with a Design focus by default. - Enter your goal (or leave the editor empty and press Enter to explore the project).
- Copy Prompt 1 → paste it into AI chat.
- When the AI asks for files, copy its reply → paste it back into Badger.
- Copy Prompt 2 → paste it back into the AI.
- Paste the AI's reply into Badger → review and apply changes.
Dedicated Modes
badger code: Explicitly starts with a Code focus.badger design: Explicitly starts with a Design focus, with an empty editor.
For complete usage, see docs/usage.md. Additional resources include: usage examples and walkthroughs, browser handoff guide, configuration (user limits and external context), API reference (non-interactive commands for editors and scripts), agent integration (compact repository orientation for coding agents), as well as documentation on limitations and supported projects, privacy and security, etc.
Applicable Scenarios
- Need to conduct independent review of code changes with the help of existing AI chat tools.
- Want in-depth question answering around a code repository or design questions.
- Provide compact repository orientation information in coding agent workflows.
- Developers who want to reduce token consumption and avoid uploading the entire repository.
Limitations
Specific feature limitations and supported project types are not yet listed in detail in the provided materials; refer to the "Limitations and Supported Projects" documentation in the repository.