File Tree Smart

Professional VS Code extension for generating clean Markdown file trees.
Supports smart icon rendering, .gitignore parsing (root + nested), and deterministic output.
Created by PlayRood. GitHub: PlayRood32.
Features • Installation • Usage • Building • Project-Structure
✨ Features
- Generate Markdown tree with icons
- Generate Markdown tree without icons
- Quick Pick mode selector
- Explorer folder right-click integration
- Command Palette integration
- Recursive traversal with deterministic sort (directories first)
.gitignore support from root and nested folders
- Built-in fallback ignore list when
.gitignore is missing
- Large icon map for filenames, patterns, and extensions
- Empty folder handling after filtering
- Clean final output template suitable for docs and PRs
🚀 Installation
From VSIX
# 1) Install dependencies
npm install
# 2) Compile
npm run compile
# 3) Package extension
npx vsce package
Then install the generated .vsix file in VS Code:
- Open Command Palette (
Ctrl+Shift+P)
- Run
Extensions: Install from VSIX...
- Select the generated
.vsix file
Prerequisites
- VS Code
^1.90.0
- Node.js 18+
- npm 9+
📖 Usage
- Right-click any folder in Explorer
- Choose one of:
Generate Markdown Tree (with icons)
Generate Markdown Tree (no icons)
Generate Markdown Tree...
Command Palette
- Open Command Palette
- Run one of the same commands
- If no folder context is provided, choose a workspace folder
The output opens in a new untitled Markdown editor.
# File Tree: api-service
**Generated:** 23/02/2026, 16:05:12
**Root Path:** `/home/user/work/api-service`
```
├── 📁 src
│ ├── 🟦 server.ts
│ ├── 🟦 routes.ts
│ └── 🟦 db.ts
├── 📁 prisma
│ └── ⚙️ schema.prisma
├── ⚙️ docker-compose.yml
├── 🐳 Dockerfile
├── 📦 package.json
└── 🔒📦 pnpm-lock.yaml
```
---
*Generated by File Tree Smart*
If a folder is empty after filtering:
└── (empty folder)
⚙️ Configuration
fileTreeSmart.defaultWithIcons (default: true)
fileTreeSmart.maxDepth (default: 12)
fileTreeSmart.showHiddenFiles (default: false)
fileTreeSmart.respectGitignore (default: true)
🗂️ Project Structure
file tree smart
├── 📁 src
│ ├── 📁 constants
│ │ ├── 📄 extensionConstants.ts
│ │ ├── 📄 iconMap.ts
│ │ └── 📄 ignorePatterns.ts
│ ├── 📁 utils
│ │ └── 📄 pathUtils.ts
│ ├── 📄 commands.ts
│ ├── 📄 extension.ts
│ ├── 📄 folderResolver.ts
│ ├── 📄 generationState.ts
│ ├── 📄 gitignore.ts
│ ├── 📄 icons.ts
│ ├── 📄 output.ts
│ ├── 📄 treeBuilder.ts
│ └── 📄 types.ts
├── ⚙️ .gitignore
├── 📝 README.github.md
├── 📝 README.md
├── ⚙️ package-lock.json
├── ⚙️ package.json
└── ⚙️ tsconfig.json
🛠️ Building from Source
git clone https://github.com/PlayRood32/file-tree-smart
cd file-tree-smart
npm install
npm run compile
Optional watch mode:
npm run watch
🧪 Troubleshooting
Commands are not visible in right-click menu
- Make sure you are right-clicking a folder (not a file)
- Ensure the extension is installed and enabled
- Reload VS Code window after install/update
Generated tree is empty
- Check
showHiddenFiles setting
- Check
.gitignore patterns
- Try setting
respectGitignore to false for verification
VSIX packaging fails
- Ensure
npm run compile passes
- Ensure
vsce is installed (npm i -D @vscode/vsce)
- Retry:
npx vsce package
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/awesome-improvement)
- Implement and test changes
- Commit (
git commit -m "Add awesome improvement")
- Push branch and open a Pull Request
📄 License
This project is licensed under MIT.
License: MIT
⭐ Show Your Support
If this project helps you, consider starring the repository.
