Skip to content

Add themed CLI output and version details - #9

Merged
nnthnn merged 1 commit into
mainfrom
feat/cli-color-theme-and-version-flag
Nov 12, 2026
Merged

nnthnn merged 1 commit into
mainfrom
feat/cli-color-theme-and-version-flag

Conversation

@nnthnn

@nnthnn nnthnn commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a project-themed CLI for hyprview and makes --version distinguish tagged releases from local/in-between builds.

Changes

  • Add src/cli.rs with hand-rolled argument parsing, -h/--help, and -V/--version.
  • Theme help, parse errors, and daemon/config status messages with the site/overlay palette (blue→violet wordmark, violet flags, amber warnings, pink errors).
  • Respect TTY detection per stream and the NO_COLOR opt-out.
  • Embed the short commit id in --version for builds not on the matching vX.Y.Z tag, with a -dirty suffix for uncommitted changes.
  • Set HYPRVIEW_RELEASE=1 in the release workflow so shallow CI tag checkouts never misclassify a tagged build.
  • Document CLI flags, colour behaviour, and version/commit reporting.

Testing

  • just check — formatting, clippy with -D warnings, and all 99 unit tests pass.
  • Manually verified plain and TTY-colourised --help, --version, and unknown-option output.
  • Verified tagged, post-tag, and dirty --version output in a temporary repository.

Move argument parsing into a small cli module with a project palette, help and version flags, and NO_COLOR-aware output for help, errors, and daemon/config status messages.

Embed the short commit id in --version for builds that are not on the exact vX.Y.Z tag, with a -dirty suffix for uncommitted changes. Release jobs set HYPRVIEW_RELEASE=1 so shallow CI checkouts never misclassify a tagged build.
@nnthnn
nnthnn merged commit 3cec201 into main Nov 12, 2026
3 checks passed
@nnthnn
nnthnn deleted the feat/cli-color-theme-and-version-flag branch November 12, 2026 00:26
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