A CLI tool that displays disk usage as a colorful, detailed tree view
- Folders and files are colorcoded by file type and size.
- Supports depth and entry limiting, sorting and hidden file inclusion.
Using pipx for isolated installation:
To install pipx, follow the official pipx instructions:
# Install the CLI tool
pipx install disk-tree-cliThe dtree command should work now.
dtree [OPTIONS] [PATH]PATH: directory to scan (default: current directory).
| Flag | Description |
|---|---|
-h, --help |
Show help message and exit |
--version |
Print version information and exit |
-d, --depth <N> |
Maximum tree depth (default: 3) |
-l, --limit <N> |
Maximum entries per directory (default: 10) |
-s, --sort {size,name,type} |
Sort entries by size (default), name, or type |
-a, --all |
Include hidden files and directories (those starting with .) |
-
Sorting behavior:
size: largest items first (descending).name: alphabetical by name.type: directories first, then by file extension, then name.
-
Default scan (depth 3, limit 10, size‑sorted):
dtree
-
Scan a specific folder:
dtree /path/to/project
-
Only top level, up to 5 items:
dtree -d 1 -l 5 ~/projects -
Deeper view, show hidden, alphabetical sort:
dtree --depth 5 --limit 20 --all --sort name . -
Full info:
dtree -h
This project is licensed under the MIT License.

