Sandbox
@PVRLabs/aibadger

Local repo context tool for AI chats

AI Badger scans your repo, picks the relevant files, and turns them into prompts you can paste into an AI chat. It is designed for a local, copy-and-paste workflow, so you keep control over what leaves your machine.

35 stars3 forksGoUpdated 6d ago
Who it's for

Builders who want their agent chat to work with a smaller, more relevant slice of a codebase.

What it delivers

You can give an AI chat precise repo context without wasting tokens on unrelated files.

What it does

Map, extract, apply workflow

Builds a first prompt from your goal, then a second prompt from the files the AI asks for, so you can move from orientation to action in steps.

Local-first context handling

Keeps everything on your machine until you copy it, with no cloud upload, API keys, or telemetry.

Specialized review and design modes

Supports `review` and `design` workflows, plus `badger code`, `badger review`, and `badger design` entry points.

Agent skills

Includes `handoff` and `badger-review` skills for continuing a session or asking for an independent review.

Non-interactive API and integrations

Provides docs for API usage, editor integration, browser handoff, and clipboard support.

How to get it

  1. 1Run
    brew install pvrlabs/tap/badger
  2. 2Run
    curl -fsSL https://raw.githubusercontent.com/PVRLabs/aibadger/main/install.sh | sh

README

AI Badger

AI Badger — Local AI Coding Context Tool

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.

GitHub stars Release License Homebrew skills.sh

No cloud • No API keys • No telemetry • Fully local

▶ Try Interactive DemoInstall

AI Badger Interactive Demo

Map → Extract → Apply: Smart local context bridge that prepares focused codebase snippets for any LLM chat.

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

Why AI Badger?

  • Universal compatibility — Works with any AI chat interface or local model
  • Local-first codebase context tool — Complete privacy, no uploads
  • Token & cost efficient — Send only relevant context instead of repeatedly feeding the whole repository to cloud models
  • Precise & lightweight — Built in Go, fast, minimal overhead
  • Specialized modesreview and design for common workflows

Install

Homebrew (Recommended)

brew install pvrlabs/tap/badger

Quick Curl Install

curl -fsSL https://raw.githubusercontent.com/PVRLabs/aibadger/main/install.sh | sh

See docs/install.md for Windows, source builds, and more.

Also available as an official VS Code companion (GitHub).

Agent Skills

Badger includes the handoff and badger-review skills for continuing an AI coding session or requesting an independent review. See the Agent Skills guide for installation, usage, and details.

Quick Start

  1. Run badger in your project root. Interactive sessions start in Design focus.
  2. Type your goal (or leave the editor empty and press Enter to explore the project).
  3. Copy Prompt 1 → paste into your AI chat.
  4. When the AI asks for files, copy its response → paste back into Badger.
  5. Copy Prompt 2 → paste back to the AI.
  6. Paste the AI’s response into Badger → review and apply changes.

Specialized Modes

  • badger code — explicitly start in Code focus
  • badger review — Git changes and bounded supporting context for immediate findings
  • badger design — explicitly start in Design focus with an empty editor

Full usage: docs/usage.md

Learn More


If AI Badger makes your coding workflow simpler, consider starring the repo ⭐

Files in the repo

Repository payload17 top-level entries
  • .github
  • assets
  • cmd
  • docs
  • internal
  • pkg
  • scripts
  • skills
  • .gitignore
  • AGENTS.md
  • CHANGELOG.md
  • go.mod
  • go.sum
  • install.ps1
  • install.sh
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k