Give LLMs full control of your browser - secure, click-to-activate automation for Claude, ChatGPT, Codex, and any AI
npm install 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 │
└───────────────────┘
- 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
`bash1. Install extension
git clone https://github.com/DrHB/tab-agentChrome: chrome://extensions → Developer mode → Load unpacked → select extension/
Example Tasks
`bash
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
`bash
Core workflow
npx tab-agent snapshot # Get page content with refs [e1], [e2]...
npx tab-agent click # Click element (e.g., click e5)
npx tab-agent type # Type into element
npx tab-agent fill # Fill form fieldNavigation
npx tab-agent navigate # Go to URL
npx tab-agent scroll [amount] # Scroll up/down
npx tab-agent press # Press key (Enter, Escape, Tab)Utilities
npx tab-agent tabs # List active tabs
npx tab-agent wait # Wait for text to appear
npx tab-agent screenshot # Capture page (fallback for complex UIs)
`Workflow:
snapshot → use refs → click/type → snapshot again → repeatInstallation
$3
`bash
git clone https://github.com/DrHB/tab-agent
`1. Open
chrome://extensions
2. Enable Developer mode (top right)
3. Click Load unpacked
4. Select the extension/ folder$3
`bash
npx tab-agent setup
`This auto-detects your extension and configures everything.
$3
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 status to check configurationNo active tabs?
- Activate at least one tab by clicking the extension icon
How It Works
1. Chrome Extension — Injects into activated tabs, captures DOM snapshots
2. Relay Server — Bridges AI ↔ Extension via Chrome Native Messaging (runs in background)
3. 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
→ ...
``MIT
---
Keywords: browser automation, claude code, codex, AI browser control, web automation, puppeteer alternative, playwright alternative