Skip to content

Commit 89c23c8

Browse files
jzhuclaude
andcommitted
feat: Add short aliases for all CLI commands
This commit adds short, memorable aliases for frequently used commands, improving CLI usability and reducing typing overhead. New short aliases: - v → version - c → completion - cf → config - m → mcp - Existing: d (doctor), u (upgrade), i (install), un (uninstall), l (launch) All short aliases are hidden from the main help to keep the help output clean, but they are fully functional and work with all their options. Examples: cam v # Show version cam c bash # Generate bash completion cam cf validate # Validate configuration cam m server list # List MCP servers cam d # Run diagnostic checks cam u all # Upgrade all tools This improves the developer experience by allowing faster command invocation while maintaining a clean help interface for new users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1bf9412 commit 89c23c8

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

code_assistant_manager/cli/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,10 @@ def command(
194194
app.add_typer(editor_app, name="l", hidden=True)
195195
# Add the config app as a subcommand to the main app
196196
app.add_typer(config_app, name="config")
197+
app.add_typer(config_app, name="cf", hidden=True)
197198
# Add the MCP app as a subcommand to the main app
198199
app.add_typer(mcp_app, name="mcp")
200+
app.add_typer(mcp_app, name="m", hidden=True)
199201

200202

201203
@config_app.command("validate")

code_assistant_manager/cli/commands.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ def version_command():
317317
raise typer.Exit()
318318

319319

320+
@app.command("v", hidden=True)
321+
def version_alias():
322+
"""Alias for 'version' command."""
323+
return version_command()
324+
325+
320326
def install(
321327
ctx: Context,
322328
target: str = TARGET_OPTION,
@@ -631,6 +637,12 @@ def completion(shell: str = SHELL_OPTION):
631637
typer.echo(completion_script)
632638

633639

640+
@app.command("c", hidden=True)
641+
def completion_alias_short(shell: str = SHELL_OPTION):
642+
"""Alias for 'completion' command."""
643+
return completion(shell)
644+
645+
634646
def generate_completion_script(shell: str) -> str:
635647
"""Generate a comprehensive completion script for the given shell."""
636648
if shell == "bash":

0 commit comments

Comments
 (0)