Repository navigation
feat(cli): add --no-color flag and honor NO_COLOR (#24) - #31
Merged
Merged
Conversation
pachara-n
requested changes
Nov 2, 2026
pachara-n
left a comment
Owner
There was a problem hiding this comment.
Thanks @ak-bharadwaj, this is close! The flag, NO_COLOR handling (non-empty per no-color.org) and the tests look good. Two things before I merge:
- Color when output isn't a terminal. The PR now colors
✔/✖by default, including when stdout is piped (skills-lint > report.txtwould contain\x1b[31m). Could you also requireprocess.stdout.isTTYinuseColor? The "includes ANSI color sequences by default" test runs throughspawnSync, which isn't a TTY, so it would flip to asserting that piped output has no escape codes. - Scope: this covers the starter scope only, so I've changed
Closes #24toPart of #24to keep the rest of the issue open.
Contributor
Author
|
Thanks @pachara-n! Updated in commit
All 41 unit and integration tests are passing cleanly. Ready for merge! |
Owner
|
Thanks @ak-bharadwaj — merging. The flag, the |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #24 (starter scope).
Adds
--no-colorCLI option via Commander and honors the standardNO_COLORenvironment variable (per no-color.org):--no-coloroption to Commander.useColorcheck evaluatingoptions.color !== false && !("NO_COLOR" in process.env && process.env.NO_COLOR !== "").style()helper returning plain text when color is disabled.test/integration.test.tsverifying that ANSI escape sequences are omitted whenNO_COLOR=1or--no-coloris set, and preserved by default.