A terminal for the browser for organizing tasks that require browser and terminal
- Shell 37.9%
- JavaScript 23.6%
- Python 20.8%
- HTML 16.6%
- Dockerfile 1.1%
| extension | ||
| host | ||
| img | ||
| .gitignore | ||
| Dockerfile | ||
| Jenkinsfile | ||
| PRIVACY.md | ||
| README.md | ||
| setup_host.sh | ||
| terminal-sidecar.md | ||
BrowserTerm
A low-latency, fully functional terminal emulator embedded directly in your Chrome Side Panel. This extension bridges Chrome to your local system shell (Bash/Zsh) using the Native Messaging API, allowing you to run CLIs like vi, top, git, and gemini without leaving the browser.
Features
- Side Panel Integration: Always-available terminal while you browse.
- Native Performance: Uses
xterm.jsconnected to a local PTY via Python backend. - Full Shell Access: Runs your actual system shell (
/bin/bash). - Interactive: Supports
vi,nano,top,htop, etc. - Resizing: Dynamic window resizing support (SIGWINCH).
- Persistent Configuration: Set a persistent startup directory (Gear Icon ⚙).
- ANSI Colors: Full
xterm-256colorsupport. - Context Menu: "Send to BrowserTerm" allows piping web text directly to your shell.
Installation
Prerequisites
- Google Chrome (Linux)
- Python 3 installed
- Git
Steps
-
Clone the Repository:
git clone https://git.adamoutler.com/aoutler/terminal-sidecar-chrome-extension.git cd terminal-sidecar-chrome-extension -
Install the Chrome Extension:
- Open Chrome and go to
chrome://extensions. - Enable Developer mode (top right).
- Click Load unpacked.
- Select the
extension/directory from this repository. - Copy the generated Extension ID (e.g.,
aaaaaaai36des4amii3vn3ysckqzojnl).
- Open Chrome and go to
-
Register the Native Host:
- Run the setup script to register the Python backend with Chrome:
./setup_host.sh - Note: The script automatically attempts to detect your Chrome config directory.
- Run the setup script to register the Python backend with Chrome:
-
Installation Steps:
- Install the Chrome Extension, open it, download
install_host.sh, runbash install_host.sh, then close and reopen the BrowserTerm side panel. No need to restart Chrome or change permissions.
- Install the Chrome Extension, open it, download
Usage
-
Open the Panel:
- Click the "Side Panel" icon in Chrome toolbar.
- Select "BrowserTerm" from the dropdown.
-
Configuration:
- Click the Gear Icon (⚙) to set a persistent Startup Directory (e.g.,
/home/user/projects).
- Click the Gear Icon (⚙) to set a persistent Startup Directory (e.g.,
-
Context Menu:
- Highlight any text on a webpage.
- Right-click -> "Send to BrowserTerm".
- The text will be pasted into your active shell.
Troubleshooting
-
"Disconnected from Native Host":
- Ensure the host script was installed correctly (the installer sets executable permissions).
- Verify
host/com.adamoutler.terminal_sidecar.jsonpath matches your actual file location. - Restart Chrome.
-
Wrong Colors/Size:
- The terminal automatically sets
TERM=xterm-256color. Try runningresetif valid output is garbled.
- The terminal automatically sets
Security Note
This extension grants the browser access to your local shell.
- Origin Locking: The native host only accepts connections from the specific Extension ID listed in
host/com.adamoutler.terminal_sidecar.json. - Input: Input is piped securely to the PTY; however, treat this terminal with the same security caution as your main system terminal.