dua is a terminal-first Linux inspection toolkit with two read-only commands, forked from the macOS Mole CLI's analyze and status and re-scoped as an independent project. Linux is the primary platform; macOS arm64 is supported on a secondary, best-effort basis. It shows where disk space went and how healthy the machine is — from a CLI, script, or compact TUI. It never deletes or modifies user data: there is no cleanup surface anywhere in the codebase.
Prebuilt Linux binaries (amd64 and arm64) are built by GitHub Actions. No sudo needed — installed to ~/.local/bin:
curl -fsSL "https://raw.githubusercontent.com/Lawlietr/dua/main/scripts/install.sh" | bashAdd ~/.local/bin to your PATH (usually in ~/.bashrc or ~/.zshrc) to make it permanent.
Linux is the primary platform. A macOS arm64 build is also published as secondary support (since v0.2.0):
mkdir -p ~/.local/bin
curl -fsSL "https://github.com/Lawlietr/dua/releases/latest/download/dua-darwin-arm64.tar.gz" | tar -xz -C ~/.local/binNotes:
- Requires Apple Silicon; Intel Macs are not built.
dua updateworks on macOS when using the router shipped in the darwin tarball.- Opening files and folders (O / P / F keys) uses the macOS
opencommand. - Insight paths target XDG caches, so the insights list is sparser on macOS than on Linux.
Requires Go 1.25+:
make build
./dua status --json # machine-readable status
./dua analyze --json /some/path
./dua analyze # overview TUI (no PATH scans the machine)
./dua status # TUI dashboardInstall the binaries to a location on your PATH:
cp bin/dua-analyze bin/dua-status /usr/local/bin/dua analyze— visual disk explorer:- System overview (
/usr,/opt,/var,/home) plus hidden-space insights (npm, Go build, pip, Gradle, JetBrains caches, Trash, old Downloads) - Drill-down navigation with per-directory bars and last-access hints
- Top-files (T) view, live scan feedback with cursor sort modes, and a disk-usage cache
--jsonoutput for automation
- System overview (
dua status— compact health dashboard:- CPU, memory, disk, thermal (hwmon), hardware model, OS info, and top processes
- High-CPU process alerts
--jsonfor one-shot automation and--watchfor NDJSON streams
- No PATH: system overview (system roots + insight directories), then drill in with Enter.
PATH: scans that directory.- Keys:
↑↓←→navigate,Enterdrill in,Escback,Rrefresh,/filter,TTop files,Oopen withxdg-open,Ppreview,Freveal in file manager,Q/Ctrl+Cquit. - Flags:
--jsonprints the scan result as JSON.
Environment: DUA_ANALYZE_PATH sets the scan target when no PATH is given; DUA_ANALYZE_LIVE_SORT selects the live-scan sort mode.
Shows version and commit information.
Checks GitHub for a newer release and updates in-place (downloads tarball, verifies SHA-256, replaces binaries). Run with sudo if installed in a system directory.
duais a thin bash router that dispatches to two Go binaries (dua-analyze,dua-status).- Sizes come from a bounded concurrent walk;
du -skPx(with platform-aware exclude flags) measures folded directories, and a cache avoids re-scanning unchanged trees. - Status metrics come from
/proc,/sys/class/hwmon, DMI, and/etc/os-release; no privileged access is required. - Analysis is read-only by construction: no deletion, truncation, or modification code path exists.
make build # build bin/dua-analyze and bin/dua-status
make check # go vet ./... + go test ./...
go test ./... # full test suiteSee AGENTS.md for the project contract, hotspot ownership, and testing notes.
GPL v3. See LICENSE.