UNPKG

filetree-pro

Version:

A powerful file tree generator for VS Code and Cursor. Generate beautiful file trees in multiple formats with smart exclusions and custom configurations.

295 lines (215 loc) โ€ข 8.16 kB
# ๐ŸŒณ FileTree Pro - VS Code Extension A powerful file tree generator for VS Code and Cursor. Generate beautiful file trees in multiple formats with smart exclusions and custom configurations. [![Version](https://img.shields.io/visual-studio-marketplace/v/0xtanzim.filetree-pro?style=flat-square&label=version&color=blue)](https://marketplace.visualstudio.com/items?itemName=0xtanzim.filetree-pro) [![Downloads](https://img.shields.io/visual-studio-marketplace/d/0xtanzim.filetree-pro?style=flat-square&label=downloads&color=brightgreen)](https://marketplace.visualstudio.com/items?itemName=0xtanzim.filetree-pro) [![Rating](https://img.shields.io/visual-studio-marketplace/r/0xtanzim.filetree-pro?style=flat-square&label=rating&color=yellow)](https://marketplace.visualstudio.com/items?itemName=0xtanzim.filetree-pro) [![Installs](https://img.shields.io/visual-studio-marketplace/i/0xtanzim.filetree-pro?style=flat-square&label=installs&color=orange)](https://marketplace.visualstudio.com/items?itemName=0xtanzim.filetree-pro) ## ๐Ÿ“น Demo Videos Watch FileTree Pro in action below! ### ๐Ÿงช Demo Video [![Short Demo](https://img.youtube.com/vi/EvgOWywtJjU/hqdefault.jpg)](https://youtu.be/EvgOWywtJjU) โžก๏ธ _Right-click any folder โ†’ Generate file tree in seconds!_ ## โš™๏ธ Configuration ### Quick Setup Add this to your VS Code settings (`Ctrl/Cmd + ,`): ```json { "filetree-pro.exclude": [ "**/node_modules/**", "**/dist/**", "**/.git/**", "**/.venv/**", "**/build/**", "**/coverage/**", "**/*.log", "**/*.tmp" ], "filetree-pro.showIcons": true, "filetree-pro.respectGitignore": true, "filetree-pro.useCopilot": false } ``` ### Custom Exclusions Add your own patterns to exclude files/folders: ```json { "filetree-pro.exclude": [ "**/node_modules/**", "**/my-custom-folder/**", "**/*.test.js", "**/temp/**" ] } ``` ## ๐Ÿš€ Features ### ๐Ÿ“ Smart File Tree Generation - **Right-click any folder** โ†’ Generate file tree - **Select text** โ†’ Convert to tree format - **4 Output Formats**: Markdown, JSON, SVG, ASCII - **Icon Support**: Beautiful icons for all file types - **Smart Exclusions**: Automatically excludes build files, dependencies, and temp files ### ๐ŸŒ Universal Language Support - **50+ Programming Languages**: JavaScript, Python, Java, C++, Go, Rust, Kotlin, Scala, C#, F#, Dart, R, MATLAB, Julia, Perl, Lua, Haskell, Clojure, Elixir, Erlang, OCaml, Nim, Zig, V, Assembly, and more - **Special Files**: Dockerfile, Makefile, README, LICENSE, CHANGELOG - **Web Technologies**: HTML, CSS, SCSS, Vue, Svelte - **Configuration Files**: YAML, TOML, INI, XML, JSON ### ๐ŸŽจ Multiple Export Formats | Format | Use Case | Features | | --------------- | ----------------------- | ----------------------- | | **๐Ÿ“„ Markdown** | Documentation, GitHub | Icons, clean formatting | | **๐Ÿ“Š JSON** | APIs, Data processing | Structured data, icons | | **๐ŸŽจ SVG** | Presentations, diagrams | Visual, scalable | | **๐Ÿ“ ASCII** | Universal compatibility | Plain text, portable | ### ๐Ÿ›ก๏ธ Smart Exclusions Automatically excludes common build artifacts and **respects .gitignore files**: - **Respect .gitignore**: Honors your project's .gitignore patterns - `node_modules`, `dist`, `build`, `out` - `.git`, `.venv`, `venv`, `env` - `*.log`, `*.tmp`, `*.cache` - `__pycache__`, `*.pyc` - `target`, `bin`, `obj` - `.DS_Store`, `Thumbs.db` ### โšก Performance Optimized - **Memory Management**: Efficient for large projects - **Async Processing**: Non-blocking tree generation - **Loading States**: Visual feedback during processing - **Batch Processing**: Handles 10,000+ files smoothly ## ๐ŸŽฏ Quick Start 1. **Install Extension**: Search "FileTree Pro" in VS Code Extensions 2. **Open Project**: Open any project folder in VS Code 3. **Generate Tree**: Right-click on any folder โ†’ "Generate File Tree" 4. **Choose Format**: Select Markdown, JSON, SVG, or ASCII 5. **Choose Style**: With or without icons 6. **Save**: The tree opens in an unsaved tab - save when ready! ## ๐Ÿ“ Text to Tree Conversion **New Feature!** Convert any text list into a beautiful tree format: 1. **Select text** in any editor (file paths, folder lists, etc.) 2. **Right-click** โ†’ "Convert Text to Tree" 3. **View** the converted tree in a new tab ### ๐Ÿ“น Demo Video - How to convert text to tree [![Text to Tree Conversion](https://img.youtube.com/vi/ixqyyAPhodw/hqdefault.jpg)](https://youtu.be/ixqyyAPhodw) ### Example Input ``` src/ main.js utils.js components/ Header.js Footer.js ``` ### Example Output ``` # File Tree from Text โ”œโ”€โ”€ ๐Ÿ“ src/ โ”œโ”€โ”€ ๐Ÿ“„ main.js โ”œโ”€โ”€ ๐Ÿ“„ utils.js โ”œโ”€โ”€ ๐Ÿ“ components/ โ”œโ”€โ”€ ๐Ÿ“„ Header.js โ””โ”€โ”€ ๐Ÿ“„ Footer.js *Generated by FileTree Pro Extension* ``` ## ๐Ÿ“น Video Guide Watch this quick demo to see FileTree Pro in action: [![Short Demo](https://img.youtube.com/vi/EvgOWywtJjU/hqdefault.jpg)](https://youtu.be/EvgOWywtJjU) _Video shows: Right-click on folder โ†’ Generate File Tree โ†’ Choose format โ†’ View beautiful tree output_ ## ๐Ÿ“‹ Commands - `Generate File Tree` - Right-click on folder to generate tree - `Convert Text to Tree` - Select text and convert to tree format - `Refresh Tree` - Regenerate with current settings - `Export Tree` - Export in different formats ## ๐ŸŽจ Examples ### Markdown Output ``` # File Tree: my-project โ”œโ”€โ”€ ๐Ÿ“ src/ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ main.js โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ utils.js โ”‚ โ””โ”€โ”€ ๐Ÿ“ components/ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ Header.js โ”‚ โ””โ”€โ”€ ๐Ÿ“„ Footer.js โ”œโ”€โ”€ ๐Ÿ“„ package.json โ”œโ”€โ”€ ๐Ÿ“„ README.md โ””โ”€โ”€ ๐Ÿ“ node_modules/ ๐Ÿšซ (auto-hidden) ``` ### JSON Output ```json { "name": "my-project", "type": "directory", "icon": "๐Ÿ“", "children": [ { "name": "src", "type": "directory", "icon": "๐Ÿ“", "children": [...] } ] } ``` ## ๐Ÿ”ง Advanced Configuration ### .gitignore Support ```json { "filetree-pro.respectGitignore": true } ``` Automatically respects your project's `.gitignore` patterns when generating file trees. Enabled by default. ### Custom Exclusions ```json { "filetree-pro.exclude": [ "**/node_modules/**", "**/dist/**", "**/.git/**", "**/my-custom-folder/**", "**/*.test.js", "**/temp/**", "**/logs/**" ] } ``` ### Icon Settings ```json { "filetree-pro.showIcons": true } ``` ### Copilot Integration (Optional) ```json { "filetree-pro.useCopilot": false } ``` ## ๐ŸŒŸ Use Cases ### For Developers - **Project Documentation**: Generate file trees for README files - **Code Reviews**: Share project structure with team - **Onboarding**: Help new developers understand project layout - **Architecture Analysis**: Visualize project structure ### For Teams - **Documentation**: Export trees for project docs - **Presentations**: Use SVG format for slides - **API Documentation**: JSON format for tools - **Cross-platform**: ASCII format works everywhere ### For Educators - **Teaching**: Show project structures to students - **Examples**: Demonstrate different project organizations - **Analysis**: Analyze student project structures ## ๐Ÿš€ Performance - **Small Projects** (< 1,000 files): < 1 second - **Medium Projects** (1,000-10,000 files): < 3 seconds - **Large Projects** (10,000+ files): < 10 seconds ## ๐Ÿ“„ License MIT License - see [LICENSE](LICENSE) file for details. ## โ˜• Support If you find this extension helpful, consider buying me a coffee! โ˜• [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%23FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/tanzimhossain) ## ๐Ÿ“ž Contact & Social Media - **Email**: <tanzimhossain2@gmail.com> - **GitHub**: [@0xTanzim](https://github.com/0xTanzim) - **LinkedIn**: [@0xtanzim](https://linkedin.com/in/0xtanzim) - **Facebook**: [@0xtanzim](https://facebook.com/0xtanzim) - **Instagram**: [@0xtanzim](https://instagram.com/0xtanzim) --- **Made with โค๏ธ for the VS Code community**