Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Markdown DirTree generatorNew to Visual Studio Code? Get it now.
Markdown DirTree generator

Markdown DirTree generator

Vandan Sojitra

|
5 installs
| (0) | Free
Beautiful directory trees for your README — with project-specific ignore support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Tree Generator

Generate clean, README-friendly Markdown directory trees directly from Visual Studio Code.

Unlike other tree generators, Markdown Tree Generator supports a project-specific .dirtreeignore file, allowing you to easily exclude folders and files.


Features

  • 🌳 Generate a Markdown directory tree from any folder.
  • 📁 Right-click a folder in the Explorer to generate its structure.
  • 🆕 Create .dirtreeignore from Selection — Right-click on files or folders to quickly add them to .dirtreeignore.
  • 🚫 Powerful ignore support using .dirtreeignore file (including default ignores like .git).
  • 📋 One-click copy to clipboard.
  • 📄 Output formatted as a clean Markdown code block, perfect for README files.
  • 🔤 Directories listed before files.
  • 🔠 Alphabetically sorted output.
  • 🎯 Supports ignoring:
    • Folder names anywhere in the tree
    • Specific files
    • Root-relative paths (e.g. /dist)

How to Use

1. Generate Tree

  • Right-click any folder in the Explorer → Generate Markdown Tree
  • Or use Command Palette: Markdown Tree Generator: Generate Markdown Tree

2. Create .dirtreeignore (New Feature)

  • Select one or more files/folders in the Explorer.
  • Right-click → Create .dirtreeignore from Selection
  • The extension will create or update .dirtreeignore in your workspace root, avoiding duplicates.

3. Copy to Clipboard

  • Right-click a folder → Copy Markdown Tree to Clipboard

Example

Given the following project:

MyProject/
├── src/
│   ├── controllers/
│   └── models/
├── node_modules/
├── dist/
├── package.json
├── README.md
└── .dirtreeignore

.dirtreeignore

node_modules
dist

Generated output:

# Directory Tree

```text
MyProject/
├── package.json
├── README.md
└── src/
    ├── controllers/
    └── models/
```
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft