Repository navigation
feat(notice): add error, warning, info, OK and debug lines - #20
Merged
Merged
Conversation
Package notice writes the notices of a command-line tool in four themes (line, badge, bar, block) and four palettes (default, muted, deep, pastel), each with colors for dark and light terminals. Values in a message carry a role (date, time, detail, ref, path, or a tool's own from NewRole) and are colored by it; patterns give a role to matches in the message's own text. Every notice is made plain and redacted, and credentials are looked for in the message as it reads, values included. Badge padding, the fill to the terminal's edge and the cleanup are options in code. The demo gains a notice command that shows every theme and palette. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds package
notice: the error, warning, info, OK and debug lines of a command-line tool.Line(WARN: …),Badge(padded label on its level's background),Bar(badge plus a tinted message filled to the edge) andBlock(the whole line on the level's background).Default,Muted,Deep,Pastel, each with dark and light colors;Backgroundis auto (COLORFGBG), dark or light.Date,Time,Detail,Ref,Path, orNewRolewith dark and light colors) and are colored by it;Patterngives a role to matches in the message's own text.term.Plain) and redacted (redact.Patterns); credentials are looked for in the message as it reads, values in place. Both can be switched off in code for trusted text.Aroundfor a progress bar or live display.go run ./examples/demo noticeshows every theme and palette.🤖 Generated with Claude Code