A disk usage visualizer for macOS, inspired by WinDirStat and WizTree. I loved the functionality of these tools but was never really satisfied with the alternatives available on macOS, so I built my own.
- Treemap visualization with cushion shading (matching WinDirStat's look)
- Directory tree with collapsible nodes, double-click expand/collapse, keyboard navigation, and size annotations
- File type breakdown showing extension statistics with color coding
- Fast scanning using macOS-native
getattrlistbulksyscall with parallel tree building via rayon - Context menu actions for copying paths, revealing items in Finder, reloading directories, and deleting files/folders
- Delete files/folders directly from the UI — Cmd+Delete for instant delete, Delete for native macOS confirmation dialog
- Open any folder via the File menu, native folder picker on startup, or pass a path on the command line
Requires Rust (2024 edition). macOS only — uses platform-specific APIs for fast directory scanning.
cargo build --release# Launch with folder picker
cargo run --release
# Scan a specific directory
cargo run --release -- /path/to/scan- Click a treemap block to select the corresponding file or directory in the tree.
- Double-click a directory in the tree to expand or collapse it.
- Press Cmd+C with a tree item selected, or while hovering a tree row, to copy the full filesystem path.
- Right-click a tree item to copy its path, reveal it in Finder, delete it, or immediately delete it with Cmd+Delete.
- Right-click a directory and choose Reload to rescan that directory and update the treemap without scanning a new root.
MacDirStat scans directories using the macOS getattrlistbulk syscall, which retrieves multiple directory entries with their attributes in a single kernel call — avoiding per-file overhead. Directory traversal is parallelized across cores using rayon, with openat() for efficient relative path resolution.
The treemap uses squarified layout from the treemap crate with cushion-shaded rendering, producing the familiar WinDirStat look where each file is a colored rectangle sized proportionally to its disk usage.
