Project Code Copier is a lightweight, powerful VS Code extension designed to seamlessly compile your project's code into a single, perfectly formatted block—ready to be pasted directly into AI tools like ChatGPT, Claude, or Gemini.
Instead of manually copying and pasting individual files, this extension provides a dedicated sidebar to selectively check the exact files you need, estimate token counts in real-time, and format the output exactly how AI models like it.
✨ Key Features
- Tree View Selection: Easily navigate your project and check/uncheck the exact folders and files you want to include in your AI context.
- Real-Time Token Tracking: Instantly see the estimated token count of your selected files. It updates live as you check boxes or save files, and warns you if your payload gets too large.
- Zero-Clutter Ignore Rules: * Manage ignored files (like
node_modulesorvenv) via the sidebar without adding annoying.copierignorefiles to your actual project repository.- Rules are stored securely in the extension's global storage.
- Includes a Global Ignore Template that automatically seeds new projects with your favorite defaults.
- Smart Presets: Save your current checkbox selections as a preset. The extension tracks your "Active Preset" and auto-updates it when you hit save. It even auto-saves your
[Previous State]as a safety net if you accidentally load the wrong preset! - Quick Copy Tools:
- Copy Opened Tabs: Instantly grab only the files you are currently working on.
- Copy Git Changes: Instantly copy only the files you have modified in Git.
- Toggle All: Quickly check or uncheck your entire repository with one click.
- Export to File: Over the clipboard limit? Export your context directly to an
.ai_contextfile. - Custom Formatting: Output your code as structured Markdown (default), XML, or Plain Text. You can also toggle "Minify" to strip empty lines and comments to save precious tokens.
🚀 Usage
Once installed, click the Code Copier (Copy Icon) in your VS Code Activity Bar on the left.
The Sidebar Views
- Project Files: Your workspace tree. Check the boxes for the files you want. Use the top menu buttons to quick-copy tabs, git changes, or export.
- Saved Presets: Manage your saved checkbox states here. Click a preset to load it instantly.
- Global Settings: * Project Ignore Rules: Edit the ignore rules specifically for your current open project.
- Global Ignore Template: Edit the default rules that will be applied whenever you open a brand new project.
- Format & Limits: Quick link to change your output format or clipboard limits.
Available Commands
Access these via the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) or the buttons at the top of the sidebar views:
Project Code Copier: Check All Files(Toggles all on/off)Project Code Copier: Copy Checked FilesProject Code Copier: Copy Opened TabsProject Code Copier: Copy Git ChangesProject Code Copier: Export to File (.ai_context)Project Code Copier: Update Active PresetProject Code Copier: Save As New Preset
⚙️ Settings
You can customize the extension via VS Code Settings (Ctrl+, -> search for "Project Code Copier"):
- Output Format: Choose how the compiled text looks (
Markdown,XML, orPlain Text). - Minify Code: Strip out empty lines and basic comments (
//and#) before copying to maximize your AI token limits. - Clipboard Limit Tokens: Set a safety limit (default: 100,000) to prevent freezing your clipboard with massive payloads. If exceeded, use the Export to File button instead.