No description
  • Python 67.4%
  • JavaScript 26%
  • Shell 2.6%
  • Rust 2.6%
  • Dockerfile 0.7%
  • Other 0.7%
Find a file
SouthFox bbe40e3fad
Some checks failed
Build Python Package And Smoke Run / deploy (push) Has been cancelled
Run Unit Tests / build (macos-latest, 3.10) (push) Has been cancelled
Run Unit Tests / build (macos-latest, 3.11) (push) Has been cancelled
Run Unit Tests / build (macos-latest, 3.12) (push) Has been cancelled
Run Unit Tests / build (ubuntu-latest, 3.10) (push) Has been cancelled
Run Unit Tests / build (ubuntu-latest, 3.11) (push) Has been cancelled
Run Unit Tests / build (ubuntu-latest, 3.12) (push) Has been cancelled
Run Unit Tests / build (windows-latest, 3.10) (push) Has been cancelled
Run Unit Tests / build (windows-latest, 3.11) (push) Has been cancelled
Run Unit Tests / build (windows-latest, 3.12) (push) Has been cancelled
[fix] ensure valid event loop
https://github.com/balta2ar/brotab/pull/139
2026-04-03 15:55:55 +08:00
.github/workflows yaml formatting 2025-01-11 21:17:38 +01:00
assets add assets that are used in chrome webstore 2018-09-22 16:01:09 +03:00
brotab [fix] ensure valid event loop 2026-04-03 15:55:55 +08:00
requirements Merge branch 'master' into 2023-10-features 2025-01-11 21:24:38 +01:00
shell fzf: +text, html 2022-07-03 15:23:31 +02:00
src meddling with rust cli implementation 2018-08-18 16:30:06 +03:00
.gitignore fix edit_tabs_in_editor, add tests 2020-02-16 14:14:26 +01:00
.pylintrc pylintrc 2021-12-28 18:27:35 +01:00
Cargo.lock commit current state 2019-10-25 23:34:43 +02:00
Cargo.toml meddling with rust cli implementation 2018-08-18 16:30:06 +03:00
CHANGELOG.md Bump version from 1.4.2 to 1.5.0 2025-01-22 21:02:00 +01:00
DEVELOPMENT.md Bump version from 1.4.2 to 1.5.0 2025-01-22 21:02:00 +01:00
Dockerfile.integration tests: integration: docker file adjustements 2022-02-20 13:48:20 +01:00
fastentrypoints.py speedup startup, send list tabs in parallel, get rid of requests 2018-09-16 20:53:19 +03:00
INTEGRATION.md tests: first step to setting up integration tests in docker again 2022-02-20 13:48:05 +01:00
jess.Dockerfile tests: first step to setting up integration tests in docker again 2022-02-20 13:48:05 +01:00
LICENSE Add License file with Copyright year 2018-09-14 22:38:12 +01:00
Makefile tests: xhost +local:docker 2022-05-28 16:14:16 +02:00
MANIFEST.in fixes to make sure uv build works 2025-01-11 21:06:37 +01:00
README.md readme: add uv tool install 2025-01-11 21:11:17 +01:00
setup.py the world has moved on 2025-01-11 21:17:31 +01:00
smoke.Dockerfile tests: integration: more makefile commands 2022-02-20 14:05:47 +01:00
startup.sh tests: first step to setting up integration tests in docker again 2022-02-20 13:48:05 +01:00
test_build_install_run.sh tests: integration: more makefile commands 2022-02-20 14:05:47 +01:00
xvfb-chromium extra paths in which 2022-02-20 13:49:15 +01:00

BroTab

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

Control your browser's tabs from the terminal.

About

No command has been specified
usage: bt [-h] {move,list,close,activate,search,open,words,text,html,dup,windows,clients} ...

bt (brotab = 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,search,index,open,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 tabs for each client/window in the following
                        format: "<prefix>.<window_id>.<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.
    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
    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: bt navigate <tab_id> "<url>", e.g. bt 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/API/tabs/update Example: echo
                        '[{"tab_id":"a.2118.2156",
                        "properties":{"url":"https://google.com"}}]' | bt update 2.
                        arguments, e.g.: bt update -tabId b.1.862
                        -url="http://www.google.com" +muted
    words               show sorted unique words from all active tabs of all
                        clients. This is a helper for webcomplete deoplete plugin
                        that helps complete words from the browser
    text                show text from all tabs
    html                show html from all tabs
    dup                 display reminder on how to close 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 bt mediator (native
                        messaging app)

optional arguments:
  -h, --help            show this help message and exit
  --target TARGET_HOSTS
                        Target hosts IP:Port

Demo [TBD]

Features to show:

  • list tabs
  • close multiple tabs (fzf)
  • move tabs, move, same window
  • move tabs, move, different window
  • move tabs, move, different browser (NOT IMPLEMENTED)
  • move tabs, close
  • words, complete in neovim (integration with coc, ncm2, deoplete)
  • open tabs by url
  • open tab by google query, search (should be extendable, NOT IMPLEMENTED)
  • integration with fzf:
    • activate tab
    • close tabs
  • integration with rofi:
    • activate tab
    • close tabs
  • integration with albert
    • index text of available tabs (requires sqlite 3.25, fts5 plugin)
    • search a tab by text in albert
  • show duplicate tabs and close them

Installation

  1. Install command-line client:
$ pipx install brotab        # preferred method, if pipx not installed: $ sudo apt install pipx
$ uv tool install brotab     # alternative
$ pip install --user brotab  # alternative
$ sudo pip install brotab    # alternative
  1. Install native app manifests: bt install
  2. Install Firefox extension: https://addons.mozilla.org/en-US/firefox/addon/brotab/
  3. Install Chrome (Chromium) / Brave extension: https://chrome.google.com/webstore/detail/brotab/mhpeahbikehnfkfnmopaigggliclhmnc/
  4. Enjoy! (try bt clients, bt windows, bt list, bt words)

Build, test and manual installation

see DEVELOPMENT.md

  • TabFS -- mounts tabs info a filesystem using FUSE
  • dudetab -- collection of useful scripts on top of brotab
  • ulauncher-brotab -- Ulauncher extension for brotab
  • cmp-brotab -- brotab completion for nvim-cmp
  • tab-search -- shows a nice icon with a number of tabs (Firefox)
  • tab_wrangler -- a text-based tab browser for tabaholics
  • vimium-c -- switch between tabs/history, close tabs with shift-del

Author

Yuri Bochkarev

License

MIT