Skip to content

--format

Info

The --format flag lets you choose how the tree is displayed or exported.

  • tree (default) — Display the tree in the terminal with optional icons, counts, and sizes.
  • md — Export the tree to a Markdown file for documentation purposes.

Usage

Usage

Terminal tree (default)
show-file-tree .
Export to Markdown
show-file-tree --format md /path/to/project  # (1)!
  1. This creates a file named <rootname>-file-tree.md in your current directory.

Example

Example

tree
├── 📁 docs
   └── readme.md
├── 📁 src
   └── main.py
└── LICENSE
md
# Project Tree
- docs/
  - readme.md
- src/
  - main.py
- LICENSE

Tip

Tip

--format md with other flags like --size or --count to generate rich, documented project trees.