Code to AI
Copy your entire project structure and file contents to clipboard, ready to paste into ChatGPT, Claude, or any LLM.
Features
- Copy Entire Project - Run "Code to AI: Copy Entire Project" from the command palette (
Cmd+Shift+P)
- Copy a Folder - Right-click any folder in the explorer and select "Code to AI: Copy Folder"
- Copy Selected Files - Select files in the explorer, right-click, and choose "Code to AI: Copy Selected Files"
- Smart Filtering - Automatically respects
.gitignore and skips binary files, node_modules, build outputs, etc.
- File Tree - Includes a visual file tree at the top of the output
The copied text is structured as Markdown:
# Project: my-project
## File Structure
my-project/
├── src/
│ ├── index.ts
│ └── utils.ts
├── package.json
└── tsconfig.json
## File Contents
### `src/index.ts`
\`\`\`ts
// file contents here...
\`\`\`
Settings
| Setting |
Default |
Description |
codeToAi.maxFileSizeKB |
100 |
Max file size in KB to include |
codeToAi.excludePatterns |
(see below) |
Glob patterns to exclude |
codeToAi.respectGitignore |
true |
Honor .gitignore rules |
codeToAi.includeFileTree |
true |
Show file tree at top |
Default exclude patterns cover: node_modules, .git, dist, build, lock files, images, fonts, binaries, .env, __pycache__, and more.
Usage
- Open a project in VS Code
Cmd+Shift+P -> "Code to AI: Copy Entire Project"
- Paste into your LLM of choice
| |