Skip to content

Commit 89d03a6

Browse files
feat: add alias for commands
1 parent f0900f6 commit 89d03a6

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/mcpm/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ def main(ctx, help_flag):
123123
commands_table.add_row(" [cyan]config[/]", "Manage MCPM configuration.")
124124
commands_table.add_row(" [cyan]inspector[/]", "Launch the MCPM Inspector UI to examine servers.")
125125
commands_table.add_row(" [cyan]list/ls[/]", "List all installed MCP servers.")
126-
commands_table.add_row(" [cyan]remove[/]", "Remove an installed MCP server.")
126+
commands_table.add_row(" [cyan]remove/rm[/]", "Remove an installed MCP server.")
127127
commands_table.add_row(" [cyan]search[/]", "Search available MCP servers.")
128128
commands_table.add_row(" [cyan]stash[/]", "Temporarily store a server configuration aside.")
129129
commands_table.add_row(" [cyan]pop[/]", "Restore a previously stashed server configuration.")
130130
commands_table.add_row(" [cyan]profile[/]", "Manage MCPM profiles.")
131-
commands_table.add_row(" [cyan]mv[/]", "Move a server from one client/profile to another.")
132-
commands_table.add_row(" [cyan]cp[/]", "Copy a server from one client/profile to another.")
131+
commands_table.add_row(" [cyan]move/mv[/]", "Move a server from one client/profile to another.")
132+
commands_table.add_row(" [cyan]copy/cp[/]", "Copy a server from one client/profile to another.")
133133
commands_table.add_row(" [cyan]activate[/]", "Activate a profile.")
134134
commands_table.add_row(" [cyan]deactivate[/]", "Deactivate a profile.")
135135
console.print(commands_table)
@@ -142,6 +142,7 @@ def main(ctx, help_flag):
142142
# Register commands
143143
main.add_command(search.search)
144144
main.add_command(remove.remove)
145+
main.add_command(remove.remove, name="rm")
145146
main.add_command(add.add)
146147
main.add_command(list.list)
147148
main.add_command(list.list, name="ls")
@@ -153,7 +154,9 @@ def main(ctx, help_flag):
153154
main.add_command(config.config)
154155
main.add_command(inspector.inspector, name="inspector")
155156
main.add_command(profile.profile, name="profile")
157+
main.add_command(transfer.move)
156158
main.add_command(transfer.move, name="mv")
159+
main.add_command(transfer.copy)
157160
main.add_command(transfer.copy, name="cp")
158161
main.add_command(profile.activate)
159162
main.add_command(profile.deactivate)

src/mcpm/commands/server_operations/remove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
console = Console()
2020

2121

22-
@click.command("rm")
22+
@click.command()
2323
@click.argument("server_name")
2424
@click.option("--force", is_flag=True, help="Force removal without confirmation")
2525
def remove(server_name, force):

src/mcpm/commands/server_operations/transfer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def determine_source_and_destination(
4949
)
5050

5151

52-
@click.command("cp")
52+
@click.command()
5353
@click.argument("source")
5454
@click.argument("destination")
5555
@click.option("--force", is_flag=True, help="Force copy even if destination already exists")
@@ -104,7 +104,7 @@ def copy(source, destination, force=False):
104104
)
105105

106106

107-
@click.command("mv")
107+
@click.command()
108108
@click.argument("source")
109109
@click.argument("destination")
110110
@click.option("--force", is_flag=True, help="Force move even if destination already exists")

0 commit comments

Comments
 (0)