AI Badger for VS Code

Copy files with their project-relative paths into ChatGPT, Claude, Grok, or another AI chat—directly from the VS Code Explorer.
When a larger question needs repository discovery, use AI Badger’s guided smart-context workflow to identify and copy only the code that matters.
Local-first · AI-provider independent · No repository uploads
Quick file copying works immediately without the Badger CLI. Smart context uses the separately installed, open-source AI Badger CLI as its local engine. Neither workflow requires an AI-provider API key.
▶ Try the AI Badger Interactive Demo
Why AI Badger?
- Useful immediately: Copy selected files with their paths without installing a CLI.
- Explorer-native workflow: Start from the project, folder, file, or multi-file selection already in VS Code.
- Focused context: Give your AI chat the relevant code and a clear question instead of the whole repository.
- Local-first processing: Direct copying stays in VS Code; smart context invokes the CLI on your machine.
- Works with your AI chat: Use the generated context with ChatGPT, Claude, Grok, or another AI chat.
- No provider key in the extension: You choose where to paste the generated context.
How it works
Quick file copy
- Select one or more files in the VS Code Explorer.
- Choose AI Badger: Copy File for AI or Copy Selected Files for AI.
- Paste the formatted files and project-relative paths into your AI chat.
Smart project context
- Start from a project, folder, file, or multi-file selection.
- Describe what you want help with.
- Follow the guided handoff to copy focused repository context into your AI chat.
Install
Install AI Badger from the Visual Studio Marketplace.
Open a repository in desktop VS Code, then right-click a file to copy it for AI.
To use smart project context, install the AI Badger CLI:
brew install pvrlabs/tap/badger
For Windows and other installation methods, see the AI Badger installation guide.
The extension is desktop-only; it is not a vscode.dev web extension.
What you can do
Copy files for an AI chat
Use these commands when you already know which files should be included. AI Badger formats the selected files with their project-relative paths and copies them immediately. Nothing is shared until you paste it.
- AI Badger: Copy File for AI — Copy one file with its project-relative path.
- AI Badger: Copy Selected Files for AI — Copy multiple files with their project-relative paths.
Ask about your code
Use these commands to start the smart-context workflow for a specific scope. These commands require the local Badger CLI.
- AI Badger: Ask About Project — Start with the entire open project as the available scope.
- AI Badger: Ask About Folder — Focus the workflow on the selected folder and its contents.
- AI Badger: Ask About File… — Ask a question about one selected file, with relevant repository context available when needed.
- AI Badger: Ask About Selected Files… — Start from multiple files selected in the Explorer.
The project command is available from the Explorer toolbar. File and folder commands are available from Explorer and editor context menus where applicable. You can also find most commands in the Command Palette.
Privacy
- Direct file copying reads only the selected files and writes the formatted context to your local clipboard.
- Smart context invokes the local AI Badger CLI and does not upload your repository to PVR Labs.
- It does not bundle or host an AI model, and it does not require an AI-provider API key.
- You control what generated context is copied and pasted into ChatGPT, Claude, Grok, or another external AI service.
Smart context sends selected paths and workflow input to the local CLI. If you deliberately paste generated context into an external AI service, that service receives what you pasted under its own terms.
Configuration and troubleshooting
- Verify the CLI with
badger --version.
- If you installed the CLI while VS Code was open, restart VS Code so it can see the updated
PATH.
- Set
aiBadger.executablePath to the full path of badger when it is not on the expected PATH.
- If an operation is reported as incompatible, upgrade the AI Badger CLI.
See the CLI compatibility guide for capability requirements and executable resolution details.
Support
Report Explorer, command, setup, webview, or VS Code integration issues in the extension repository. Report CLI or generated-context issues in the main AI Badger repository.
Development
npm ci
npm run verify
See the release guide for packaging and publishing details.
AI Badger for VS Code is published by PVR Labs.