Right-click any folder in VS Code and instantly copy its hierarchy as a formatted text tree.
Features
- 📁 Folders only — clean structural overview
- 📄 Folders + files — full tree with every file
- 🚫 Smart ignore — skips noise like
node_modules, .git, dist automatically
- ⚙️ Configurable — add your own ignore rules via settings
- 📋 One click — result goes straight to your clipboard
Usage
Right-click any folder in the Explorer panel:
| Command |
What it copies |
| TreeExtract: Copy Folder Tree |
Folders only |
| TreeExtract: Copy Folder Tree (with files) |
Folders + files |
Then paste anywhere — READMEs, docs, Slack, Notion, etc.
Example Output
Folders only:
📁 my-project
├── 📁 src
│ ├── 📁 components
│ └── 📁 utils
├── 📁 tests
└── 📁 docs
With files:
📁 my-project
├── 📁 src
│ ├── 📁 components
│ │ ├── Button.tsx
│ │ └── Modal.tsx
│ └── index.ts
├── 📁 tests
│ └── app.test.ts
├── package.json
└── README.md
Configuration
Add to your settings.json to ignore additional folders or files:
{
"copyFolderTree.ignore": ["my-secret-folder", "tmp"]
}
Default ignored entries
node_modules · .git · .svn · .hg · dist · build · out · .next · .nuxt · __pycache__ · .pytest_cache · .mypy_cache · .DS_Store · Thumbs.db · .vscode · .idea · coverage · .nyc_output · vendor · .cargo · target
Installation
From the VS Code Marketplace
(coming soon)
From .vsix (manual)
code --install-extension local.treeextract-1.0.0.vsix
Or: open VS Code → Extensions panel → ... menu → Install from VSIX…
Build from source
git clone https://github.com/your-username/treeextract
cd treeextract
npm install
npm run package
code --install-extension treeextract-1.0.0.vsix
Contributing
- Fork the repo
- Create a feature branch:
git checkout -b feat/my-feature
- Commit your changes:
git commit -m 'feat: add my feature'
- Push and open a Pull Request
License
MIT