Files
node/lib/internal/main
Adrián Estrada 0bcc6ef01e cli: style node --help output with util.styleText
Apply util.styleText to the `node --help` output for improved visual
hierarchy and scannability. Styling is applied only when the output
stream supports color (detected via util.styleText's built-in
shouldColorize), so piped/redirected output and NO_COLOR remain plain
text with no behavior change.

- Bold: Usage lines, Options:, Environment variables: headers
- Bold green: CLI option names (e.g. --inspect, -e, --eval)
- Bold magenta: environment variable names (e.g. NODE_PATH)
- Dim: "(currently set)" annotation
- Blue underline: documentation URL

Column-width math uses unstyled string lengths to preserve alignment
regardless of styling. The "(currently set)" annotation is styled via
post-processing after layout to avoid breaking the fold() width
calculation.

Signed-off-by: Adrian Estrada <edsadr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64484
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-07-19 20:38:29 +00:00
..
2023-03-06 10:44:14 +01:00
2026-07-14 21:40:40 +00:00