@asdsadw12312dwd2112xz/disk-usage-cli
v1.0.0
Published
Analyze disk usage from the terminal — prettier than du
Readme
disk-usage-cli
A terminal disk usage analyzer — prettier and more ergonomic than du.
Features
- 📁 Scans any directory recursively
- 🔢 Sorts by size (largest first)
- 🎨 Color-coded: green < 1 MB · yellow < 100 MB · red ≥ 100 MB
- 📊 Visual bar chart per entry
- 🔍 Limit depth with
--depth N - 🏆 Show top N items with
--top N - 🚫 Exclude patterns with
--exclude - 🤖 JSON output with
--json - 📝 Human-readable sizes (B / KB / MB / GB)
Install
npm install -g disk-usage-cliOr run directly after build:
node dist/index.js [dir]Usage
disk-usage-cli [dir] [options]
Arguments:
dir Directory to analyze (default: current directory)
Options:
-d, --depth <n> Max directory depth (default: 1)
-t, --top <n> Show only top N largest entries (default: 20)
-e, --exclude <...> Exclude name patterns (space-separated)
--json Output as JSON
-V, --version Print version
-h, --help Show helpExamples
# Analyze current directory, depth 1
disk-usage-cli
# Analyze /var/log, depth 2, show top 10
disk-usage-cli /var/log --depth 2 --top 10
# Exclude node_modules and .git
disk-usage-cli --exclude node_modules .git
# JSON output piped to jq
disk-usage-cli --json | jq '.entries[0]'Build
npm install
npm run buildLicense
MIT
