Terminal disk usage visualizer. Think WinDirStat, but in your terminal.
lintree scans your filesystem and renders an interactive treemap right in the terminal. See which files and folders are eating your disk space without leaving the command line.
- Squarified treemap that fills your terminal with proportional colored blocks
- Color coded file types: code (blue), video (magenta), archives (red), images (yellow), audio (pink), etc.
- Brightness scales with file size so the big stuff jumps out at you
- Drill into folders, go back, explore your whole disk interactively
- Sidebar shows file info, size, type, path, percentage, and top children
- Breadcrumb bar so you always know where you are
- Concurrent filesystem scanner that handles millions of files
- Works on Linux, macOS, and Windows
curl -fsSL https://raw.githubusercontent.com/PatchMon/lintree/main/install.sh | shDetects your OS and architecture, downloads the latest release, and installs to /usr/local/bin.
go install github.com/PatchMon/lintree@latestGrab the latest binary from GitHub Releases.
git clone https://github.com/PatchMon/lintree.git
cd lintree
make buildlintree # Scan . (current directory)
lintree /home # Scan a specific directory
lintree . # Scan current directory
lintree ~/Downloads # Scan your downloads
lintree -fast / # Fast scan (more workers, higher CPU)lintree [path] Scan and visualize disk usage (default: /)
lintree -fast [path] Fast scan mode (more workers, higher CPU usage)
lintree -v Show version and check for updates
lintree -h Show help
By default lintree uses 2 scanner workers to keep CPU usage low. The -fast flag bumps this to 8 workers, which scans faster but uses more CPU. Use -fast when you want speed and don't mind the CPU spike.
| Key | Action |
|---|---|
↑ ↓ / j k |
Navigate between cells |
← → / h l |
Spatial movement |
Enter / l |
Drill into directory |
Backspace / h |
Go back to parent |
Esc |
Go back or quit |
? |
Toggle help overlay |
q / Ctrl+C |
Quit |
| Mouse click | Select a cell |
| Color | File Type |
|---|---|
| Cyan | Directories |
| Blue | Source code (.go, .py, .js, .rs, .c, ...) |
| Teal | Web files (.html, .css, .vue, .tsx, ...) |
| Green | Documents (.pdf, .doc, .md, .txt, ...) |
| Yellow | Images (.png, .jpg, .svg, .webp, ...) |
| Magenta | Video (.mp4, .mkv, .mov, ...) |
| Pink | Audio (.mp3, .flac, .wav, ...) |
| Red | Archives (.zip, .tar.gz, .7z, .rar, ...) |
| Orange | Data (.json, .csv, .sql, .yaml, ...) |
| Dark Red | Binaries (.exe, .so, .dll, ...) |
| Gray | Other |
Check your current version and see if an update is available:
lintree -vUpdate to the latest:
curl -fsSL https://raw.githubusercontent.com/PatchMon/lintree/main/install.sh | sh# Build
make build
# Run
make run ARGS=/home
# Test
make test
# Lint
make lint-
Concurrent filesystem scan. A bounded goroutine pool walks the directory tree in parallel, collecting file sizes using actual disk block usage (
stat.Blocks * 512) where available. -
Squarified treemap layout. The Bruls-Huizing-van Wijk algorithm arranges items into near-square rectangles proportional to their size, with a correction factor for terminal cell aspect ratio (characters are roughly 2x taller than wide).
-
TUI rendering. Built on tcell for cell-by-cell terminal control with 24-bit truecolor support.
If lintree is useful to you, consider supporting the project:
Website: lintree.sh
MIT. See LICENSE for details.
