Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions code_assistant_manager/cli/agents_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,20 @@
)
AGENT_KEY_ARGUMENT = typer.Argument(..., help="Agent identifier")
APP_TYPE_OPTION = typer.Option(
"claude",
"--app",
"-a",
help="App type(s) to install to (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
"claude", "--app", help="App type(s) to install to (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
)
FORCE_OPTION = typer.Option(False, "--force", "-f", help="Skip confirmation")
OWNER_OPTION = typer.Option(..., "--owner", "-o", help="Repository owner")
NAME_OPTION = typer.Option(..., "--name", "-n", help="Repository name")
BRANCH_OPTION = typer.Option("main", "--branch", "-b", help="Repository branch")
OWNER_OPTION = typer.Option(..., "--owner", help="Repository owner")
NAME_OPTION = typer.Option(..., "--name", help="Repository name")
BRANCH_OPTION = typer.Option("main", "--branch", help="Repository branch")
AGENTS_PATH_OPTION_REPO = typer.Option(
None, "--agents-path", help="Agents subdirectory path"
)
APP_TYPE_OPTION_ALL = typer.Option(
None,
"--app",
"-a",
help="App type(s) to show (claude, codex, gemini, droid, codebuddy, opencode, all). Default shows all.",
None, "--app", help="App type(s) to show (claude, codex, gemini, droid, codebuddy, opencode, all). Default shows all.",
)
APP_TYPE_OPTION_UNINSTALL = typer.Option(
...,
"--app",
"-a",
help="App type(s) to uninstall all agents from (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
..., "--app", help="App type(s) to uninstall all agents from (claude, codex, gemini, droid, codebuddy, opencode, all). Comma-separated.",
)
from code_assistant_manager.plugins.fetch import parse_github_url

Expand Down
39 changes: 18 additions & 21 deletions code_assistant_manager/cli/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ def _create_lazy_tool_command(tool_name: str):
def tool_command(
ctx: Context,
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to settings.conf configuration file"
None, "--config", help="Path to settings.conf configuration file"
),
):
"""Launch the specified AI code editor."""
Expand Down Expand Up @@ -1217,10 +1217,7 @@ def make_placeholder(name):
def placeholder_cmd(
ctx: Context,
config: Optional[str] = typer.Option(
None,
"--config",
"-c",
help="Path to settings.conf configuration file",
None, "--config", help="Path to settings.conf configuration file",
),
):
# Replace this placeholder with the real command
Expand Down Expand Up @@ -1255,7 +1252,7 @@ def make_command(name, cls):
def command(
ctx: Context,
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to settings.conf configuration file"
None, "--config", help="Path to settings.conf configuration file"
),
):
"""Launch the specified AI code editor."""
Expand Down Expand Up @@ -1388,7 +1385,7 @@ def doctor(
ctx: Context,
verbose: bool = typer.Option(False, "--verbose", "-v", help="Show detailed output"),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Run diagnostic checks on the code-assistant-manager installation (alias: d)"""
Expand Down Expand Up @@ -1452,7 +1449,7 @@ def upgrade_command(
False, "--verbose", "-v", help="Enable verbose installer output"
),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Upgrade CLI tools (alias: u). If not installed, will install."""
Expand Down Expand Up @@ -1517,7 +1514,7 @@ def upgrade_alias_cmd(
ctx: Context,
target: str = typer.Argument("all", help="Tool to upgrade or 'all'"),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Alias for 'upgrade' command."""
Expand All @@ -1538,7 +1535,7 @@ def install_command(
False, "--verbose", "-v", help="Enable verbose installer output"
),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Install CLI tools (alias: i). Same as upgrade - if not installed, will install. If installed, will try to upgrade."""
Expand All @@ -1556,7 +1553,7 @@ def install_alias_cmd(
ctx: Context,
target: str = typer.Argument("all", help="Tool to install or 'all'"),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Alias for 'install' command."""
Expand All @@ -1578,7 +1575,7 @@ def uninstall_command(
False, "--keep-config", "-k", help="Keep configuration files"
),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Uninstall CLI tools and backup their configuration files."""
Expand All @@ -1603,7 +1600,7 @@ def uninstall_alias(
False, "--keep-config", "-k", help="Keep configuration files"
),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Alias for 'uninstall' command."""
Expand Down Expand Up @@ -1636,7 +1633,7 @@ def doctor_alias(
ctx: Context,
verbose: bool = typer.Option(False, "--verbose", "-v", help="Show detailed output"),
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
):
"""Alias for 'doctor' command."""
Expand All @@ -1652,7 +1649,7 @@ def doctor_alias(
@config_app.command("validate")
def validate_config(
config: Optional[str] = typer.Option(
None, "--config", "-c", help="Path to config file"
None, "--config", help="Path to config file"
),
verbose: bool = typer.Option(False, "--verbose", "-v", help="Show detailed output"),
):
Expand Down Expand Up @@ -1859,10 +1856,10 @@ def set_config(
),
value: str = typer.Argument(..., help="Value to set"),
app: str = typer.Option(
None, "-a", "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
None, "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
),
scope: str = typer.Option(
"user", "--scope", "-s", help="Configuration scope (user, project)"
"user", "--scope", help="Configuration scope (user, project)"
),
):
"""Set a configuration value for code assistants.
Expand Down Expand Up @@ -1951,10 +1948,10 @@ def unset_config(
..., help="Configuration key path (e.g., 'model' or 'codex.model')"
),
app: str = typer.Option(
None, "-a", "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
None, "--app", help="App/tool to operate on (claude, codex, droid, etc.)"
),
scope: str = typer.Option(
"user", "--scope", "-s", help="Configuration scope (user, project)"
"user", "--scope", help="Configuration scope (user, project)"
),
):
"""Unset a configuration value for code assistants.
Expand Down Expand Up @@ -2070,10 +2067,10 @@ def show_config(
None, help="Specific config key path to show (optional)"
),
app: str = typer.Option(
"claude", "-a", "--app", help="App to show config for (default: claude)"
"claude", "--app", help="App to show config for (default: claude)"
),
scope: Optional[str] = typer.Option(
None, "--scope", "-s", help="Filter by scope (user, project)"
None, "--scope", help="Filter by scope (user, project)"
),
):
"""Show configuration for an AI editor app in dotted notation format.
Expand Down
9 changes: 3 additions & 6 deletions code_assistant_manager/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import typer

# Module-level typer.Option constants to fix B008 linting errors
CONFIG_FILE_OPTION = typer.Option(None, "--config", "-c", help="Path to config file")
CONFIG_FILE_OPTION = typer.Option(None, "--config", help="Path to config file")
CONFIG_OPTION = typer.Option(
None, "--config", "-c", help="Path to settings.conf configuration file"
None, "--config", help="Path to settings.conf configuration file"
)
DEBUG_OPTION = typer.Option(False, "--debug", "-d", help="Enable debug logging")
ENDPOINTS_OPTION = typer.Option(
Expand All @@ -20,10 +20,7 @@
)
SHELL_OPTION = typer.Argument(..., help="Shell type (bash, zsh)")
SCOPE_OPTION = typer.Option(
"user",
"--scope",
"-s",
help="Configuration scope (user, project)",
"user", "--scope", help="Configuration scope (user, project)",
)
TARGET_OPTION = typer.Argument("all", help="Tool to upgrade or 'all'")
TOOL_ARGS_OPTION = typer.Argument(None, help="Arguments for the editor")
Expand Down
15 changes: 3 additions & 12 deletions code_assistant_manager/cli/plugins/plugin_discovery_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ def view_plugin(
help="Plugin name to view (e.g., 'document-skills' or 'awesome-plugins:document-skills')",
),
app_type: str = typer.Option(
"claude",
"--app",
"-a",
help=f"App type ({', '.join(VALID_APP_TYPES)})",
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
),
):
"""View detailed information about a specific plugin.
Expand Down Expand Up @@ -292,10 +289,7 @@ def view_plugin(
@plugin_app.command("status")
def plugin_status(
app_type: Optional[str] = typer.Option(
None,
"--app",
"-a",
help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
None, "--app", help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
),
):
"""Show plugin system status for an app, or all apps if none specified."""
Expand Down Expand Up @@ -481,10 +475,7 @@ def show_app_info(app: str, show_cam_config: bool = True):
@plugin_app.command("status")
def plugin_status(
app_type: Optional[str] = typer.Option(
None,
"--app",
"-a",
help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
None, "--app", help=f"App type ({', '.join(VALID_APP_TYPES)}). If not specified, shows status for all apps.",
),
):
"""Show plugin system status for an app, or all apps if none specified."""
Expand Down
30 changes: 6 additions & 24 deletions code_assistant_manager/cli/plugins/plugin_install_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,16 +373,10 @@ def install_plugin(
help="Plugin name or marketplace:plugin-name. Examples: 'code-reviewer' or 'awesome-plugins:code-reviewer'",
),
marketplace: Optional[str] = typer.Option(
None,
"--marketplace",
"-m",
help="Marketplace name (alternative to marketplace:plugin-name format)",
None, "--marketplace", help="Marketplace name (alternative to marketplace:plugin-name format)",
),
app_type: str = typer.Option(
"claude",
"--app",
"-a",
help=f"App type to install to ({', '.join(VALID_APP_TYPES)})",
"claude", "--app", help=f"App type to install to ({', '.join(VALID_APP_TYPES)})",
),
):
"""Install a plugin from available marketplaces.
Expand Down Expand Up @@ -490,10 +484,7 @@ def uninstall_plugin(
plugin: str = typer.Argument(..., help="Plugin name to uninstall"),
force: bool = typer.Option(False, "--force", "-f", help="Skip confirmation"),
app_type: str = typer.Option(
"claude",
"--app",
"-a",
help=f"App type to uninstall from ({', '.join(VALID_APP_TYPES)})",
"claude", "--app", help=f"App type to uninstall from ({', '.join(VALID_APP_TYPES)})",
),
):
"""Uninstall an installed plugin.
Expand Down Expand Up @@ -615,10 +606,7 @@ def _remove_plugin_from_settings(handler, plugin: str) -> bool:
def enable_plugin(
plugin: str = typer.Argument(..., help="Plugin name to enable"),
app_type: str = typer.Option(
"claude",
"--app",
"-a",
help=f"App type ({', '.join(VALID_APP_TYPES)})",
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
),
):
"""Enable a disabled plugin."""
Expand Down Expand Up @@ -657,10 +645,7 @@ def enable_plugin(
def disable_plugin(
plugin: str = typer.Argument(..., help="Plugin name to disable"),
app_type: str = typer.Option(
"claude",
"--app",
"-a",
help=f"App type ({', '.join(VALID_APP_TYPES)})",
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
),
):
"""Disable an enabled plugin."""
Expand Down Expand Up @@ -699,10 +684,7 @@ def disable_plugin(
def validate_plugin(
path: str = typer.Argument(..., help="Path to plugin or marketplace to validate"),
app_type: str = typer.Option(
"claude",
"--app",
"-a",
help=f"App type ({', '.join(VALID_APP_TYPES)})",
"claude", "--app", help=f"App type ({', '.join(VALID_APP_TYPES)})",
),
):
"""Validate a plugin or marketplace manifest."""
Expand Down
33 changes: 9 additions & 24 deletions code_assistant_manager/cli/plugins/plugin_management_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,16 @@ def list_plugins(
help="Show all plugins from marketplaces (not just enabled). Deprecated: use without marketplace argument instead.",
),
app_type: Optional[str] = typer.Option(
None,
"--app",
"-a",
help=f"App type to show plugins for ({', '.join(VALID_APP_TYPES)}). Shows all apps if not specified.",
None, "--app", help=f"App type to show plugins for ({', '.join(VALID_APP_TYPES)}). Shows all apps if not specified.",
),
query: Optional[str] = typer.Option(
None,
"--query",
"-q",
help="Filter plugins by name or description",
None, "--query", help="Filter plugins by name or description",
),
category: Optional[str] = typer.Option(
None,
"--category",
"-c",
help="Filter plugins by category",
None, "--category", help="Filter plugins by category",
),
limit: int = typer.Option(
50,
"--limit",
"-n",
help="Maximum number of plugins to show",
50, "--limit", help="Maximum number of plugins to show",
),
):
"""List installed and available plugins from configured marketplaces.
Expand Down Expand Up @@ -428,17 +416,14 @@ def _print_repo(name: str, repo: PluginRepo, is_user: bool = False):

@plugin_app.command("add-repo")
def add_repo(
owner: str = typer.Option(..., "--owner", "-o", help="Repository owner"),
name: str = typer.Option(..., "--name", "-n", help="Repository name"),
branch: str = typer.Option("main", "--branch", "-b", help="Repository branch"),
owner: str = typer.Option(..., "--owner", help="Repository owner"),
name: str = typer.Option(..., "--name", help="Repository name"),
branch: str = typer.Option("main", "--branch", help="Repository branch"),
description: Optional[str] = typer.Option(
None, "--description", "-d", help="Repository description"
None, "--description", help="Repository description"
),
repo_type: str = typer.Option(
"marketplace",
"--type",
"-t",
help="Repository type (plugin or marketplace)",
"marketplace", "--type", help="Repository type (plugin or marketplace)",
),
plugin_path: Optional[str] = typer.Option(
None, "--plugin-path", help="Plugin path within the repository"
Expand Down
Loading