A small, fast CLI tool to display styled file/folder trees with rich options β colors, icons, sizes, counts, sorting, filtering and Markdown export.
Perfect for quickly visualizing and documenting project structure.
π¦βπ₯ Documentation: https://rudra-g-23.github.io/show-file-tree/
- PyPI:
pip install show-file-tree
- Author / Maintainer: Rudra Prasad Bhuyan
- License: MIT
- Changelog: see
CHANGELOG.md
(v0.0.1 β Released: 2025-09-25)
Install from PyPI:
pip install show-file-tree
Install from source (development):
git clone https://github.com/YOUR_USERNAME/show-file-tree.git
cd show-file-tree
python -m venv .venv
# Linux / macOS
source .venv/bin/activate
# Windows (PowerShell)
.venv\Scripts\Activate.ps1
pip install -e ".[all]"
pip install pytest
Print a tree of the current directory:
show-file-tree .
Limit depth and show sizes & counts:
show-file-tree -d 2 --size --count
Export the tree to Markdown:
# creates: project-file-tree.md
show-file-tree --format md /path/to/your/project
- Build a hierarchical tree of files and folders (fast, memory-safe traversal).
- Render a pleasant, readable terminal tree with icons and counts.
- Display file/folder sizes in human-readable units (KB/MB/GB).
- Filter by glob patterns and by modification/creation time.
- Sort by name or size (ascending/descending).
- Export the tree to Markdown (
--format md
) when desired or auto-fallback for long trees. - Multiple visual themes and a plain ASCII mode for compatibility.
--max-depth, -d <INT>
β Maximum recursion depth. Default: unlimited.--gitignore / --no-gitignore
β Respect.gitignore
files by default.--hidden
β Show hidden files and directories.
--sort {name,size}
β Sort byname
orsize
. Default:name
.--order {asc,desc}
β Sorting order. Default:asc
.
--format {tree,md}
βtree
(terminal) ormd
(Markdown file). Default:tree
.--size
β Show file/folder sizes.--count
β Show counts inside folders (e.g.src (2f, 4d)
).--no-icons
β Disable icons / emojis for plain ASCII output.--theme {colorful,monokai,light,nocolor}
β Choose a color theme.
--include, -i <PATTERN>
β Include only paths matching glob pattern (repeatable).--exclude, -e <PATTERN>
β Exclude paths matching glob pattern (repeatable).--mtime-after <YYYY-MM-DD>
/--mtime-before <YYYY-MM-DD>
β Filter by modification time.--ctime-after <YYYY-MM-DD>
/--ctime-before <YYYY-MM-DD>
β Filter by creation time.
--version
β Show package version.--about
β Show package information.
When --format md
is used (or when the CLI auto-falls back due to long output), a Markdown file named <rootname>-file-tree.md
is created in your current working directory. The MD file includes:
- A top heading (
Hello Data Points
) and a visual tree block. - Sizes, counts, and timestamps (if requested).
- A short summary (top files) when
--top
is used.
show-file-tree
is released under the MIT License.
Author: Rudra Prasad Bhuyan
GitHub: https://github.com/Rudra-G-23/show-file-tree