diff --git a/README.md b/README.md index 5e89270..8eb10e5 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ browser-cli/ All commands are run with `uv run browser-cli [--browser ALIAS] `. -If exactly one browser instance is connected, commands auto-target it. Use `--browser ALIAS` when multiple browser instances are connected. `tabs list`, `tabs count`, `group list`, `group count`, and `windows list` are the only commands that aggregate across all active browsers when `--browser` is omitted; in that mode they show the source browser alias or UUID. You can inspect the active instances with `browser-cli clients` and assign a persistent profile alias from inside the target browser with `browser-cli rename-profile --browser `. Closed browsers are removed from the client registry automatically. +If exactly one browser instance is connected, commands auto-target it. Use `--browser ALIAS` when multiple browser instances are connected. `tabs list`, `tabs count`, `groups list`, `groups count`, and `windows list` are the only commands that aggregate across all active browsers when `--browser` is omitted; in that mode they show the source browser alias or UUID. You can inspect the active instances with `browser-cli clients` and assign a persistent profile alias from inside the target browser with `browser-cli rename-profile --browser `. Closed browsers are removed from the client registry automatically. Important: profile aliases are browser-instance aliases, not window aliases. Window aliases created with `windows rename` are only for targeting windows in commands like `nav open --window work`. If a browser instance has no explicit profile alias set, the native host gives it a generated UUID alias so multiple unaliased browsers stay distinct. @@ -203,19 +203,19 @@ browser-cli tabs merge-windows # pull all tabs into the current wi ### Tab groups ```sh -browser-cli group list # list all tab groups -browser-cli group count # count groups -browser-cli group query "work" # search groups by name -browser-cli group tabs 42 # list tabs inside group ID 42 +browser-cli groups list # list all tab groups +browser-cli groups count # count groups +browser-cli groups query "work" # search groups by name +browser-cli groups tabs 42 # list tabs inside group ID 42 -browser-cli group create "research" # create a new group -browser-cli group add-tab research # open a blank tab in the group -browser-cli group add-tab research https://example.com # open URL in the group -browser-cli group add-tab 42 https://example.com # by group ID +browser-cli groups create "research" # create a new group +browser-cli groups add-tab research # open a blank tab in the group +browser-cli groups add-tab research https://example.com # open URL in the group +browser-cli groups add-tab 42 https://example.com # by group ID -browser-cli group close 42 # ungroup the group -browser-cli group move research --forward # move group right -browser-cli group move 42 --backward # move group left +browser-cli groups close 42 # ungroup the group +browser-cli groups move research --forward # move group right +browser-cli groups move 42 --backward # move group left ``` ### Windows diff --git a/browser_cli/commands/groups.py b/browser_cli/commands/groups.py index be7fbcd..9459e75 100644 --- a/browser_cli/commands/groups.py +++ b/browser_cli/commands/groups.py @@ -59,7 +59,7 @@ def _print_groups(groups: list[dict], *, show_browser: bool = False) -> None: console.print(table) -@click.group("group") +@click.group("groups") def group_group(): """Manage tab groups.""" diff --git a/tests/test_cli.py b/tests/test_cli.py index e546e54..0933732 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -162,7 +162,7 @@ def test_group_count_multi_browser_shows_total(): BrowserTarget("work", "work", "/tmp/work.sock"), ], ), patch("browser_cli.commands.groups.send_command", side_effect=fake_send_command): - result = CliRunner().invoke(main, ["group", "count"]) + result = CliRunner().invoke(main, ["groups", "count"]) assert result.exit_code == 0 assert "Browser" in result.output @@ -175,7 +175,7 @@ def test_group_list_leaves_unnamed_group_cell_empty(): "browser_cli.commands.groups.send_command", return_value=[{"id": 42, "title": "", "color": "grey", "collapsed": False, "tabCount": 1}], ): - result = CliRunner().invoke(main, ["group", "list"]) + result = CliRunner().invoke(main, ["groups", "list"]) assert result.exit_code == 0 assert "(unnamed)" not in result.output