CLI overview
nodehunter is a single binary with explicit subcommands. There is no config file — behavior comes from the command you choose and the flags you pass.
Default — help
bash
nodehunter
nodehunter help
nodehunter help scan
nodehunter help deleteWith no subcommand, nodehunter prints usage and exits. This is intentional: nothing runs implicitly.
Command families
| Family | Commands | Purpose |
|---|---|---|
| Discover | scan | List node_modules paths (no sizes) |
| Measure | size | Physical disk totals and largest projects |
| Analyze | list, find, why, inspect | Workspace inventory and package footprint |
| Remove | delete | Remove matched node_modules after preview + confirm |
Full reference: Commands.
Typical session
bash
nodehunter scan ~/work -D 4 # where are node_modules?
nodehunter size ~/work --full # how much disk?
nodehunter inspect ~/work # duplicates, versions, risks, …
nodehunter delete ~/work/big-app # preview + confirmStep-by-step recipes: Workflows.
Flags
| Topic | Page |
|---|---|
| Global flags | --json, --yes, --quiet, cache, debug |
| Discovery flags | -p, -D, -i, -nd, -L |
| Platforms and sizing | du vs Node walk, --no-du, cross-platform |
| Machine-readable output | --json envelope |
| SDK | @nodehunter/core programmatic API |
Discovery flags apply to every command that walks the filesystem: scan, size, delete, list, find, why, and inspect.
Safety
Deletion is never implicit. See the Safety model before running delete in scripts or CI.