Skip to content

PVRLabs/aibadger

Repository files navigation

AI Badger

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

AI Badger 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

  1. Run badger in your project root.
  2. Type your goal (or paste a git diff).
  3. Copy Prompt 1 (Map) and paste into your AI chat.
  4. When the AI asks for files, copy its response and paste back into Badger.
  5. Copy Prompt 2 (Code Context) back to the AI.
  6. 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

About

AI Badger - Local-first code context tool that prepares your codebase for any AI chat (Claude, ChatGPT, Grok, etc.)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages