feat: add --version / -V flag to CLI#1698
Open
fsilvaortiz wants to merge 1 commit intogithub:mainfrom
Open
Conversation
Add standard --version flag as a typer callback so users can run `specify --version` or `specify -V` to get the CLI version. The existing `specify version` subcommand (which shows detailed system info) remains unchanged. Closes github#486 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the standard
--version/-Vflag to thespecifyCLI. Previously, runningspecify --versionreturned an error:Users had to know about the
specify versionsubcommand instead, which is not the standard CLI convention.Now:
The existing
specify versionsubcommand (which shows detailed system info including template version, platform, and architecture) remains unchanged.Closes #486
Test plan
specify --versionprints version and exits with code 0specify -Vbehaves the same as--versionspecify versionsubcommand still works (detailed output)specify --helpshows--version -Vin optionsTestVersionFlag:test_version_flag_exits_zerotest_version_flag_prints_versiontest_short_version_flagtest_version_flag_appears_in_helpAI Assistance Disclosure
This PR was drafted with assistance from Claude Code (Anthropic). All changes were reviewed and validated manually by the author.
🤖 Generated with Claude Code