VS Code Extensions
Markdown DirTree generator

Markdown DirTree generator

by VandanSojitra

Beautiful directory trees for your README — with project-specific ignore support

Downloads

6

Rating

— (0)

Version

0.0.3

Last updated

Jul 16, 2026

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/
```

Related extensions