move rename-profile to clients rename

This commit is contained in:
2026-04-10 13:38:54 +02:00
parent 64970c8c86
commit 57c4ccc48a
6 changed files with 23 additions and 16 deletions
+12 -5
View File
@@ -121,9 +121,13 @@ main.add_command(search_group)
# ── clients ────────────────────────────────────────────────────────────────────
@main.command("clients")
def cmd_clients():
"""Show connected browser clients."""
@click.group("clients", invoke_without_command=True)
@click.pass_context
def clients_group(ctx):
"""Inspect and manage connected browser clients."""
if ctx.invoked_subcommand is not None:
return
profiles: dict[str, str] = {}
if REGISTRY_PATH.exists():
try:
@@ -168,13 +172,16 @@ def cmd_clients():
console.print(table)
@main.command("rename-profile")
main.add_command(clients_group)
@clients_group.command("rename")
@click.option(
"--browser", "target_browser", default=None, metavar="ALIAS",
help="Browser profile alias to rename. Overrides the global --browser option for this command.",
)
@click.argument("alias")
def cmd_rename_profile(target_browser, alias):
def cmd_clients_rename(target_browser, alias):
"""Set the profile alias used to identify this browser instance."""
try:
send_command("clients.rename_profile", {"alias": alias}, profile=target_browser)