Workspace Exporter
Export your entire VS Code workspace into a single TXT file, using different templates
designed for common tech stacks (React + Vite + TypeScript + Tailwind, generic web projects,
or “all text & code files”).
Features
Usage
Install Workspace Exporter from the VS Code Marketplace.
Open any folder/workspace in VS Code.
Press Ctrl+Shift+P and run one of the following commands:
- Export Workspace to TXT (Choose Template)
- Export Staged Files
- Export Changed Files
- Preview Export
If choosing a template, select one (e.g., React + Vite + TypeScript + Tailwind).
The extension generates a file (or copies to clipboard) based on your settings.
Configuration
You can customize the extension in VS Code Settings (Ctrl+,):
workspaceExporter.outputFormat:
text (default): Standard text format.
xml: Wraps files in XML tags.
markdown: Wraps files in Markdown code blocks.
workspaceExporter.includeFileTree:
true (default): Include a visual file tree at the top.
false: Disable the file tree.
workspaceExporter.copyToClipboard:
true: Copy output to clipboard.
false (default): Save to a file.
workspaceExporter.globalExcludes:
- Array of glob patterns to exclude from ALL templates (e.g.,
["**/*.test.ts"]).
workspaceExporter.customTemplates:
- Define your own templates with specific patterns and excludes.
Templates
React + Vite + TypeScript + Tailwind
Includes:
src/**/*.ts, src/**/*.tsx, src/**/*.js, src/**/*.jsx
*.html, *.css, *.scss, *.sass
- Config + metadata files (
*.json, *.mjs, *.cjs)
- Markdown files such as
README.md
Excludes:
node_modules, dist, build, .git, .idea, .vscode, coverage
Generic Web Project
Covers common web project structures with:
- HTML, CSS, JS, TS
- Markdown and config files
- Webpack/Vite/Parcel configs (as long as extensions match)
Excludes the same non-essential directories.
Node + Express API
Includes:
**/*.{js,jsx,ts,tsx,json,md}
Excludes:
node_modules, dist, build, .git, .idea, .vscode, coverage
All Text & Code Files
Useful when you want to capture the complete codebase:
Languages included:
- JavaScript, TypeScript, JSX, TSX
- HTML, CSS, SCSS, SASS
- JSON, Markdown
- Kotlin, Java
- Python, PHP, Ruby
- Go, Rust
And many more that use plain-text extensions.
Why Use Workspace Exporter?
- Quickly share an entire codebase with an AI assistant.
- Produce a clean, readable snapshot of a project for review.
- Archive all relevant source files without vendor dependencies.
- Useful for debugging, education, code audits, or project walkthroughs.
Known Limitations
- Binary files (images, fonts, compiled artifacts) are ignored by design.
- Very large workspaces may produce very large TXT outputs.
- Multi-root workspaces currently export only the first root folder.
Contributing
This project uses ESLint and Prettier for code quality.
- Run linting:
npm run lint
- Format code:
npm run format
- Run tests:
npm test
License
MIT
| |