gdu

5.4k

Disk usage analyzer for finding large directories, browsing folder trees in a terminal UI, and exporting scans as JSON.

$brew install -f gdu
Language
Go
Stars
5,382
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

gdu is a local disk usage analyzer for scanning directory trees and surfacing where space is going. It defaults to a fullscreen terminal UI, but also supports non-interactive text output and JSON export for saved or scripted analysis.

What It Enables
  • Scan a directory tree or mounted disks to find large folders and files, with options for apparent size, item counts, top files, depth limits, and time-based filtering.
  • Browse results interactively, then delete items, empty directories, inspect file contents, or spawn a shell from the current location while cleaning up storage.
  • Export a full scan as JSON or save analysis in SQLite or Badger storage, then reopen those results later without rescanning the filesystem.
Agent Fit
  • Most of the product value sits in the fullscreen TUI, so unattended agent use is weaker than CLIs built around stable subcommands and structured stdout by default.
  • There is still a practical automation surface: non-interactive mode prints directory stats for scripts, and -o exports machine-readable scan snapshots for later parsing or review.
  • Best used as a local inspection primitive inside cleanup or incident workflows where an agent needs to locate storage hotspots before handing off or confirming destructive actions.
Caveats
  • It only inspects the local filesystem visible to the current machine, so remote storage or cloud volume workflows need other CLIs.
  • JSON support is snapshot export and import rather than a general --json mode on every command, and destructive actions are mainly exposed through the interactive UI.