Skip to content

Add -v shorthand for --version#46

Merged
thebenignhacker merged 1 commit intomainfrom
fix/version-flag-clean
Mar 14, 2026
Merged

Add -v shorthand for --version#46
thebenignhacker merged 1 commit intomainfrom
fix/version-flag-clean

Conversation

@thebenignhacker
Copy link
Copy Markdown
Contributor

Users expect -v to show version. Changed from -V to -v.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

VERDICT: APPROVE

SUMMARY: This PR changes the version flag shorthand from -V to -v to align with common CLI conventions where lowercase -v is the standard version flag. The change is cosmetic and introduces no security or correctness issues. The verification shows no conflicts with existing options.

FINDINGS: None


Verification Details:

I checked the following potential issues and found no problems:

  1. Flag Collision Check: Searched the entire file for existing -v option definitions. Found only one other use on line 172 (-v, --verbose in the check command), but this is scoped to that specific command and does not conflict with the global -v, --version flag defined on line 137. Commander.js correctly handles command-specific flags separately from global flags.

  2. Breaking Change Assessment: This change alters the CLI interface by removing -V as a shorthand. However:

    • The long form --version remains unchanged (backward compatible)
    • Users typing -V will get an "unknown option" error instead of the version (degradation, not a security issue)
    • The new -v shorthand matches widespread CLI conventions (git, npm, docker all use -v)
    • This is a UX improvement, not a security regression
  3. Input Validation: The VERSION constant comes from the imports (line 9). No user input is involved in this change.

  4. Code Logic: The change only affects the argument passed to .version(). The Commander.js library handles this safely.

No security or correctness mitigations were needed as this is a pure interface change with no execution logic modifications.


Reviewed 1 files changed (649 bytes)

@thebenignhacker thebenignhacker merged commit eace2ef into main Mar 14, 2026
1 check passed
@thebenignhacker thebenignhacker deleted the fix/version-flag-clean branch March 14, 2026 23: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