There are many exciting online services, and I hope to access them using Emacs.
Auto Browser is a bridge between Emacs and the browser, allowing control of the browser and quick access to web pages.
It only supports Chromium-based browsers because it relies on remote-debugging-port.
Auto Browser provides some simple APIs to control the browser and access pages and elements on a page. You can see the API reference here.
- Chromium-based browsers: Your daily browser.
- Python : 3.6 and above
- websocket-bridge: A bridge that connects Emacs and Python programs via WebSocket.
- shr : To render html.
- clone the project in your own emacs configuration files directory, like:
git clone git@github.com:ginqi7/auto-browser.git ~/.emacs.d/lisp/auto-browser git clone git@github.com:ginqi7/websocket-bridge.git ~/.emacs.d/lisp/websocket-bridge git clone git@github.com:ahyatt/emacs-websocket.git ~/.emacs.d/lisp/emacs-websocket
The emacs-websocket can be downloaded from ELPA.
- add the path to ‘load-path’
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/d/lisp/auto-browser")) (add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/d/lisp/auto-browser/plugins")) (add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/websocket-bridge")) (add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/emacs-websocket"))
It is recommended to create a dedicated Python environment for auto-browser, so it does not interfere with the regular Python environment, for example:
python3 -m venv auto-browser/SOME_PATH/auto-browser/bin/pip3 install sexpdata websocket_bridge_python DrissionPage readability-lxml lxml_html_clean
Run Chrome with –remote-debugging-port=9222
"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" --remote-debugging-port=9222Here are a few variables that can be used for configuration:
(require 'auto-browser)
;; Different plugins, different packages introduced
(require 'web-ai)
(require 'anki)
(require 'miniflux)
(require 'telegram)
(require 'twitter)
(require 'console)
(setq auto-browser-python "~/auto-browser/bin/python3") ;; Specify the path of the python command you are using.
(setq auto-browser-miniflux-base-url "http://127.0.0.1") ;; The address of Miniflux you are using
;; You can define shortcut access keys through transient
(transient-define-prefix prefix-auto-browser ()
"Prefix for auto browser."
["Command"
("a" "Anki" auto-browser-anki-study)
("w" "Web AI" auto-browser-web-ai-input)
("m" "Miniflux" auto-browser-miniflux-open-unread)
("t" "Telegram" auto-browser-telegram-list-dialogues)
("x" "Twitter" auto-browser-twitter-following)
("c" "console" auto-browser-console-org-send)])
;; Bind a shortcut key.
(keymap-global-set "C-c a" #'prefix-auto-browser)
;; start auto-browser
(auto-browser-restart)- Anki Detailed Description
- Twitter Detailed Description
- Miniflux Detailed Description
- Telegram Detailed Description
- Console Detailed Description
When encountering issues during use, you can call websocket-bridge-app-log-buffer to view the problem log of auto-browser.


