Export your project folder structure as a tree in multiple formats (md, txt, mdx, png, jpg, svg).
.md), plain text (.txt), MDX (.mdx), and image formats
(png, jpg, svg)..gitignore.npm install -g tree-export
npx tree-export -d ./target-folder -o output.md -f md
tree-export [options]
| Parameter | Description | Default |
|---|---|---|
-d, --dir |
Target directory to generate the tree from |
Current directory (.) |
-o, --output |
Output file path including filename |
tree-output.md |
-f, --format |
Output format: txt,
md, mdx, png, jpg, svg |
md |
npx tree-export -d . -o structure.md -f md
npx tree-export -d ./src -o src-tree.txt -f txt
npx tree-export -d ./project -o project-structure.mdx -f mdx
npx tree-export -d ./src -o src-tree.svg -f svg
npx tree-export -d ./src -o src-tree.png -f png
npx tree-export -d ./src -o src-tree.jpg -f jpg
.gitignore file
is detected, you will be prompted whether to exclude ignored files and
folders.
, which may have limited support in some SVG viewers.bin/index.js handles CLI
arguments and orchestrates the process.lib/tree-generator.js
reads and filters the directory tree, respecting .gitignore and default ignore
patterns.utils/export.js
generates the output in the requested format.Author: Osman Beyhan
❤️ Make via MDtoWeb