Skip to content

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 delete

With no subcommand, nodehunter prints usage and exits. This is intentional: nothing runs implicitly.

Command families

FamilyCommandsPurpose
DiscoverscanList node_modules paths (no sizes)
MeasuresizePhysical disk totals and largest projects
Analyzelist, find, why, inspectWorkspace inventory and package footprint
RemovedeleteRemove 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 + confirm

Step-by-step recipes: Workflows.

Flags

TopicPage
Global flags--json, --yes, --quiet, cache, debug
Discovery flags-p, -D, -i, -nd, -L
Platforms and sizingdu 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.