A modern, feature-rich replacement for the classic Linux tree
command โ written in Python.
๐จ Colorful. ๐ Filterable. ๐๏ธ Metadata-rich. ๐ง Smartly structured.
--depth
)--show-hidden
)-e
)-o
)--ztoa
)Install it via pip from PyPI:
pip install ntree
ntree [OPTIONS]
Option | Description |
---|---|
--depth | N Limit traversal to N levels deep |
--show-hidden | Include hidden files and folders |
-e |
Show only files with a specific extension (e.g. py, txt) |
-o |
Output the tree to a specified file |
--ztoa | List entries in reverse (Z โ A) |
--meta | Show metadata: size, owner, last modified |
ntree ~/projects/myapp --depth 2 --meta --show-hidden -e py -o tree.txt
This will:
๐ myapp/
โโโ ๐ src/
โ โโโ ๐ main.py (3.1 KB)
โ โโโ ๐ utils.py (1.2 KB)
โโโ ๐ README.md (800 B)
โโโ ๐ .git/
Pull requests and suggestions are welcome! If youโd like to contribute, please fork the repository and use a feature branch. Thanks for making it better. ๐
MIT License. See LICENSE file for full text.
Built with โค๏ธ by Vijay Satheesh
If you like this project, give it a โญ โ it helps more people discover it!