Skip to content

fix(cli): support version flag#164

Open
ManuelSalcedo2770 wants to merge 1 commit into
vercel:mainfrom
ManuelSalcedo2770:fix/cli-version-flag
Open

fix(cli): support version flag#164
ManuelSalcedo2770 wants to merge 1 commit into
vercel:mainfrom
ManuelSalcedo2770:fix/cli-version-flag

Conversation

@ManuelSalcedo2770

Copy link
Copy Markdown

Summary

Adds standard --version / -V support to the published CLI binaries by wiring Commander to the package version.

Problem

The published mcp-handler@1.1.0 CLI already handles --help, but --version currently exits as an unknown option:

$ mcp-handler --version
error: unknown option '--version'

That makes it harder for users and setup scripts to verify which CLI version is installed.

Verification

  • corepack pnpm build
  • corepack pnpm test -> 30 tests passed
  • node dist/cli/index.js --help -> exits 0 and shows -V, --version
  • node dist/cli/index.js --version -> exits 0 and prints 1.1.0
  • node dist/cli/index.js --definitely-not-a-real-flag -> exits 1 with Commander unknown-option error

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