Global flags
These flags apply to all subcommands. They control output shape, logging, cache behavior, and destructive confirmation — not where nodehunter walks the tree (discovery flags do that).
Quick reference
| Flag | Description |
|---|---|
-j, --json | Machine-readable JSON on stdout (one object per run) |
-jp, --json-pretty [bool] | Pretty-print JSON when --json is set (default true) |
-q, --quiet | Less non-essential output (banner still shows) |
-s, --silent | Suppress log lines on stderr |
-ncl, --no-color | Plain text (also when NO_COLOR is set) |
-nch, --no-cache | Skip enrichment cache read/write |
-f, --force | Recompute enrichment and refresh on-disk cache |
-nlc, --no-log-channel | Omit [info] / [warn] tags on log lines |
-nlp, --no-log-prefix | Omit [nodehunter] prefix on log lines |
-y, --yes | Confirm destructive operations (skips interactive prompt) |
-d, --debug | Walk skip reasons, perf timings, cache dispatch (human mode) |
Output modes
Human (default) — Banners, progress, and guidance on stderr; primary results formatted for the terminal.
JSON — Exactly one JSON object on stdout. Human-oriented channels are suppressed with -j / --json or -s / --silent. Use exit codes and ok / summary.notes instead of parsing stderr.
nodehunter size ~/work --json
nodehunter size ~/work --json --json-pretty false # compactSchema and field reference: JSON output.
Quiet and silent
| Flag | Effect |
|---|---|
--quiet | Reduces chatter; command banner may still appear |
--silent | No log lines on stderr — pair with --json in automation |
Color and log formatting
--no-color/NO_COLOR— disables ANSI styling.--no-log-channel— drops level tags like[info].--no-log-prefix— drops the[nodehunter]prefix.
Useful when piping logs into tools that do not expect ANSI or prefixes.
Enrichment cache
Workspace commands (list, find, why, inspect) can reuse cached package metadata between runs.
| Flag | Effect |
|---|---|
--no-cache | Bypass cache read and write |
--force | Recompute and refresh cached entries |
With --debug, cache bypass is visible on the [cache] channel.
Confirmation (--yes)
-y / --yes skips the interactive confirm prompt on delete. Default is to refuse in non-interactive environments without this flag.
Use --yes only in automation that has already reviewed a sized preview (for example from a prior --json run on the same path).
Debug (--debug)
Human mode only. Emits structured diagnostics to stderr:
[walk]— directories skipped during traversal and why[perf]— phase timings (walk,sizeSpan,wall)[cache]— cache hits, misses, bypass
Example perf line on sized runs:
[perf] walk=143ms sizeSpan=609ms wall=634ms matched=8 …When discovery and sizing run concurrently, wall may be less than walk + sizeSpan — that is expected for pipelined work.