Repository navigation
Conversation
deco check's summary leads with a status mark and colours the counts that decide it: green ✓ when clean, yellow ⚠ with warnings only, red ✗ with errors. Problem lines colour an error's message red and the word "warning" yellow, paths dim, file names bold. deco schema colours its warning word and its "not written" line the same way. Colour is on only when stdout and stderr are both terminals, or with the new --color flag on any command; --no-color turns it off (the last one wins). No environment variables are read. The setting rides on the Reporter, so piped output and tests stay plain text, and exit codes are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
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.
Colours
deco check's report, as in the demo film. No new dependencies; a 30-line ANSI helper (packages/blocks/src/v8/cli/color.ts).When: on only when stdout and stderr are both terminals, or with
--color(any command);--no-colorturns it off, the last one wins. No environment variables are read. The setting rides on theReporter, so piped output and tests stay plain, and exit codes don't change.Before (any output):
After, on a terminal (
cat -v):✓, counts green⚠, warning count yellow (exit 0)✗, error count red (exit 1)warningyellow. Strip the escapes and it's the plain text again.The mark leads rather than trails: it's where the eye lands first and where most CLIs (vitest, gh) put it, and it stays in the same column whatever the counts.
deco schemagets the same yellowwarningand red "not written" line.Tests:
--colorsummaries (clean/warnings/errors), problem-line escapes, strip-to-plain,--color/--no-colorparsing on every command,--color=xrejected. Existing plain-text tests unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Summary by cubic
Colours
deco checkanddeco schemaoutput so reports read well on a terminal. Piped output and tests stay plain text, and exit codes are unchanged.warningwords.--coloror--no-color, the last one winning; without either, colour turns on only when stdout and stderr are both terminals.Written for commit 98feda7. Summary will update on new commits.