Repo Structure Exporter
A VSCode extension that generates beautiful tree-style repository structure diagrams. Perfect for sharing code context with AI assistants, documentation, or team collaboration!
Features
🌳 Generate Repository Structure
- Right-click any folder in the Explorer to export its structure
- Export entire workspace via Command Palette
- Automatically respects
.gitignore rules
- Beautiful tree-style formatting with proper Unicode characters
📤 Multiple Export Options
- 📋 Copy to Clipboard - Instantly copy the structure
- 💾 Save to File - Save as .txt or .md file
- 👁️ Show in New Document - Preview in VSCode
🎯 Smart Filtering
Automatically ignores common directories:
node_modules
.git
.next
dist/build/out
.vscode, .idea
- OS files (
.DS_Store, Thumbs.db)
Plus respects your .gitignore rules!
Usage
- Right-click on any folder in the Explorer
- Select "Export Repository Structure"
- Choose how you want to export (copy/save/show)
Method 2: Command Palette
- Open Command Palette (
Ctrl+Shift+P or Cmd+Shift+P)
- Type "Export Workspace Structure"
- Select workspace folder (if multiple)
- Choose export method
Example Output
my-nextjs-app/
├── .gitignore
├── README.md
├── next.config.js
├── package.json
├── public/
│ ├── favicon.ico
│ └── images/
│ └── logo.png
├── src/
│ ├── app/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── api/
│ │ │ └── route.ts
│ │ └── dashboard/
│ │ └── page.tsx
│ ├── components/
│ │ └── ui/
│ │ ├── button.tsx
│ │ └── input.tsx
│ └── lib/
│ └── utils.ts
├── tsconfig.json
└── package-lock.json
Installation
From Source (Development)
- Clone this repository
- Run
npm install
- Press
F5 to open a new VSCode window with the extension loaded
- Test the extension in the Extension Development Host
Package and Install Locally
npm install -g @vscode/vsce
vsce package
code --install-extension repo-structure-exporter-0.1.0.vsix
Development
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
# Lint code
npm run lint
Requirements
- VSCode version 1.85.0 or higher
- Node.js 18.x or higher
Extension Settings
This extension doesn't add any VSCode settings currently. The filtering is automatic based on .gitignore.
Known Issues
None at the moment. Please report issues on the GitHub repository!
Release Notes
0.1.0
Initial release of Repo Structure Exporter!
Features:
- Tree-style structure generation
- Multiple export options (clipboard/file/preview)
- .gitignore support
- Context menu integration
- Command palette commands
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Enjoy sharing your repository structure with ease! 🌳✨