Skip to content

feat: add global version flag#12

Open
adityabhatkar23 wants to merge 1 commit into
renezander030:masterfrom
adityabhatkar23:feat/add-version-flag
Open

feat: add global version flag#12
adityabhatkar23 wants to merge 1 commit into
renezander030:masterfrom
adityabhatkar23:feat/add-version-flag

Conversation

@adityabhatkar23
Copy link
Copy Markdown

Summary

Add support for a global --version / -v flag that prints the installed CLI package version.

This keeps the existing version subcommand unchanged (capcut version <project> still reports CapCut/JianYing support information for a draft).

Changes

  • Add global --version and -v flags
  • Read the package version from package.json
  • Handle the flag before command dispatch
  • Add tests covering both --version and -v
  • Update the README installation section with a version-check example
  • Update the CLI help output to document the new flag

Example

capcut --version
0.6.0

Testing

  • Added CLI version flag tests
  • npm test
  • Verified capcut --version and capcut -v print the installed version and exit successfully

Closes #10

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.

Add top-level --version / -v flag (print installed CLI version)

1 participant