jaxrens.cli.style¶
Tiny, dependency-free ANSI styling helpers for the CLI.
Colour is emitted only when the stream is an interactive terminal, so
piped output, log files and pytest capsys captures stay plain ASCII
(the subcommand tests assert on raw substrings). Honours the de-facto
NO_COLOR / FORCE_COLOR conventions and TERM=dumb.
This module imports nothing from JAX (and nothing heavy at all) so the
--version / --help / dump-schema paths stay fast on a
GPU-less box.
Functions
Wrap text in the ANSI codes named in names (e.g. |
|
Return whether stream (default: stdout) should receive ANSI codes. |