Obsidian Plugin  ·  v1.0.0  ·  Free & Open Source

Generate tree structures
from your vault

Copy any folder as a clean ASCII tree, flat path list, or JSON — right from a sleek interactive side panel.

Download latest View on GitHub
TreeGen — Obsidian
TreeGen
Tree
Paths
JSON
⎘ Copy all
src/ 4
main.ts
TreeView.ts
utils/ 2
docs/ 1
manifest.json
styles.css
package.json
my-vault/
├── src/
│ ├── main.ts
│ ├── TreeView.ts
│ └── utils/
│ ├── helper.ts
│ └── types.ts
├── docs/
│ └── index.html
├── manifest.json
├── styles.css
└── package.json

// Click any folder to copy its tree
// Switch to Paths or JSON format
// Ctrl+click a file to open in new tab

Features

Everything you need for
clean project documentation

Three output formats

Switch between ASCII tree, flat path list, and JSON instantly — no settings required.

Live search

Filter any file or folder by name. Matching results are highlighted and parent folders expand automatically.

Click to open

Click any file in the panel to open it. Ctrl+click (Cmd on Mac) opens it in a new tab.

Per-folder copy

Hover any folder to reveal a copy button. Copies the subtree in your selected format.

File count badges

Every folder shows a recursive file count at a glance — no need to expand to know what's inside.

5 tree styles

Lines, Rounded, ASCII, Minimal, Compact — switch in settings and every copy uses the chosen style.

Tree Styles

Pick the style that fits your workflow

Lines Default
my-project/
├── src/
│   ├── main.ts
│   └── TreeView.ts
├── styles.css
└── manifest.json
Rounded
my-project/
├── src/
│   ├── main.ts
│   ╰── TreeView.ts
├── styles.css
╰── manifest.json
ASCII
my-project/
+-- src/
|   +-- main.ts
|   \-- TreeView.ts
+-- styles.css
\-- manifest.json
Minimal
my-project/
· src/
·   · main.ts
·   · TreeView.ts
· styles.css
· manifest.json
Compact
my-project/
  src/
    main.ts
    TreeView.ts
  styles.css
  manifest.json

Installation

Get started in seconds

Manual

  1. Download main.js, manifest.json, styles.css from the latest release
  2. Copy to .obsidian/plugins/obsidian-treegen/ in your vault
  3. Enable TreeGen in Settings → Community Plugins

Development

Built with TypeScript

# Clone and install
git clone https://github.com/30jannik06/Obsidian-TreeGen
cd Obsidian-TreeGen && pnpm install

# Development
pnpm dev # watch mode
pnpm build # production build
pnpm lint # ESLint check
pnpm lint:fix # ESLint + auto-fix

Changelog

What's new

1.0.0 2026-04-27 Latest
Added
  • Side panel with interactive folder tree
  • Three copy formats: Tree, Flat Paths, JSON
  • Five tree styles: Lines, Rounded, ASCII, Minimal, Compact
  • Live search with auto-expand of matching folders
  • Sort order setting: Folders first, Files first, Alphabetical
  • Expand all / Collapse all buttons
  • Refresh button in panel header
  • Per-item copy buttons with checkmark flash feedback
  • Click to open files — Ctrl+click for new tab
  • File count badges on folders
  • Empty folders shown dimmed and non-clickable
  • Right-click any folder → Copy as tree
  • Command palette: Copy vault root, Open panel
  • Exclude patterns, root label, max depth settings
  • CSS hot-reload in dev mode via fs.watch