Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Code BundlerNew to Visual Studio Code? Get it now.
Code Bundler

Code Bundler

Picto

|
2 installs
| (0) | Free
Bundle selected files and folders into an AI-friendly text file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Bundler

Bundle selected files and folders into a single AI-friendly text file.

Code Bundler helps you quickly package source code, configuration files, documentation, and other text-based project assets into one structured bundle that can be shared with AI assistants, reviewers, teammates, or issue reports.

Features

  • ✅ Select multiple files
  • ✅ Select multiple folders
  • ✅ Select files and folders together
  • ✅ Recursively scan selected folders
  • ✅ Automatically detect text files
  • ✅ Support UTF-8 and UTF-16 text files
  • ✅ Skip binary files automatically
  • ✅ Skip common generated and dependency directories
  • ✅ Generate a structured AI-friendly bundle
  • ✅ Include a project file tree
  • ✅ Record skipped files and directories with reasons
  • ✅ Copy the generated bundle file directly to the system clipboard
  • ✅ Open the generated bundle with one click

Perfect for AI Tools

Use the generated bundle with:

  • ChatGPT
  • GitHub Copilot
  • Claude
  • Gemini
  • DeepSeek
  • Cursor
  • Any AI tool that accepts text files

The generated bundle preserves project structure and clearly separates file contents, making it easier for AI models to understand your codebase.


What Gets Included

Code Bundler automatically includes:

  • Source code files
  • Configuration files
  • Scripts
  • Markdown documents
  • JSON, YAML, XML files
  • Text-based project assets
  • Any file that appears to contain text content

Selected folders are scanned recursively.


What Gets Skipped

Binary Files

Common binary file types are automatically skipped:

  • Images (png, jpg, gif, webp, etc.)
  • Audio files (mp3, wav, etc.)
  • Video files (mp4, mov, etc.)
  • Archives (zip, rar, 7z, etc.)
  • Executables and libraries
  • Fonts
  • Databases
  • PDF files
  • Microsoft Office documents

Ignored Directories

The following directories are skipped automatically:

node_modules
.git
dist
out
build
coverage
.vscode-test
.next
.nuxt
.turbo
.cache
target

Large Files

Very large files are skipped automatically to keep generated bundles manageable.


Usage

From Explorer

  1. Open a folder or workspace in VS Code.

  2. Select one or more files and/or folders in the Explorer.

  3. Right-click the selection.

  4. Choose:

    Code Bundler: Pack Selected Files and Folders

  5. Wait for bundling to complete.

  6. A code-bundle.txt file will be created in the workspace root.

  7. The generated file is automatically copied to the system clipboard.

  8. Optionally open the generated bundle directly from the completion notification.

Without Selection

You can also run the command and manually choose files or folders from the file picker.


Example Output

# CODE BUNDLE FOR AI ANALYSIS

## Bundle Summary

- Generated At: 2026-01-01T00:00:00.000Z
- Workspace Root Name: my-project
- Total Scanned Files: 128
- Packed Text Files: 97
- Skipped Files: 31
- Skipped Directories: 4

## Packed File Tree

README.md
src/extension.ts

<<<BEGIN_FILE path="README.md" size="2.1 KB">>>
...
<<<END_FILE path="README.md">>>

<<<BEGIN_FILE path="src/extension.ts" size="24.5 KB">>>
...
<<<END_FILE path="src/extension.ts">>>

Generated Bundle Contents

Each bundle contains:

  • Bundle summary
  • Workspace information
  • File statistics
  • Packed file tree
  • File contents with clear boundaries
  • Skipped files with reasons
  • Skipped directories with reasons

This format is designed specifically for AI-assisted code analysis.


Why Code Bundler?

When sharing code with AI tools, manually copying files often loses important context such as:

  • Project structure
  • File relationships
  • Configuration files
  • Supporting documentation

Code Bundler creates a single structured bundle that preserves this context, helping AI tools produce more accurate answers, code reviews, bug analysis, and architecture insights.


Requirements

  • VS Code 1.80.0 or newer

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft