Fix: Remove short flags from non-boolean typer.Option definitions #49
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.
Fixes #48
Problem
CAM failed to initialize with
TypeError: Secondary flag is not valid for non-boolean flagwhen running any command. The error occurred during Typer/Click CLI initialization, making the tool completely unusable.Root Cause
Throughout the codebase, non-boolean
typer.Option()definitions incorrectly included short flags (e.g.,-c,-s,-n,-o,-b,-f,-d,-a,-l,-m).In Click/Typer, only boolean flags can have both a long form (
--flag) and short form (-f). Non-boolean options (strings, paths, integers, etc.) can only use long-form flags.Solution
typer.Optiondefinitions across 12 filesprompts_commands.pywhere thedefaultparameter name conflicted with boolean flag syntaxTrue/Falseas first argument) retain their short flags as they are allowedChanges
Files Modified (12 total)
cli/agents_commands.pycli/app.pycli/options.pycli/plugins/plugin_discovery_commands.pycli/plugins/plugin_install_commands.pycli/plugins/plugin_management_commands.pycli/plugins/plugin_marketplace_commands.pycli/prompts_commands.pycli/skills_commands.pymcp/cli.pymcp/install_commands.pymcp/server_commands.pyExample Changes
Before:
After:
Boolean flags (unchanged):
Testing
Verified that CLI initializes successfully without errors:
Impact
Breaking Changes
Users who were using short flags for non-boolean options will need to switch to long flags:
-c→--config-s→--scope-n→--name-o→--ownerHowever, since the tool was completely broken before this fix, there are likely no active users relying on these short flags.
Note: This PR was created with assistance from Claude Code after discovering and documenting the issue in #48.