Skip to content

feat: add version subcommand aliased to the --version flag#197

Open
tonyandrewmeyer wants to merge 2 commits into
canonical:mainfrom
tonyandrewmeyer:agent/version-subcommand
Open

feat: add version subcommand aliased to the --version flag#197
tonyandrewmeyer wants to merge 2 commits into
canonical:mainfrom
tonyandrewmeyer:agent/version-subcommand

Conversation

@tonyandrewmeyer

Copy link
Copy Markdown
Contributor

concierge --version works but concierge version fails with unknown command "version", which is a confusing failure for anyone (human or agent) who guesses the subcommand form. Our CLI standards and other tools seem to expect that a version command is present.

Add a version Cobra subcommand on the root command that renders the same version template Cobra uses for the --version flag, against the root command. The two paths now produce identical output and share the same version/commit strings, so they cannot drift.

A test in cmd/ exercises both paths through the root command and asserts the outputs are byte-for-byte equal.

`concierge --version` works but `concierge version` fails with
`unknown command "version"`, which is a confusing failure for anyone
(human or agent) who guesses the subcommand form.

Add a `version` Cobra subcommand on the root command that renders the
same version template Cobra uses for the `--version` flag, against the
root command. The two paths now produce identical output and share the
same `version`/`commit` strings, so they cannot drift.

A test in `cmd/` exercises both paths through the root command and
asserts the outputs are byte-for-byte equal.
@tonyandrewmeyer tonyandrewmeyer requested a review from hpidcock May 26, 2026 07:15
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