module
Noir::CLI
Defined in:
cli/common.crConstant Summary
-
KNOWN_COMMANDS =
["scan", "list", "cache", "config", "rules", "completion", "version", "help"] -
Known top-level verbs. The router falls back to
scanwhen ARGV[0] is not one of these (preserving thenoir -b ./appv0 usage pattern).
Class Method Summary
-
.apply_global_color_flag!(argv : Array(String)) : Nil
Disable Crystal's Colorize globally when the user asks for plain output via
--no-coloror theNO_COLORenv var. - .die(message : String, code : Int32 = 1) : NoReturn
- .name(label : String) : String
-
.no_color_env? : Bool
NO_COLOR follows the convention at https://no-color.org: any non-empty value disables color, with the explicit exception of "0".
-
.section(label : String) : String
Shared accent helpers so every
-hpage styles its section labels and inline command names the same way.
Class Method Detail
Disable Crystal's Colorize globally when the user asks for plain
output via --no-color or the NO_COLOR env var. Applied at the
router layer so every subcommand (list / cache / config / rules /
completion / version / help / scan) picks it up. Scan's own parser
still sees --no-color and threads it through NoirRunner for the
in-scan logger.
NO_COLOR follows the convention at https://no-color.org: any non-empty value disables color, with the explicit exception of "0".
Shared accent helpers so every -h page styles its section labels
and inline command names the same way. Green for headers (USAGE,
SUBJECTS, ACTIONS, OPTIONS, ...). Cyan for the named items inside.