@asdsadw12312dwd2112xz/dir-size-cli
v1.0.0
Published
Analyze directory sizes with treemap visualization
Maintainers
Readme
dir-size-cli
Analyze directory sizes with ASCII bar chart visualization. A fast, zero-overhead alternative to du with visual output.
Install
npm install -g dir-size-cliUsage
dir-size [directory] [options]Options
| Flag | Description | Default |
|------|-------------|---------|
| -d, --depth <n> | Max scan depth | 2 |
| -n, --top <n> | Show top N entries | 20 |
| --sort <mode> | Sort by: size, name, count | size |
| --exclude <patterns...> | Exclude patterns (glob-like) | — |
| --json | Output as JSON | false |
| --human | Human-readable sizes | true |
| --no-human | Show raw byte sizes | — |
Examples
# Analyze current directory
dir-size
# Top 10 largest items, depth 3
dir-size ./src -n 10 -d 3
# Exclude node_modules and .git
dir-size . --exclude node_modules .git
# JSON output for scripting
dir-size /var/log --json
# Sort by file count
dir-size . --sort countOutput
Directory: /home/user/project
# Path Size % Bar
──────────────────────────────────────────────────────────
1. D node_modules 142.3 MB 78.2% ████████████████████████░░░░░░
2. D dist 23.1 MB 12.7% ████░░░░░░░░░░░░░░░░░░░░░░░░░░
3. D src 8.4 MB 4.6% █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
4. F package-lock.json 5.2 MB 2.9% █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Summary
───────────────────────────
Total size: 181.8 MB
Files: 12847
Directories: 1923License
MIT
