30jannik0612 downloadsGenerate a copyable ASCII folder/file tree from any folder in your vault.
Generate and copy ASCII folder/file trees directly from your Obsidian vault.
Inspired by the JetBrains TreeGen plugin.


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
Paths
my-project/src/main.ts
my-project/src/TreeView.ts
my-project/styles.css
my-project/manifest.json
JSON
{
"src/": {
"main.ts": null,
"TreeView.ts": null
},
"styles.css": null,
"manifest.json": null
}
main.js, manifest.json, and styles.css from the latest release.obsidian/plugins/obsidian-treegen/ in your vault| Action | How |
|---|---|
| Open panel | Click the tree icon in the left ribbon |
| Copy vault tree | "Copy all" button in the panel |
| Copy folder tree | Hover a folder → click copy icon |
| Copy file path | Hover a file → click copy icon |
| Open file | Click any file in the panel |
| Open in new tab | Ctrl+click (Cmd+click on Mac) |
| Filter | Type in the search box |
| Change format | Click Tree / Paths / JSON in the panel |
| Copy from file explorer | Right-click any folder → "Copy as tree" |
| Command palette | TreeGen: Open TreeGen panel / TreeGen: Copy vault root as tree |
| Setting | Default | Description |
|---|---|---|
| Max depth | 10 | How many folder levels deep to traverse |
| Show files | On | Include files in the tree; disable for folders only |
| Exclude patterns | .obsidian,.git |
Comma-separated names to skip |
| Tree style | Lines | Lines, Rounded, ASCII, Minimal, or Compact |
| Root label | Folder name | Top-level label: folder name, full path, or none |
git clone https://github.com/30jannik06/Obsidian-TreeGen
cd Obsidian-TreeGen
pnpm install
pnpm dev # watch mode
pnpm build # production build
pnpm lint # ESLint
pnpm lint:fix # ESLint + auto-fix
Stack: TypeScript · esbuild · ESLint · Obsidian API
MIT — see LICENSE