Skip to content

A simple CLI tool that displays disk usage as a color coded tree, helping visualize format and size of directories.

License

Notifications You must be signed in to change notification settings

Karan5352/disk-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dtree

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.


Installation

Using pipx for isolated installation:

To install pipx, follow the official pipx instructions:

# Install the CLI tool
pipx install disk-tree-cli

The dtree command should work now.

Usage

dtree [OPTIONS] [PATH]
  • PATH: directory to scan (default: current directory).

Options

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.

Examples

  • 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

License

This project is licensed under the MIT License.

About

A simple CLI tool that displays disk usage as a color coded tree, helping visualize format and size of directories.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages