Skip to main content

nixbot BruvTab logo

BruvTab

GitHub GitHub tag (latest by date) PyPI version Mozilla Add-on

Control your browser's tabs from the terminal.

BruvTab is a fork of brotab, originally created by Yuri Bochkarev.

Features

  • Cross-browser: Support for Firefox, Chrome, Chromium, and Brave.
  • Unified interface: List and manage tabs from multiple browsers in a single view.
  • Scriptable: Ideal for use with fzf, rofi, or custom shell scripts.
  • JSON support: Global --json flag with pretty output and terminal colors.
  • Search & Index: Index tab contents and search them using SQLite FTS5.
  • Rich Output: Colorized help and tables using the rich library.
  • Close confirmations: On Chromium, BruvTab can close tabs that ask for confirmation using debugger access. Unsaved changes may be lost.
  • Chromium debugging: Capture full-page screenshots and PDFs, or stream a tab's console and network events.

Usage

For Chromium tabs, bruvtab screenshot TAB --full-page --raw > page.png captures the whole page, and bruvtab pdf TAB -o page.pdf saves a PDF. Use bruvtab console TAB or bruvtab network TAB to stream events as JSON lines until Ctrl-C; --duration SECONDS stops automatically. These commands require the Chromium extension's debugger permission.

Usage: bruvtab [-h] [--target TARGET_HOSTS] [--json]
               {move,list,close,activate,active,screenshot,search,query,index,new,open,navigate,update,words,text,html,dup,windows,clients,install} ...

bruvtab (bruvtab = Browser Tabs) is a command-line tool that helps you manage browser tabs. It
can help you list, close, reorder, open and activate your tabs.

Positional Arguments:
  {move,list,close,activate,active,screenshot,search,query,index,new,open,navigate,update,words,text,html,dup,windows,clients,install}
    move                move tabs around. This command lists available tabs and runs the editor.
                        In the editor you can 1) reorder tabs -- tabs will be moved in the
                        browser 2) delete tabs -- tabs will be closed 3) change window ID of the
                        tabs -- tabs will be moved to specified windows
    list                list available tabs. The command will request all available clients
                        (browser plugins, mediators), and will display browser tabs in the
                        following format: "<prefix>.<window_id>.<tab_id><Tab>Page title<Tab>URL"
    close               close specified tab IDs. Tab IDs should be in the following format:
                        "<prefix>.<window_id>.<tab_id>". You can use "list" command to obtain tab
                        IDs (first column)
    activate            activate given tab ID. Tab ID should be in the following format:
                        "<prefix>.<window_id>.<tab_id>"
    active              display active tab for each client/window in the following format:
                        "<prefix>.<window_id>.<tab_id>"
    screenshot          return base64 screenshot in json object with keys: 'data' (base64 png),
                        'tab' (tab id of visible tab), 'window' (window id of visible tab), 'api'
                        (prefix of client api). Optionally target a specific tab ID.
    search              Search across your indexed tabs using sqlite fts5 plugin.
    query               Filter tabs using chrome.tabs api.
    index               Index the text from browser's tabs. Text is put into sqlite fts5 table.
    new                 open new tab with the Google search results of the arguments that follow.
                        One positional argument is required: <prefix>.<window_id> OR <client>. If
                        window_id is not specified, URL will be opened in the active window of
                        the specifed client
    open                open URLs from the stdin (one URL per line). One positional argument is
                        required: <prefix>.<window_id> OR <client>. If window_id is not
                        specified, URL will be opened in the active window of the specifed
                        client. If window_id is 0, URLs will be opened in new window.
    navigate            navigate to URLs. There are two ways to specify tab ids and URLs: 1.
                        stdin: lines with pairs of "tab_id<tab>url" 2. arguments: bruvtab
                        navigate <tab_id> "<url>", e.g. bruvtab navigate b.20.1
                        "https://google.com" stdin has the priority.
    update              Update tabs state, e.g. URL. There are two ways to specify updates: 1.
                        stdin, pass JSON of the form: [{"tab_id": "b.20.130", "properties":
                        {"url": "http://www.google.com"}}] Where "properties" can be anything
                        defined here:
                        https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/AP
                        I/tabs/update Example: echo '[{"tab_id":"a.2118.2156",
                        "properties":{"url":"https://google.com"}}]' | bruvtab update 2.
                        arguments, e.g.: bruvtab update -tabId b.1.862
                        -url="http://www.google.com" +muted
    words               show sorted unique words from all active tabs of all clients or from
                        specified tabs. This is a helper for webcomplete plugin that helps
                        complete words from the browser
    text                show text from all tabs or from specified tabs
    html                show html from all tabs or from specified tabs
    dup                 display reminder on how to show duplicate tabs using command-line tools
    windows             display available prefixes and window IDs, along with the number of tabs
                        in every window
    clients             display available browser clients (mediators), their prefixes and address
                        (host:port), native app PIDs, and browser names
    install             configure browser settings to use bruvtab mediator (native messaging app)

Options:
  -h, --help            show this help message and exit
  --target TARGET_HOSTS
                        Target hosts IP:Port
  --json                Pretty JSON output (colored on terminals)

Installation

Standard (uv)

  1. Install command-line client:
uv tool install bruvtab
  1. Install native app manifests:
bruvtab install
  1. Install Browser extension:
  • Firefox: Prefer the signed XPI attached to each GitHub release, or use the flake's self-hosted XPI output (firefoxAddon, alias firefoxXpi). The release workflow publishes listed AMO builds and signs separate self-distributed XPIs for GitHub releases.
  • Chrome/Brave/Chromium: Prefer the Chrome Web Store build once published. The release workflow also uploads Chrome CRX/ZIP artifacts and a self-hosted update manifest to GitHub releases.

Shell completions

BruvTab ships dynamic completions for bash and zsh via argcomplete.

For pipx, uv tool, or pip installs, enable them in your shell:

eval "$(register-python-argcomplete --shell bash bruvtab)"
eval "$(register-python-argcomplete --shell zsh bruvtab)"

The Nix package installs completion files into the standard locations:

  • share/bash-completion/completions/bruvtab
  • share/zsh/site-functions/_bruvtab

NixOS / Home Manager

Add bruvtab as an input to your flake. For Chromium/Home Manager, you can either pin the packaged CRX from the flake output or point Chrome at the published update manifest URL.

Using the packaged CRX directly:

{ config, pkgs, inputs, ... }:
let
  bruvtabPkg = inputs.bruvtab.packages.${pkgs.system}.bruvtab;
  bruvtabCrx = inputs.bruvtab.packages.${pkgs.system}.chromeCrx;
  bruvtabFirefoxAddon = inputs.bruvtab.packages.${pkgs.system}.firefoxAddon;
  # The Extension ID is calculated from the private key generated during build
  extensionId = builtins.readFile "${bruvtabCrx}/extension-id";
in
{
  programs.firefox.profiles.default.extensions.packages = [
    bruvtabFirefoxAddon
  ];

  programs.chromium = {
    enable = true;
    extensions = [
      {
        id = extensionId;
        crxPath = "${bruvtabCrx}/bruvtab.crx";
        inherit (bruvtabPkg) version;
      }
    ];
    nativeMessagingHosts = [ bruvtabPkg ];
  };
}

Using the published update manifest URL for auto-updates from GitHub releases:

{
  programs.chromium.extensions = [
    {
      id = "edpgjheobdplebiikjgjgpmonakingef";
      updateUrl = "https://github.com/pschmitt/bruvtab/releases/latest/download/bruvtab-chrome-updates.xml";
    }
  ];
}

Development

Setup

# Setup virtual environment and install dependencies
uv sync --all-extras
# Install native manifests for testing
bruvtab install --tests

Testing

Run all tests:

just test-all

Or run individual suites:

just unit-test
just smoke-test
just integration-test  # Requires Docker
  • TabFS -- mounts tabs info a filesystem using FUSE
  • dudetab -- collection of useful scripts on top of bruvtab
  • ulauncher-bruvtab -- Ulauncher extension for bruvtab
  • cmp-bruvtab -- bruvtab completion for nvim-cmp

Authors

License

MIT

Metadata

Release files for bruvtab 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bruvtab 2.1.0
File Size Uploaded Provenance Actions
bruvtab-2.1.0.tar.gz 61.4 kB With provenance Details for bruvtab-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bruvtab 2.1.0
File Interpreter ABI Platform Actions
bruvtab-2.1.0-py3-none-any.whl Python 3 none any Details for bruvtab-2.1.0-py3-none-any.whl

Total release size: 129.6 kB

Release files / bruvtab-2.1.0.tar.gz

Download URL bruvtab-2.1.0.tar.gz
Size 61.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a1031d27769f3930a4b24448baead46e0d39f5c966ad6465fb4f948dbb12ed97
BLAKE2b-256 checksum
How to use checksums
4f789fdc63f6520d562c80bfb16d487833bda9b0ee77a67ec58e766f05324064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / bruvtab-2.1.0-py3-none-any.whl

Download URL bruvtab-2.1.0-py3-none-any.whl
Size 68.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
195d993d29c68d52f9022bb51a2d488576e13823d9b331f7a48fa2421972ccef
BLAKE2b-256 checksum
How to use checksums
5d5364d60ea1092b6b4426e384abe19014fd81077c72d276693085050390dc3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for bruvtab 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bruvtab-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page