feat(cli): add --version / -v flag to specorator CLI#424
Merged
Conversation
Closes #418. `specorator --version` now prints `specorator v<version>` and exits 0, sourcing the version from package.json. Adds `-v` alias. Replaces the no-arg banner workaround in install docs and Task 1 / Task 3 of the plugin-first-install plan. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merging develop brought in the #419 fix (-V uppercase, bare VERSION output) alongside #424's handler (-v lowercase, prefixed output). Unified into one guard covering --version, -V, and -v — all print specorator v<version>. Added -V contract test. Co-Authored-By: Claude Sonnet 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.
Closes #418.
Summary
specorator --versionprintsspecorator v<version>on stdout, exits 0.-valias works identically.package.json#versionvia the existingVERSIONconstant.tests/scripts/cli.test.ts(--versionand-v).specorator --versioninstead of the no-arg banner workaround.--versionflag" notes dropped from bothdocs/how-to/install-claude-plugin.mdanddocs/superpowers/plans/2026-05-09-plugin-first-install.md.Test plan
npx vitest run tests/scripts/cli.test.ts— 15 tests pass (2 new for--version/-v).npm run verify— green.🤖 Generated with Claude Code