Skip to content

NOSNOW add a global --color flag to disable colored output#2728

Open
sfc-gh-boler wants to merge 1 commit intomainfrom
boler-nocolor
Open

NOSNOW add a global --color flag to disable colored output#2728
sfc-gh-boler wants to merge 1 commit intomainfrom
boler-nocolor

Conversation

@sfc-gh-boler
Copy link

@sfc-gh-boler sfc-gh-boler commented Jan 7, 2026

When invoked with --color=off, the tool it no longer color its output, other formatting (bold, italics) remains unchanged.

We opt for a multi state option, so that it's extensible with other behaviours and themes.

Implementation wise, it seems the most robust way to disable colors is to set NO_COLOR env, which then works across all other libraries using rich.

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.
  • I've described my changes in the documentation.

When invoked with `--color=off`, the tool it no longer color its output,
other formatting (bold, italics) remains unchanged.

Implementation wise, it seems the most robust way to disable colors
is to set `NO_COLOR` env, which then works across all other libraries
using `rich`.
@sfc-gh-boler sfc-gh-boler requested a review from a team as a code owner January 7, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant