Skip to content

Commit 481e7b3

Browse files
authored
Merge pull request #49 from Vadiml1024/fix/cli-flag-definitions
Fix: Remove short flags from non-boolean typer.Option definitions
2 parents 51b49e9 + 2545df3 commit 481e7b3

13 files changed

Lines changed: 100 additions & 196 deletions

code_assistant_manager/cli/agents_commands.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,20 @@
2727
)
2828
AGENT_KEY_ARGUMENT = typer.Argument(..., help="Agent identifier")
2929
APP_TYPE_OPTION = typer.Option(
30-
"claude",
31-
"--app",
32-
"-a",
33-
help="App type(s) to install to (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
30+
"claude", "--app", help="App type(s) to install to (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
3431
)
3532
FORCE_OPTION = typer.Option(False, "--force", "-f", help="Skip confirmation")
36-
OWNER_OPTION = typer.Option(..., "--owner", "-o", help="Repository owner")
37-
NAME_OPTION = typer.Option(..., "--name", "-n", help="Repository name")
38-
BRANCH_OPTION = typer.Option("main", "--branch", "-b", help="Repository branch")
33+
OWNER_OPTION = typer.Option(..., "--owner", help="Repository owner")
34+
NAME_OPTION = typer.Option(..., "--name", help="Repository name")
35+
BRANCH_OPTION = typer.Option("main", "--branch", help="Repository branch")
3936
AGENTS_PATH_OPTION_REPO = typer.Option(
4037
None, "--agents-path", help="Agents subdirectory path"
4138
)
4239
APP_TYPE_OPTION_ALL = typer.Option(
43-
None,
44-
"--app",
45-
"-a",
46-
help="App type(s) to show (claude, codex, gemini, droid, codebuddy, opencode, all). Default shows all.",
40+
None, "--app", help="App type(s) to show (claude, codex, gemini, droid, codebuddy, opencode, all). Default shows all.",
4741
)
4842
APP_TYPE_OPTION_UNINSTALL = typer.Option(
49-
...,
50-
"--app",
51-
"-a",
52-
help="App type(s) to uninstall all agents from (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
43+
..., "--app", help="App type(s) to uninstall all agents from (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
5344
)
5445
from code_assistant_manager.plugins.fetch import parse_github_url
5546

