Skip to content

feat: add CLI version flag - #15

Merged
alexanderbsingh merged 7 commits into
mainfrom
add-version-flag
Aug 10, 2026
Merged

feat: add CLI version flag#15
alexanderbsingh merged 7 commits into
mainfrom
add-version-flag

Conversation

@alexanderbsingh

@alexanderbsingh alexanderbsingh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Add --version and -V flags to print the CLI version and build commit.

The version flag should utilize the AliasedFlagSet introduced in #16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a CLI --version/-V flag that prints the bifrost CLI version and build commit, updates the README to document it (and adjusts Markdown formatting), and adds unit tests to validate the version output and exit code.

Changes:

  • Add --version and -V flags to print version/commit and exit successfully.
  • Add unit tests for both version flag variants.
  • Update README options table and adjust Markdown code fencing.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Documents the new --version/-V flag and adjusts Markdown fencing in the usage section.
internal/bifrost/cli.go Implements --version/-V handling and adds a printVersion helper.
internal/bifrost/cli_test.go Adds coverage for version output via a new stdout capture helper and tests both flag variants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
@alexanderbsingh alexanderbsingh self-assigned this Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread internal/bifrost/cli.go Outdated
Comment on lines +21 to +23
showVersion := false
fl.BoolVar(&showVersion, "version", false, "show version and commit, then exit")
fl.BoolVar(&showVersion, "V", false, "show version and commit, then exit")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the AliasedFlagSet from #16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@alexanderbsingh
alexanderbsingh marked this pull request as ready for review August 10, 2026 13:04
@alexanderbsingh
alexanderbsingh merged commit ad48ed9 into main Aug 10, 2026
1 check passed
@alexanderbsingh
alexanderbsingh deleted the add-version-flag branch August 10, 2026 14:36
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.

3 participants