erdtree

A colourful, multi-threaded file tree visualiser and disk usage analyser — like tree and du combined, with icons, filtering, and glob support.

Screenshot of erdtree

erdtree (invoked as erd) is a modern, multi-threaded file tree visualiser and disk usage analyser. It combines the functionality of tree (directory hierarchy display) and du (disk usage) into a single colourful tool, with Nerd Font icon support, glob-based filtering, gitignore awareness, and multiple layout modes.

Features

  • Combined tree + disk usage — shows a directory tree with the size of every file and directory, all in one view
  • Multi-threaded — traverses and sizes the directory tree in parallel for fast results on large hierarchies
  • Nerd Font icons — optionally displays file-type icons alongside each entry
  • Multiple size metrics — report logical size, physical (block) size, or word count
  • Glob filtering — include or exclude files by glob pattern
  • Gitignore support — respects .gitignore files to skip untracked build artefacts and dependencies
  • Sorting — sort entries by size, name, or modification time, ascending or descending
  • Configurable depth — limit tree depth with -L
  • Multiple layout modes — classic tree, flat (sorted by size), or inverted (largest first)
  • Colour themes — fully themeable output

Installation

cargo install erdtree

Or via your system package manager:

# macOS
brew install erdtree

# Arch Linux
pacman -S erdtree

# Nix
nix-env -iA nixpkgs.erdtree

# Debian / Fedora
# Pre-built Linux binaries are available on the
# [releases page](https://github.com/solidiquis/erdtree/releases).

Usage

# Show the current directory as a tree with disk usage
erd

# Show a specific directory
erd ~/Projects

# Limit to 2 levels deep
erd -L 2

# Sort by size, largest first
erd --sort size --dir-order first

# Show hidden files
erd -H

# Show icons (requires a Nerd Font terminal)
erd -i

# Report physical (block) size instead of logical size
erd --disk-usage physical

# Flat layout — all files sorted by size, no tree structure
erd --layout flat

# Suppress gitignored files (on by default; disable with --no-ignore)
erd

# Filter to only show specific file types
erd --glob '*.rs'

# Show file count instead of disk usage
erd --metric count

Configuration

erdtree can be configured via a .erdtreerc file in your home directory or config directory, so you don't have to pass your preferred flags every time:

# ~/.erdtreerc
--icons
--level 3
--sort size
--dir-order first
--human-readable

Any flag that works on the command line can be placed in the config file, one per line.

Comparison with similar tools

Featureerddusttreedu
Tree layout
Disk usage
Icons
Glob filter
Gitignore
Multi-threaded
Flat/sorted layout

erd sits between dust (which focuses on a bar-chart disk usage view) and tree (which shows structure but no sizes), combining the strengths of both.