Skip to content

feat(cli): colored terminal output for search, status, update - #53

Merged
mddiosc merged 2 commits into
mainfrom
feat/colored-output
Jun 24, 2026
Merged

mddiosc merged 2 commits into
mainfrom
feat/colored-output

Conversation

@mddiosc

@mddiosc mddiosc commented Jun 24, 2026

Copy link
Copy Markdown
Owner

What

Adds colored terminal output to search, status and update.

How

A tiny ANSI color helper (cmd/vectos/color.go) with no dependencies:

  • Disabled when NO_COLOR is set.
  • Only emits codes when stdout is a TTY (os.ModeCharDevice), so pipes, redirection and CI stay plain.
  • colorize is a no-op on empty strings.

Applied to:

  • search — path:line (cyan+bold), score (green ≥0.6 / yellow ≥0.4 / dim), category/lang and reason (dim), warnings (yellow), no-results (dim).
  • status — title (bold), provider health (green ready / red not ready), reindex notice (yellow).
  • update — versions (dim, latest bold), changelog URL (cyan), success (green).

Tests

color_test.go: disabled→plain, enabled→wrapped+reset, empty→empty, score thresholds. Existing output tests still pass (run without a TTY → plain).

ponytail: stdlib-only, no TUI framework.

Adds a tiny ANSI color helper (no dependencies) that respects NO_COLOR
and only emits codes when stdout is a TTY, so pipes, redirection and CI
stay plain. Applies it to search results (path/score/metadata), status
(provider health, reindex notice) and update (version, changelog).
@mddiosc mddiosc self-assigned this Jun 24, 2026
@mddiosc
mddiosc merged commit 05c00ea into main Jun 24, 2026
1 check passed
@mddiosc
mddiosc deleted the feat/colored-output branch June 24, 2026 16:00
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