size
Measure physical disk used by node_modules directories. Reports per-directory totals and highlights the largest projects (top 9 by default).
bash
nodehunter size
nodehunter size ~/work
nodehunter size -p ~/work --full
nodehunter size ~/work --jsonWhat you get
totalSizeBytesand human-readable rollups- Per-match sizes (via native
duby default) - Largest project helpers in human output and JSON
rollups
Options
Inherits discovery flags, global flags, and listing caps:
| Flag | Description |
|---|---|
--top <n> | Max projects in ranked output (default 9) |
--full | Include every match, no cap |
--no-du | Force portable Node.js size walk (skip native du) |
--concurrency <n> | Parallel size lookups (default 8, max 32) |
Sizing engine and cross-platform behavior: Platforms and sizing.
Examples
bash
# Top offenders in a workspace
nodehunter size ~/Projects
# Full inventory for a report
nodehunter size ~/Projects --full --json > report.json
# Faster sizing on many small trees
nodehunter size ~/work --concurrency 16Before delete
Always run size (or delete interactively, which shows a preview) before removing trees. See Safety model and delete.
Related
- scan — paths only, no bytes
- JSON output —
statsblock on sized runs - Workflows