tab-agent
v0.3.4
Published
Give LLMs full control of your browser - secure, click-to-activate automation for Claude, ChatGPT, Codex, and any AI
Downloads
902
Maintainers
Readme
Tab Agent
Browser control for Claude Code and Codex — click-to-activate security.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Claude Code │────▶│ Relay Server │────▶│ Extension │
│ or Codex │◀────│ (background) │◀────│ (Chrome) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌───────────────────┐
│ Your Active Tab │
│ 🟢 Click to ON │
└───────────────────┘Features
- Full browser control — navigate, click, type, scroll, screenshot, run JavaScript
- Uses your login sessions — access GitHub, Gmail, Amazon without sharing credentials
- Runs in background — relay starts automatically, works while you do other things
- Click-to-activate security — only tabs you explicitly enable, others stay private
- AI-optimized snapshots — pages converted to text with refs
[e1],[e2]for easy targeting - Works with Claude Code & Codex — installs skills automatically
Quick Start
# 1. Install extension
git clone https://github.com/DrHB/tab-agent
# Chrome: chrome://extensions → Developer mode → Load unpacked → select extension/
# 2. Setup
npx tab-agent setup
# 3. Activate & go
# Click extension icon on any tab (turns green)
# Ask Claude: "Search Amazon for mechanical keyboards and find the best rated"Example Tasks
# Research
"Go to Hacker News and summarize the top 5 stories"
# Shopping (uses your login!)
"Search Amazon for protein powder, filter by 4+ stars, find the best value"
# Social Media
"Check my GitHub notifications and list unread ones"
# Data Extraction
"Get the titles and prices of the first 10 products on this page"
# Automation
"Fill out this form with my details"Commands
# Core workflow
npx tab-agent snapshot # Get page content with refs [e1], [e2]...
npx tab-agent click <ref> # Click element (e.g., click e5)
npx tab-agent type <ref> <text> # Type into element
npx tab-agent fill <ref> <value> # Fill form field
# Navigation
npx tab-agent navigate <url> # Go to URL
npx tab-agent scroll <dir> [amount] # Scroll up/down
npx tab-agent press <key> # Press key (Enter, Escape, Tab)
# Utilities
npx tab-agent tabs # List active tabs
npx tab-agent wait <text> # Wait for text to appear
npx tab-agent screenshot # Capture page (fallback for complex UIs)Workflow: snapshot → use refs → click/type → snapshot again → repeat
Installation
1. Load Extension
git clone https://github.com/DrHB/tab-agent- Open
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked
- Select the
extension/folder
2. Run Setup
npx tab-agent setupThis auto-detects your extension and configures everything.
3. Activate Tabs
Click the Tab Agent icon on any tab you want to control. Green = active.
Security Model
| Feature | Tab Agent | Traditional Automation | |---------|--------------|----------------------| | Access | Only tabs you click to activate | Entire browser | | Sessions | Uses your cookies | Requires credentials | | Visibility | Green badge shows active tabs | Hidden/background | | Control | You choose what AI can access | Full access by default |
Your banking, email, and sensitive tabs stay completely isolated unless you explicitly activate them.
Supported Browsers
- Google Chrome
- Brave
- Microsoft Edge
- Chromium
Troubleshooting
Extension not detected?
- Make sure Developer mode is enabled in chrome://extensions
- Reload the extension
Commands not working?
- Click the extension icon — must show green "ON"
- Run
npx tab-agent statusto check configuration
No active tabs?
- Activate at least one tab by clicking the extension icon
How It Works
- Chrome Extension — Injects into activated tabs, captures DOM snapshots
- Relay Server — Bridges AI ↔ Extension via Chrome Native Messaging (runs in background)
- CLI — Simple commands for Claude Code and Codex
You: "Find cheap flights to Tokyo"
↓
Claude → npx tab-agent navigate "google.com/flights"
→ npx tab-agent snapshot
→ npx tab-agent type e5 "Tokyo"
→ npx tab-agent click e12
→ ...License
MIT
Keywords: browser automation, claude code, codex, AI browser control, web automation, puppeteer alternative, playwright alternative
