ai-copy-context
Copy source files into an AI-ready format with one right-click.
ai-copy-context is a lightweight VS Code extension that copies files to your clipboard in a format optimized for ChatGPT, Claude, Copilot Chat, and other chat-style AI interfaces.
What it does
Right-click inside an editor (or on a file in the Explorer) and select:
Copy For GPT
Your clipboard will contain:
```typescript
// FILE src/app/example/example.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-example',
templateUrl: './example.component.html'
})
export class ExampleComponent {}
```
Ready to paste directly into an AI chat.
Why this exists
When asking AI for help with code, context matters:
- File path
- Language
- Full implementation
- Clean formatting
Preparing this manually is slow and error-prone.
ai-copy-context turns it into a single click.
How to use
- Open any file in VS Code
- Right-click inside the editor or on a file in the Explorer
- Click Copy For GPT
- Paste into your AI tool
No text selection required.
What gets copied
The extension automatically includes:
- The file’s language (for markdown fencing)
- The file’s relative path from the workspace root
- The entire file contents
Output format:
```<language>
// FILE <relative/path/to/file>
<full file contents>
---
## Features
- One-click copy
- Editor and Explorer support
- Works with any file type
- Zero configuration
- Deterministic, consistent output
---
## Privacy
All processing is done locally.
- No network access
- No telemetry
- No data collection
---
## Installation (VSIX)
1. Open VS Code
2. Press `Ctrl+Shift+P`
3. Run **Extensions: Install from VSIX…**
4. Select the `.vsix` file
5. Reload VS Code
---
## Feedback and ideas
This extension is intentionally small and opinionated.
If something feels awkward, missing, or incorrect:
- Open an issue: https://github.com/ejackman/copy-for-gpt/issues
Clear, real-world feedback drives this project.