RepoBundle
Turn a repository into structured, retrieval-friendly Markdown for LLM analysis — directly from VS Code.
RepoBundle is a VS Code extension that turns a codebase into compact Markdown bundles designed for analysis by ChatGPT and other LLM tools. It preserves repository structure, records omissions explicitly, and keeps bundle sizes under predictable limits so you can share useful context without manually collecting files.
No account, API key, or external service is required. RepoBundle reads and writes files on the VS Code extension host that owns the workspace.
Getting started
- Install RepoBundle from the VS Code Extensions view.
- Open a repository or project folder.
- Click the RepoBundle icon in the Activity Bar.
- Click Bundle workspace.
- RepoBundle creates the snapshot in
_RepoBundle/ at the project root and opens 00_REPO_INDEX.md when it finishes.
You can also run RepoBundle from the Command Palette or right-click a folder in the Explorer and choose RepoBundle: Bundle This Folder.
What RepoBundle creates
A repository such as:
my-project/
src/
README.md
produces:
my-project/
src/
README.md
_RepoBundle/
00_REPO_INDEX.md
bundle_001.md
bundle_002.md
...
When the folder is in a Git work tree and _RepoBundle/ is not already ignored, RepoBundle offers to add /_RepoBundle/ to the project's .gitignore. The output directory is always excluded from RepoBundle's own discovery, even if you choose Not now.
When needed, RepoBundle also creates 01_NOT_EMBEDDED.md, an inventory of discovered files whose contents were not embedded.
00_REPO_INDEX.md is the entry point for the snapshot. It records repository metadata, bundle boundaries, file-to-bundle mappings, omissions, excluded directories, discovery mode, and a SHA-256 fingerprint of the embedded source set.
Each bundle_*.md keeps original file boundaries with headings such as:
## File: `src/example.ts`
Large text files are split into numbered parts with original line ranges instead of being silently dropped.
Why RepoBundle
- Repository-aware output — preserves paths and original file boundaries.
- LLM-friendly retrieval — starts with a compact index instead of one undifferentiated text dump.
- Predictable bundle sizes — separate preferred and hard maximum size limits.
- Explicit omissions — skipped files and excluded directories are recorded in the index.
- Git-aware discovery —
.gitignore is respected by default in Git work trees.
- Large-file support — large text files are streamed and chunked instead of loaded as one giant string.
- Project-local output — snapshots live in
_RepoBundle/ at the project root, which RepoBundle always excludes from its own discovery.
- Safe output replacement — existing non-empty output is replaced only when it is a recognized RepoBundle snapshot with no unknown entries.
- No upload step — the extension itself does not send repository contents to an external service.
RepoBundle adds a dedicated Activity Bar view with:
- one-click workspace bundling;
- live progress and cancellation;
- Git ignore, line-number, dependency, and session-only sensitive-file controls;
- editable target size, hard limit, bundle count, and excluded directories;
- latest-run metrics;
- shortcuts to the generated index and output folder.
The dashboard uses VS Code theme colors and adapts to light and dark themes.
Commands
| Command |
Purpose |
RepoBundle: Bundle Workspace |
Bundle the current workspace |
RepoBundle: Bundle This Folder |
Bundle a selected folder |
RepoBundle: Open Last Repository Index |
Open the latest generated index |
RepoBundle: Open Last Output Folder |
Open the latest output directory |
RepoBundle: Cancel Current Bundle |
Cancel the active run |
RepoBundle: Open Settings |
Open RepoBundle settings |
Settings
| Setting |
Default |
Purpose |
repoBundle.targetMb |
2.5 |
Preferred size of each Markdown bundle |
repoBundle.hardMaxMb |
3.25 |
Hard maximum size of each bundle |
repoBundle.maxBundles |
0 |
Soft bundle-count target; 0 means unlimited |
repoBundle.lineNumbers |
false |
Prefix embedded source lines with original line numbers |
repoBundle.includeDependencies |
false |
Include dependency trees and virtual environments |
repoBundle.respectGitignore |
true |
Use Git discovery in Git work trees and omit ignored files |
repoBundle.excludeDirs |
[] |
Additional directory basenames to exclude |
The dashboard also offers Include sensitive files. It is kept only in memory for the current VS Code session: bundling does not reset it, and it is not stored in workspace settings. Reloading or closing VS Code resets it to off.
Safety and privacy
RepoBundle is designed to make its behavior visible rather than silently guessing what should be shared.
By default it:
- respects
.gitignore when Git-backed discovery is available;
- excludes VCS metadata, caches, dependency/environment trees, known binary formats, and obvious credential/key files;
- does not follow directory symlinks;
- accepts file symlinks only when their resolved target stays inside the repository and re-checks the target for sensitive or binary content;
- writes to a temporary working directory before committing a completed snapshot;
- refuses to replace a non-empty output directory containing unknown user files.
RepoBundle itself does not upload repository contents. Generated bundles can still contain proprietary code or secrets stored in ordinary-looking text files. The sensitive-file filter is intentionally conservative and filename-based; it cannot guarantee that arbitrary secrets are absent. Review generated material before sharing it outside your trusted environment.
For more detail, see Privacy notes and Security policy.
Requirements
- VS Code 1.100 or later
- Windows, macOS, or Linux
- Git is optional; when unavailable, RepoBundle falls back to a filesystem scan and records that discovery mode in the index
Virtual workspaces are not supported because RepoBundle requires direct filesystem access on the extension host.
Support
Contributing
Contributions are welcome. See CONTRIBUTING.md for local development and pull-request guidelines.
License
RepoBundle is available under the MIT License.