feat(ui): add colored, structured CLI output
ci / vet, staticcheck, test, build (push) Successful in 3m15s

Replace flat "info:" / "warning:" stderr lines with:
- logStep (·), logDone (✓), logWarn (!) prefix symbols
- ANSI colors when stderr is a TTY; auto-disabled via NO_COLOR or TERM=dumb
- Verbose mode uses ▸ section headers (configuration / branch / commits / version)
- Config table source tags colored: dim=[default], bold=[config file],
  cyan=[env:], green=[flag:]
- Commit table in verbose mode: type column colored by kind (cyan=feat,
  green=fix, red=breaking), ignored commits dimmed
- New cmd/ui.go holds all color helpers (paint, logStep, logDone, logWarn,
  logSection, fmtSource); removes the vlog() helper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 11:46:42 +02:00
parent 46a10c70dc
commit 153d65bc53
3 changed files with 136 additions and 52 deletions
+6 -5
View File
@@ -684,15 +684,16 @@ func TestRunVerbose(t *testing.T) {
}
checks := []string{
"configuration:",
"configuration",
"git.tag_prefix",
"[default]",
"branch: release/1.2",
"branch",
"release/1.2",
"major=1, minor=2",
"commits analyzed",
"commits",
"feat: add new thing",
"feat → patch bump",
"version decision:",
"patch bump",
"version",
}
for _, want := range checks {
if !strings.Contains(output, want) {