Export AI-ready code context directly from VS Code.
Context Exporter Plus helps developers quickly package files, folders, project structure, and code snippets into AI-friendly formats for ChatGPT, Claude, Gemini, Copilot, DeepSeek, and other AI tools.
Features
📄 Copy Current File
Copy the active file with its relative path and content.
Example:
File: src/utils/helper.ts
export function helper() {
...
}
✂️ Copy Selected Code
Copy only the selected code along with its file path.
Example:
File: src/utils/helper.ts
Selected Code:
return calculateTotal(items);
🌳 Export File Context
Export a complete AI-ready context for the current file.
Includes:
- Current File Location
- Project Structure
- Relative File Path
- File Content
Perfect for asking AI tools to explain, debug, review, or improve code.
📁 Export Folder Context
Export all supported files inside a folder.
Includes:
- Folder Path
- File List
- File Contents
Useful when sharing an entire feature or module with an AI assistant.
📚 Export Selected Files
Select multiple files in the Explorer and export them together.
Includes:
- File List
- Relative Paths
- File Contents
Ideal when AI needs context from several related files.
🏷️ Insert File Path Header
Insert a language-aware file path comment at the top of a file.
Examples:
TypeScript:
// File: src/utils/helper.ts
Python:
# File: src/utils/helper.py
HTML:
<!-- File: pages/index.html -->
The extension automatically detects supported comment styles and prevents duplicate headers.
Keyboard Shortcuts
| Command | Shortcut |
|---|---|
| Copy Current File | Ctrl + Alt + C |
| Copy Selected Code | Ctrl + Alt + S |
| Export File Context | Ctrl + Alt + T |
| Insert File Path Header | Ctrl + Alt + P |
Context Menu Integration
The extension integrates directly into:
- Command Palette
- Editor Right-Click Menu
- Explorer Right-Click Menu
No additional setup required.
Settings
Customize the exported context through VS Code settings.
Available settings:
- Tree Depth
- Max Items
- Max Folder Files
- Include Project Tree
- Include Workspace Name
- Include Current File Location
Example Export
# Context Exporter Plus
## Current File Location
app/
└── product/
└── [slug]/
└── page.tsx
## Project Structure
my-project/
├── app
├── components
├── lib
└── public
## File
app/product/[slug]/page.tsx
## Content
export default function ProductPage() {
...
}
Installation
From VS Code Marketplace
- Open Extensions (
Ctrl+Shift+X) - Search for Context Exporter Plus
- Click Install
From VSIX
code --install-extension context-exporter-plus-0.4.0.vsix
Roadmap
Planned future improvements:
- Smart Import Context
- Export Workspace Context
- Custom Export Presets
- Additional Context Builders
Contributing
Issues, suggestions, and pull requests are welcome.
GitHub Repository:
https://github.com/YashK55/context-exporter-plus
License
MIT License