Copy your project's file tree to clipboard while automatically respecting .gitignore rules. No more manually filtering out node_modules, virtual environments, or build directories!
- 🚫 Respects .gitignore - Automatically excludes files/folders based on your
.gitignorerules - 📁 Nested .gitignore support - Handles multiple
.gitignorefiles in subdirectories - 🖱️ Context menu - Right-click any folder to copy its tree
- ⌨️ Command palette - Use
Ctrl+Shift+P→ "Copy File Tree to Clipboard" - ⚙️ Configurable - Customize max depth, hidden files, and more
- 📋 Clean ASCII output - Beautiful tree format ready for documentation
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Search for "Gitignore Tree Copier"
- Click Install
Or install from the VS Code Marketplace.
- Right-click any folder in the Explorer
- Select "Copy File Tree to Clipboard"
- Paste anywhere!
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Copy File Tree"
- Select the command
- The workspace root tree is copied to clipboard
my-project/
├── src/
│ ├── components/
│ │ ├── Button.tsx
│ │ └── Header.tsx
│ ├── utils/
│ │ └── helpers.ts
│ └── index.ts
├── package.json
├── tsconfig.json
└── README.md
3 directories, 7 files
Notice how node_modules/, .git/, and other ignored directories are automatically excluded!
Open VS Code Settings (Ctrl+,) and search for "Gitignore Tree Copier":
| Setting | Default | Description |
|---|---|---|
gitignoreTreeCopier.maxDepth |
10 |
Maximum depth of tree traversal (1-50) |
gitignoreTreeCopier.showHiddenFiles |
false |
Include hidden files (starting with .) |
gitignoreTreeCopier.useGitignore |
true |
Respect .gitignore rules |
{
"gitignoreTreeCopier.maxDepth": 5,
"gitignoreTreeCopier.showHiddenFiles": true,
"gitignoreTreeCopier.useGitignore": true
}Existing file tree extensions copy everything, including:
node_modules/(thousands of files!)- Python
venv/or.venv/ - Build outputs (
dist/,build/,out/) - IDE folders (
.idea/,.vscode/)
This extension solves that by reading your .gitignore and filtering automatically.
- Very large projects may take a moment to process
- Symlinks are not followed
See CHANGELOG.md for version history.
Found a bug or have a feature request? Open an issue!
MIT © Darshil Doshi