Skip to content

feat(cli): add --version/-V flag - #82

Merged
JoseVelazcoH merged 2 commits into
developfrom
feat/cli-version
Jul 9, 2026
Merged

JoseVelazcoH merged 2 commits into
developfrom
feat/cli-version

Conversation

@JoseVelazcoH

Copy link
Copy Markdown
Owner

Summary

tth --version (and -V) now prints the package version, e.g. tth 0.1.1. Previously clap rejected the flag because no version was set on the root command.

Motivation

Every CLI is expected to report its version; there was no way to check which Thoth build you were running short of opening the TUI header.

Changes

  • Set version on the root clap #[command(...)], sourced from CARGO_PKG_VERSION.
  • Add tests: clap definition debug_assert, and that the exposed version matches the package version.

Test plan

  • Unit tests added / updated (662 passing)
  • Integration tests added / updated
  • Tested locally with cargo test
  • Manual: cargo run -- --version prints tth 0.1.1

Review checklist

  • Follows commit convention
  • No raw SQL without parameterized queries
  • No ORM or migration library introduced
  • cargo fmt and cargo clippy clean (pre-existing search.rs MSRV warning unrelated)
  • Docs updated if public API changed (n/a)

Breaking changes

None.

@JoseVelazcoH JoseVelazcoH added type: feature New feature or request good-first-issue Good for newcomers labels Jul 6, 2026
@JoseVelazcoH JoseVelazcoH self-assigned this Jul 9, 2026
@JoseVelazcoH
JoseVelazcoH merged commit d0954b7 into develop Jul 9, 2026
5 checks passed
@JoseVelazcoH
JoseVelazcoH deleted the feat/cli-version branch July 9, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good-first-issue Good for newcomers type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant