Disk usage pie charts as sixel graphics in the terminal. By default it discovers internal volumes (Linux: block-backed mounts from lsblk; macOS: internal APFS volumes), measures top-level usage on each filesystem, and prints one chart per volume. You can also chart a single directory to see how space is split among its immediate children (same filesystem only).
- Rust toolchain (see rustup) — MSRV 1.74 (see
Cargo.toml). - A terminal that can display sixel images (many modern terminals; iTerm2, WezTerm, mlterm, etc.). If you only see escape codes or a blank area, try another terminal or enable sixel support in your emulator settings.
git clone <URL-of-this-repo>
cd showdisk
./install.shinstall.sh runs cargo build --release and prints the path to the binary (target/release/showdisk). Optionally it can append that directory to your PATH in ~/.zshrc.
You can also build by hand:
cargo build --release
# Binary: target/release/showdiskAdd target/release to your PATH, or run the binary by full path.
showdiskCharts all discovered internal volumes (one sixel pie + legend per volume).
| Flag | Meaning |
|---|---|
--mount PATH |
Chart only this mount point (skips automatic discovery). |
--dir PATH |
Chart this directory only: immediate files and subfolders, on the same filesystem as PATH (does not cross mount points). Useful for finding large children under a known folder. Pie is relative to that folder’s total size (no “free space” slice). |
-s, --size N |
Pixel width/height of the chart (default 360). |
Examples:
# Only the root of your data volume
showdisk --mount /Volumes/Data
# What’s using space inside a project or backup tree
showdisk --dir ~/Backups
# Smaller chart
showdisk -s 240Scanning uses an in-process, parallel directory walk (same-filesystem semantics similar to du -x), capped at the number of CPUs reported by the OS so it stays reasonable on VMs.
See LICENSE in this repository.