Noir::CLI::Router
Top-level subcommand router.
noir scan ./app → ScanCommand noir trace "GET /x" ./app → TraceCommand noir reach users.go ./app → ReachCommand noir query --no-guard ./app → QueryCommand noir list techs → ListCommand noir cache info → CacheCommand noir config show → ConfigCommand noir rules update → RulesCommand noir completion zsh → CompletionCommand noir version → VersionCommand noir help → HelpCommand
Anything else (including the v0 noir -b ./app pattern) routes to
scan — the default — preserving every CI script, GitHub Action,
Dockerfile entrypoint, and shell alias from v0.x.
Class methods
Strips the router-consumed GLOBAL_FLAGS. apply_global_color_flag!
already acted on --no-color, and --no-spinner only means anything to
a scan's loading spinner. Neither is meaningful to the thin subcommands,
whose "first positional = action/subject" parsers would otherwise misread
a leading --no-color as the action itself (Unknown cache action: --no-color). They're stripped before those commands parse. scan is
deliberately excluded: its own OptionParser re-reads both flags to thread
color/spinner state through NoirRunner, so scan keeps the full argv.
Pure helper (no exit/die) so the strip rule stays unit-testable.