A treemap that makes sense
Squarified tiles sized by real disk usage, nested up to three levels deep. Zoom, pan, and fit — tiles stay square and readable, never stripey.
Rust · ratatui · terminal-native
disktree-tui (dtui) is a keyboard-first disk-space explorer
with a nested treemap. Scan millions of files, spot what is large, and send it to the
Trash — without ever leaving your terminal.
v0.1.0MIT licensedLinux & macOSsingle binary
Why dtui
No Electron, no background daemon, no waiting on a GUI. One binary, a fast parallel scan, and a map that stays responsive even on enormous directories.
Squarified tiles sized by real disk usage, nested up to three levels deep. Zoom, pan, and fit — tiles stay square and readable, never stripey.
A parallel scanner streams live progress into a temporary SQLite index. The UI only ever draws a bounded page, so a million files will not freeze it.
Vim-style hjkl, spatial arrow navigation, clickable tiles and breadcrumbs, right-click menus, and wheel zoom. Every control is reachable both ways.
Marking never deletes. R lists every marked path with its full size, and each item is re-validated by device, inode, size, mtime, and kind right before it is touched.
One Enter moves the reviewed items to the system Trash. Permanent deletion requires typing DELETE, and emptying the Trash requires EMPTY.
Four themes, size or category colors, ASCII fallback, NO_COLOR support, and responsive layouts for narrow terminals. Your terminal, your rules.
The loop
A deliberately small workflow: look, mark, review, remove. Nothing destructive happens until you have seen every path.
Point it at any directory. It walks the tree in parallel and reports live progress, bytes, and unreadable paths.
Move spatially through the treemap, open folders, zoom in, switch to list view, and filter direct children live.
Flag the things you no longer need. Marks are just marks — a count and a running total, nothing more.
See every marked path, its size, the total, and the file count. Exclude anything you changed your mind about.
Enter sends items to Trash. Permanent deletion is a separate, typed confirmation — never a single keypress.
Muscle memory
Everything is discoverable with ? inside the app. Here is the short version — the full keymap lives in the user guide.
Full keymapSafety model
A disk cleaner should be boring at the moment it matters. Disktree-TUI treats removal as a reviewed plan, not a keystroke.
Read the full safety modelGet started
Install a prebuilt release in seconds, or build from source with Cargo. Linux and macOS are supported.
$ curl -fsSL \
https://raw.githubusercontent.com/liyu1981/disktree-tui/main/scripts/install.sh \
| bash
Detects your OS and architecture, downloads the matching release asset, and installs dtui to ~/.local/bin. Make sure that directory is on your PATH.
$ git clone https://github.com/liyu1981/disktree-tui.git
$ cd disktree-tui
$ cargo install --path .
Requires a recent stable Rust toolchain. The binary is installed as dtui.
$ dtui ~/projects
Or run dtui with no argument to resume the last path, then press ? for help.
Go deeper
Launch, keymap, mouse gestures, the safety model, platform notes, and troubleshooting.
InternalsScanner, SQLite index, squarified treemap layout, rendering, and input routing.
ContributeBuild, test, fake data, performance notes, and the conventions this project follows.
SourceIssues, releases, discussions, and the full Rust source. Stars are appreciated.