code_assistant_manager/cli/app.py

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ def _create_lazy_tool_command(tool_name: str):
11131113
def tool_command(
11141114
ctx: Context,
11151115
config: Optional[str] = typer.Option(
1116-
None, "--config", "-c", help="Path to settings.conf configuration file"
1116+
None, "--config", help="Path to settings.conf configuration file"
11171117
),
11181118
):
11191119
"""Launch the specified AI code editor."""
@@ -1217,10 +1217,7 @@ def make_placeholder(name):
12171217
def placeholder_cmd(
12181218
ctx: Context,
12191219
config: Optional[str] = typer.Option(
1220-
None,
1221-
"--config",
1222-
"-c",
1223-
help="Path to settings.conf configuration file",
1220+
None, "--config", help="Path to settings.conf configuration file",
12241221
),
12251222
):
12261223
# Replace this placeholder with the real command
@@ -1255,7 +1252,7 @@ def make_command(name, cls):
12551252
def command(
12561253
ctx: Context,
12571254
config: Optional[str] = typer.Option(
1258-
None, "--config", "-c", help="Path to settings.conf configuration file"
1255+
None, "--config", help="Path to settings.conf configuration file"
12591256
),
12601257
):
12611258
"""Launch the specified AI code editor."""
@@ -1388,7 +1385,7 @@ def doctor(
13881385
ctx: Context,
13891386
verbose: bool = typer.Option(False, "--verbose", "-v", help="Show detailed output"),
13901387
config: Optional[str] = typer.Option(
1391-
None, "--config", "-c", help="Path to config file"
1388+
None, "--config", help="Path to config file"
13921389
),
13931390
):
13941391
"""Run diagnostic checks on the code-assistant-manager installation (alias: d)"""
@@ -1452,7 +1449,7 @@ def upgrade_command(
14521449
False, "--verbose", "-v", help="Enable verbose installer output"
14531450
),
14541451
config: Optional[str] = typer.Option(
1455-
None, "--config", "-c", help="Path to config file"
1452+
None, "--config", help="Path to config file"
14561453
),
14571454
):
14581455
"""Upgrade CLI tools (alias: u). If not installed, will install."""
@@ -1517,7 +1514,7 @@ def upgrade_alias_cmd(
15171514
ctx: Context,
15181515
target: str = typer.Argument("all", help="Tool to upgrade or 'all'"),
15191516
config: Optional[str] = typer.Option(
1520-
None, "--config", "-c", help="Path to config file"
1517+
None, "--config", help="Path to config file"
15211518
),
15221519
):
15231520
"""Alias for 'upgrade' command."""
@@ -1538,7 +1535,7 @@ def install_command(
15381535
False, "--verbose", "-v", help="Enable verbose installer output"
15391536
),
15401537
config: Optional[str] = typer.Option(
1541-
None, "--config", "-c", help="Path to config file"
1538+
None, "--config", help="Path to config file"
15421539
),
15431540
):
15441541
"""Install CLI tools (alias: i). Same as upgrade - if not installed, will install. If installed, will try to upgrade."""
@@ -1556,7 +1553,7 @@ def install_alias_cmd(
15561553
ctx: Context,
15571554
target: str = typer.Argument("all", help="Tool to install or 'all'"),
15581555
config: Optional[str] = typer.Option(
1559-
None, "--config", "-c", help="Path to config file"
1556+
None, "--config", help="Path to config file"
15601557
),
15611558
):
15621559
"""Alias for 'install' command."""
@@ -1578,7 +1575,7 @@ def uninstall_command(
15781575
False, "--keep-config", "-k", help="Keep configuration files"
15791576
),
15801577
config: Optional[str] = typer.Option(
1581-
None, "--config", "-c", help="Path to config file"
1578+
None, "--config", help="Path to config file"
15821579
),
15831580
):
15841581
"""Uninstall CLI tools and backup their configuration files."""
@@ -1603,7 +1600,7 @@ def uninstall_alias(
16031600
False, "--keep-config", "-k", help="Keep configuration files"
16041601
),
16051602
config: Optional[str] = typer.Option(
1606-
None, "--config", "-c", help="Path to config file"
1603+
None, "--config", help="Path to config file"
16071604
),
16081605
):
16091606
"""Alias for 'uninstall' command."""
@@ -1636,7 +1633,7 @@ def doctor_alias(
16361633
ctx: Context,
16371634
verbose: bool = typer.Option(False, "--verbose", "-v", help="Show detailed output"),
16381635
config: Optional[str] = typer.Option(
1639-
None, "--config", "-c", help="Path to config file"
1636+
None, "--config", help="Path to config file"
16401637
),
16411638
):
16421639
"""Alias for 'doctor' command."""
@@ -1652,7 +1649,7 @@ def doctor_alias(
16521649
@config_app.command("validate")
16531650
def validate_config(
16541651
config: Optional[str] = typer.Option(
1655-
None, "--config", "-c", help="Path to config file"
1652+
None, "--config", help="Path to config file"
16561653
),
16571654
verbose: bool = typer.Option(False, "--verbose", "-v", help="Show detailed output"),
16581655
):
@@ -1859,10 +1856,10 @@ def set_config(
18591856
),
18601857
value: str = typer.Argument(..., help="Value to set"),
18611858
app: str = typer.Option(
1862-
None, "-a", "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
1859+
None, "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
18631860
),
18641861
scope: str = typer.Option(
1865-
"user", "--scope", "-s", help="Configuration scope (user, project)"
1862+
"user", "--scope", help="Configuration scope (user, project)"
18661863
),
18671864
):
18681865
"""Set a configuration value for code assistants.
@@ -1951,10 +1948,10 @@ def unset_config(
19511948
..., help="Configuration key path (e.g., 'model' or 'codex.model')"
19521949
),
19531950
app: str = typer.Option(
1954-
None, "-a", "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
1951+
None, "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
19551952
),
19561953
scope: str = typer.Option(
1957-
"user", "--scope", "-s", help="Configuration scope (user, project)"
1954+
"user", "--scope", help="Configuration scope (user, project)"
19581955
),
19591956
):
19601957
"""Unset a configuration value for code assistants.
@@ -2070,10 +2067,10 @@ def show_config(
20702067
None, help="Specific config key path to show (optional)"
20712068
),
20722069
app: str = typer.Option(
2073-
"claude", "-a", "--app", help="App to show config for (default: claude)"
2070+
"claude", "--app", help="App to show config for (default: claude)"
20742071
),
20752072
scope: Optional[str] = typer.Option(
2076-
None, "--scope", "-s", help="Filter by scope (user, project)"
2073+
None, "--scope", help="Filter by scope (user, project)"
20772074
),
20782075
):
20792076
"""Show configuration for an AI editor app in dotted notation format.

code_assistant_manager/cli/options.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import typer
44

55
# Module-level typer.Option constants to fix B008 linting errors
6-
CONFIG_FILE_OPTION = typer.Option(None, "--config", "-c", help="Path to config file")
6+
CONFIG_FILE_OPTION = typer.Option(None, "--config", help="Path to config file")
77
CONFIG_OPTION = typer.Option(
8-
None, "--config", "-c", help="Path to settings.conf configuration file"
8+
None, "--config", help="Path to settings.conf configuration file"
99
)
1010
DEBUG_OPTION = typer.Option(False, "--debug", "-d", help="Enable debug logging")
1111
ENDPOINTS_OPTION = typer.Option(
@@ -20,10 +20,7 @@
2020
)
2121
SHELL_OPTION = typer.Argument(..., help="Shell type (bash, zsh)")
2222
SCOPE_OPTION = typer.Option(
23-
"user",
24-
"--scope",
25-
"-s",
26-
help="Configuration scope (user, project)",
23+
"user", "--scope", help="Configuration scope (user, project)",
2724
)
2825
TARGET_OPTION = typer.Argument("all", help="Tool to upgrade or 'all'")
2926
TOOL_ARGS_OPTION = typer.Argument(None, help="Arguments for the editor")

code_assistant_manager/cli/plugins/plugin_discovery_commands.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,7 @@ def view_plugin(
169169
help="Plugin name to view (e.g., 'document-skills' or 'awesome-plugins:document-skills')",
170170
),
171171
app_type: str = typer.Option(
172-
"claude",
173-
"--app",
174-
"-a",
175-
help=f"App type ({', '.join(VALID_APP_TYPES)})",
172+
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
176173
),
177174
):
178175
"""View detailed information about a specific plugin.
@@ -292,10 +289,7 @@ def view_plugin(
292289
@plugin_app.command("status")
293290
def plugin_status(
294291
app_type: Optional[str] = typer.Option(
295-
None,
296-
"--app",
297-
"-a",
298-
help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
292+
None, "--app", help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
299293
),
300294
):
301295
"""Show plugin system status for an app, or all apps if none specified."""
@@ -481,10 +475,7 @@ def show_app_info(app: str, show_cam_config: bool = True):
481475
@plugin_app.command("status")
482476
def plugin_status(
483477
app_type: Optional[str] = typer.Option(
484-
None,
485-
"--app",
486-
"-a",
487-
help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
478+
None, "--app", help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
488479
),
489480
):
490481
"""Show plugin system status for an app, or all apps if none specified."""

code_assistant_manager/cli/plugins/plugin_install_commands.py

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -373,16 +373,10 @@ def install_plugin(
373373
help="Plugin name or marketplace:plugin-name. Examples: 'code-reviewer' or 'awesome-plugins:code-reviewer'",
374374
),
375375
marketplace: Optional[str] = typer.Option(
376-
None,
377-
"--marketplace",
378-
"-m",
379-
help="Marketplace name (alternative to marketplace:plugin-name format)",
376+
None, "--marketplace", help="Marketplace name (alternative to marketplace:plugin-name format)",
380377
),
381378
app_type: str = typer.Option(
382-
"claude",
383-
"--app",
384-
"-a",
385-
help=f"App type to install to ({', '.join(VALID_APP_TYPES)})",
379+
"claude", "--app", help=f"App type to install to ({', '.join(VALID_APP_TYPES)})",
386380
),
387381
):
388382
"""Install a plugin from available marketplaces.
@@ -490,10 +484,7 @@ def uninstall_plugin(
490484
plugin: str = typer.Argument(..., help="Plugin name to uninstall"),
491485
force: bool = typer.Option(False, "--force", "-f", help="Skip confirmation"),
492486
app_type: str = typer.Option(
493-
"claude",
494-
"--app",
495-
"-a",
496-
help=f"App type to uninstall from ({', '.join(VALID_APP_TYPES)})",
487+
"claude", "--app", help=f"App type to uninstall from ({', '.join(VALID_APP_TYPES)})",
497488
),
498489
):
499490
"""Uninstall an installed plugin.
@@ -615,10 +606,7 @@ def _remove_plugin_from_settings(handler, plugin: str) -> bool:
615606
def enable_plugin(
616607
plugin: str = typer.Argument(..., help="Plugin name to enable"),
617608
app_type: str = typer.Option(
618-
"claude",
619-
"--app",
620-
"-a",
621-
help=f"App type ({', '.join(VALID_APP_TYPES)})",
609+
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
622610
),
623611
):
624612
"""Enable a disabled plugin."""
@@ -657,10 +645,7 @@ def enable_plugin(
657645
def disable_plugin(
658646
plugin: str = typer.Argument(..., help="Plugin name to disable"),
659647
app_type: str = typer.Option(
660-
"claude",
661-
"--app",
662-
"-a",
663-
help=f"App type ({', '.join(VALID_APP_TYPES)})",
648+
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
664649
),
665650
):
666651
"""Disable an enabled plugin."""
@@ -699,10 +684,7 @@ def disable_plugin(
699684
def validate_plugin(
700685
path: str = typer.Argument(..., help="Path to plugin or marketplace to validate"),
701686
app_type: str = typer.Option(
702-
"claude",
703-
"--app",
704-
"-a",
705-
help=f"App type ({', '.join(VALID_APP_TYPES)})",
687+
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
706688
),
707689
):
708690
"""Validate a plugin or marketplace manifest."""

code_assistant_manager/cli/plugins/plugin_management_commands.py

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,16 @@ def list_plugins(
3535
help="Show all plugins from marketplaces (not just enabled). Deprecated: use without marketplace argument instead.",
3636
),
3737
app_type: Optional[str] = typer.Option(
38-
None,
39-
"--app",
40-
"-a",
41-
help=f"App type to show plugins for ({', '.join(VALID_APP_TYPES)}). Shows all apps if not specified.",
38+
None, "--app", help=f"App type to show plugins for ({', '.join(VALID_APP_TYPES)}). Shows all apps if not specified.",
4239
),
4340
query: Optional[str] = typer.Option(
44-
None,
45-
"--query",
46-
"-q",
47-
help="Filter plugins by name or description",
41+
None, "--query", help="Filter plugins by name or description",
4842
),
4943
category: Optional[str] = typer.Option(
50-
None,
51-
"--category",
52-
"-c",
53-
help="Filter plugins by category",
44+
None, "--category", help="Filter plugins by category",
5445
),
5546
limit: int = typer.Option(
56-
50,
57-
"--limit",
58-
"-n",
59-
help="Maximum number of plugins to show",
47+
50, "--limit", help="Maximum number of plugins to show",
6048
),
6149
):
6250
"""List installed and available plugins from configured marketplaces.
@@ -428,17 +416,14 @@ def _print_repo(name: str, repo: PluginRepo, is_user: bool = False):
428416

429417
@plugin_app.command("add-repo")
430418
def add_repo(
431-
owner: str = typer.Option(..., "--owner", "-o", help="Repository owner"),
432-
name: str = typer.Option(..., "--name", "-n", help="Repository name"),
433-
branch: str = typer.Option("main", "--branch", "-b", help="Repository branch"),
419+
owner: str = typer.Option(..., "--owner", help="Repository owner"),
420+
name: str = typer.Option(..., "--name", help="Repository name"),
421+
branch: str = typer.Option("main", "--branch", help="Repository branch"),
434422
description: Optional[str] = typer.Option(
435-
None, "--description", "-d", help="Repository description"
423+
None, "--description", help="Repository description"
436424
),
437425
repo_type: str = typer.Option(
438-
"marketplace",
439-
"--type",
440-
"-t",
441-
help="Repository type (plugin or marketplace)",
426+
"marketplace", "--type", help="Repository type (plugin or marketplace)",
442427
),
443428
plugin_path: Optional[str] = typer.Option(
444429
None, "--plugin-path", help="Plugin path within the repository"

0 commit comments

Comments
 (0)