Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

brand: logo, banner, icon + comprehensive README with feature set

bot6e0a1ac28fb0
diff --git a/README.md b/README.md
index 6f6286da..4bd7b91d 100644
--- a/README.md
+++ b/README.md
@@ -1,75 +1,195 @@
-# Browser Bridge
+<p align="center">
+ <img src="assets/logo-banner.svg" alt="pinchtab" width="600"/>
+</p>
-Local browser control service for AI agents. Runs on your machine, connects to your Chrome, survives restarts.
+<p align="center">
+ <strong>Browser control for AI agents.</strong><br/>
+ 12MB Go binary. Zero config. Accessibility-first.
+</p>
+
+<p align="center">
+ <img src="https://img.shields.io/badge/lang-Go-00ADD8?style=flat-square" alt="Go"/>
+ <img src="https://img.shields.io/badge/binary-12MB-FFD700?style=flat-square" alt="12MB"/>
+ <img src="https://img.shields.io/badge/interface-HTTP-00ff88?style=flat-square" alt="HTTP"/>
+ <img src="https://img.shields.io/badge/license-MIT-888?style=flat-square" alt="MIT"/>
+</p>
+
+---
## Why
-Agents need a browser that:
-- **Persists sessions** — cookies, auth, tabs survive Chrome/agent restarts
-- **Is directly controllable** — any agent talks to it via HTTP, no SDK needed
-- **Uses accessibility trees** — not screenshots. 4x cheaper, works with any LLM
-- **Stays out of the way** — zero config, single process, no cloud
+AI agents need browsers. Current options are either:
+- **Screenshot-based** — expensive (vision model tokens), slow, unreliable
+- **Framework-locked** — MCP-only, Python-only, requires specific agent
+- **Cloud-first** — want you on their servers, not your machine
-## Architecture
+Pinchtab is different:
+- **Accessibility tree as primary interface** — 4x cheaper than screenshots, works with any LLM
+- **Plain HTTP API** — any agent, any language, even `curl`
+- **Self-contained** — launches its own Chrome, manages the process
+- **Stealth mode** — bypasses bot detection (Google, X/Twitter, etc.)
+- **Persistent sessions** — log in once, stays logged in across restarts
-```
-┌─────────────┐ HTTP :18800 ┌──────────────┐ CDP ┌─────────┐
-│ Any Agent │ ──────────────► │ Browser │ ─────────────► │ Chrome │
-│ (OpenClaw, │ snapshot, act, │ Bridge │ DevTools │ │
-│ PicoClaw, │ navigate, eval │ │ Protocol │ │
-│ curl) │ │ sessions + │ │ │
-└─────────────┘ │ tab state │ └─────────┘
- └──────────────┘
+## Quick Start
+
+```bash
+# Build
+go build -o pinchtab .
+
+# Run (launches Chrome window — you can see and interact)
+./pinchtab
+
+# Run headless
+BRIDGE_HEADLESS=true ./pinchtab
```
-## API
+Chrome opens. You log into your sites. Agents drive the rest.
-```bash
-# What's open
-curl localhost:18800/tabs
+## Features
+
+### 🌲 Accessibility-First Snapshots
+The primary interface. Returns a structured tree of every element on the page with stable refs (`e0`, `e1`, `e2`...) that agents can click, type into, or read.
-# See the page (accessibility tree — cheap, structured, actionable)
+```bash
curl localhost:18800/snapshot?tabId=X
+```
+```json
+{
+ "url": "https://x.com/search?q=%24hims",
+ "title": "$hims - Search / X",
+ "count": 47,
+ "nodes": [
+ {"ref": "e0", "role": "searchbox", "name": "Search query", "nodeId": 206},
+ {"ref": "e1", "role": "link", "name": "Deep Value Investing @DeepIceValue", "nodeId": 412},
+ {"ref": "e2", "role": "button", "name": "Like", "nodeId": 445}
+ ]
+}
+```
-# Interact
-curl -X POST localhost:18800/action -d '{"tabId":"X","kind":"click","ref":"e5"}'
-curl -X POST localhost:18800/action -d '{"tabId":"X","kind":"type","ref":"e12","text":"hello"}'
+### 🎯 Smart Filters
+Don't waste tokens on 200 nodes when you need 10 buttons:
+```bash
+# Only interactive elements (buttons, links, inputs)
+curl localhost:18800/snapshot?tabId=X&filter=interactive
+
+# Limit tree depth
+curl localhost:18800/snapshot?tabId=X&depth=3
+```
-# Navigate
-curl -X POST localhost:18800/navigate -d '{"tabId":"X","url":"https://example.com"}'
+### 🖱️ Direct Actions
+Click, type, fill — by accessibility ref or CSS selector:
+```bash
+# Click by ref
+curl -X POST localhost:18800/action -d '{"tabId":"X","kind":"click","ref":"e5"}'
-# Run JS
-curl -X POST localhost:18800/evaluate -d '{"tabId":"X","expression":"document.title"}'
+# Type in a field
+curl -X POST localhost:18800/action -d '{"tabId":"X","kind":"type","ref":"e0","text":"$hims"}'
-# Visual check (opt-in, expensive)
-curl localhost:18800/screenshot?tabId=X
+# Press a key
+curl -X POST localhost:18800/action -d '{"tabId":"X","kind":"press","key":"Enter"}'
-# Readable text (like reader mode)
-curl localhost:18800/text?tabId=X
+# By CSS selector
+curl -X POST localhost:18800/action -d '{"tabId":"X","kind":"click","selector":"button.submit"}'
```
-## Sessions
+### 🕵️ Stealth Mode
+Pinchtab patches `navigator.webdriver`, spoofs user agent, hides automation flags. Sites like X.com and Google treat it as a normal browser. Log in, stay logged in.
-Browser Bridge saves tab state (URLs, positions) to `~/.browser-bridge/sessions.json`. When Chrome restarts, it restores your tabs. When the bridge restarts, it reconnects.
+### 💾 Session Persistence
+Chrome profile saved at `~/.browser-bridge/chrome-profile/`. Cookies, localStorage, auth tokens — all persist across restarts. Tabs are saved to `~/.browser-bridge/sessions.json` on shutdown.
-Auth cookies, localStorage, sessionStorage — all live in Chrome's profile. Bridge doesn't touch them, they just persist naturally.
+### 📝 Text Extraction
+Get readable page text without the tree overhead:
+```bash
+curl localhost:18800/text?tabId=X
+```
-## Quick Start
+### ⚡ JavaScript Evaluation
+Escape hatch for anything the API doesn't cover:
+```bash
+curl -X POST localhost:18800/evaluate \
+ -d '{"tabId":"X","expression":"document.querySelectorAll(\".tweet\").length"}'
+```
+### 📸 Screenshot (Opt-in)
+Available when you need visual verification. Not the default:
```bash
-# 1. Start Chrome with remote debugging
-/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
+curl localhost:18800/screenshot?tabId=X # base64 JSON
+curl localhost:18800/screenshot?tabId=X&raw=true # raw JPEG
+```
+
+## Full API
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| `GET` | `/health` | Connection status |
+| `GET` | `/tabs` | List open tabs |
+| `GET` | `/snapshot` | Accessibility tree (primary interface) |
+| `GET` | `/screenshot` | JPEG screenshot (opt-in) |
+| `GET` | `/text` | Readable page text |
+| `POST` | `/navigate` | Go to URL |
+| `POST` | `/action` | Click, type, fill, press, focus |
+| `POST` | `/evaluate` | Execute JavaScript |
+| `POST` | `/tab` | Open/close tabs |
+
+### Query Parameters (snapshot)
+| Param | Description |
+|-------|-------------|
+| `tabId` | Target tab (default: first tab) |
+| `filter=interactive` | Only buttons, links, inputs |
+| `depth=N` | Max tree depth |
+
+## Configuration
+
+All via environment variables:
+
+| Variable | Default | Description |
+|----------|---------|-------------|
+| `BRIDGE_PORT` | `18800` | HTTP server port |
+| `BRIDGE_TOKEN` | *(none)* | Bearer token for auth |
+| `BRIDGE_HEADLESS` | `false` | Run Chrome headless |
+| `BRIDGE_PROFILE` | `~/.browser-bridge/chrome-profile` | Chrome profile directory |
+| `BRIDGE_STATE_DIR` | `~/.browser-bridge` | State/session storage |
+| `CDP_URL` | *(none)* | Connect to existing Chrome instead of launching |
-# 2. Start the bridge
-node server.js
+## Architecture
-# 3. Use it
-curl localhost:18800/health
```
+┌─────────────┐ HTTP :18800 ┌──────────────┐ ┌─────────┐
+│ Any Agent │ ──────────────► │ Pinchtab │ ── CDP ──► │ Chrome │
+│ (OpenClaw, │ snapshot, act, │ │ │ │
+│ PicoClaw, │ navigate, eval │ stealth + │ │ your │
+│ curl, │ │ sessions + │ │ tabs │
+│ scripts) │ │ a11y tree │ │ │
+└─────────────┘ └──────────────┘ └─────────┘
+```
+
+## Why Not Screenshots?
+
+| | Screenshots | Accessibility Tree |
+|---|---|---|
+| **Tokens** | ~2,000/image | ~200-500/page |
+| **Speed** | Render → encode → transfer | Instant structured data |
+| **Reliability** | Vision model guesses coordinates | Deterministic refs |
+| **LLM requirement** | Vision model required | Any text LLM works |
+| **Cost (10-step task)** | ~$0.06 | ~$0.015 |
+
+Playwright MCP, OpenClaw, and Browser Use all default to accessibility trees for the same reason.
+
+## Compared To
+
+| | Pinchtab | Steel Browser | Playwright MCP | OpenClaw Browser |
+|---|---|---|---|---|
+| A11y snapshots | ✅ | ❌ | ✅ | ✅ |
+| Element interaction | ✅ | ❌ | ✅ | ✅ |
+| Interface | HTTP | HTTP | MCP | Internal |
+| Any agent | ✅ | ✅ | ❌ | ❌ |
+| Stealth mode | ✅ | ✅ | ❌ | ❌ |
+| Session persistence | ✅ | ✅ | ❌ | ❌ |
+| Self-launching Chrome | ✅ | Docker | ❌ | ✅ |
+| Single binary | ✅ 12MB | ❌ | ❌ | ❌ |
+| Lines of code | ~600 | ~12,000 | ~5,000 | — |
-## Not Goals
+## License
-- Not a product, not a cloud service
-- Not a scraping tool
-- Not trying to replace Playwright MCP
-- No plugin system, no SDK, no React UI
+MIT
diff --git a/assets/icon.svg b/assets/icon.svg
new file mode 100644
index 00000000..892f8a93
--- /dev/null
+++ b/assets/icon.svg
@@ -0,0 +1,34 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" fill="none">
+ <!-- Background -->
+ <rect width="128" height="128" rx="24" fill="#1a1a2e"/>
+
+ <!-- Pinch claw left -->
+ <path d="M28 55 Q15 40 22 28 Q28 20 36 28 L34 45 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="1.5"/>
+ <path d="M28 55 Q15 70 22 82 Q28 90 36 82 L34 65 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="1.5"/>
+
+ <!-- Pinch claw right -->
+ <path d="M100 55 Q113 40 106 28 Q100 20 92 28 L94 45 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="1.5"/>
+ <path d="M100 55 Q113 70 106 82 Q100 90 92 82 L94 65 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="1.5"/>
+
+ <!-- Body -->
+ <ellipse cx="64" cy="65" rx="30" ry="24" fill="#FFD700" stroke="#1a1a2e" stroke-width="2"/>
+
+ <!-- Eyes -->
+ <rect x="51" y="58" width="10" height="8" rx="2" fill="#1a1a2e" stroke="#00ff88" stroke-width="1"/>
+ <rect x="67" y="58" width="10" height="8" rx="2" fill="#1a1a2e" stroke="#00ff88" stroke-width="1"/>
+ <rect x="54" y="60" width="3" height="4" rx="1" fill="#00ff88"/>
+ <rect x="70" y="60" width="3" height="4" rx="1" fill="#00ff88"/>
+
+ <!-- Tab -->
+ <path d="M52 45 L52 38 L56 35 L72 35 L76 38 L76 45" fill="#1a1a2e" stroke="#FFD700" stroke-width="1.5"/>
+ <circle cx="59" cy="39" r="1.5" fill="#ff4444"/>
+ <circle cx="64" cy="39" r="1.5" fill="#FFD700"/>
+ <circle cx="69" cy="39" r="1.5" fill="#00ff88"/>
+
+ <!-- Antenna -->
+ <line x1="64" y1="35" x2="64" y2="24" stroke="#FFD700" stroke-width="1.5"/>
+ <circle cx="64" cy="22" r="3" fill="#00ff88"/>
+
+ <!-- Smile -->
+ <path d="M58 74 Q64 79 70 74" fill="none" stroke="#1a1a2e" stroke-width="1.5" stroke-linecap="round"/>
+</svg>
\ No newline at end of file
diff --git a/assets/logo-banner.svg b/assets/logo-banner.svg
new file mode 100644
index 00000000..a71aa6d4
--- /dev/null
+++ b/assets/logo-banner.svg
@@ -0,0 +1,59 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 200" fill="none">
+ <!-- Background -->
+ <rect width="800" height="200" rx="12" fill="#1a1a2e"/>
+ <rect x="2" y="2" width="796" height="196" rx="10" fill="none" stroke="#FFD700" stroke-width="3"/>
+
+ <!-- Mini mascot -->
+ <!-- Body -->
+ <ellipse cx="100" cy="105" rx="45" ry="36" fill="#FFD700" stroke="#1a1a2e" stroke-width="3"/>
+
+ <!-- Pinch claws -->
+ <path d="M55 90 Q35 70 50 55 Q60 48 68 60 L65 80 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="2"/>
+ <path d="M55 90 Q35 110 50 125 Q60 132 68 120 L65 100 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="2"/>
+ <path d="M145 90 Q165 70 150 55 Q140 48 132 60 L135 80 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="2"/>
+ <path d="M145 90 Q165 110 150 125 Q140 132 132 120 L135 100 Z" fill="#FFD700" stroke="#1a1a2e" stroke-width="2"/>
+
+ <!-- Eyes -->
+ <rect x="82" y="93" width="14" height="12" rx="2" fill="#1a1a2e" stroke="#00ff88" stroke-width="1.5"/>
+ <rect x="104" y="93" width="14" height="12" rx="2" fill="#1a1a2e" stroke="#00ff88" stroke-width="1.5"/>
+ <rect x="86" y="96" width="4" height="5" rx="1" fill="#00ff88"/>
+ <rect x="108" y="96" width="4" height="5" rx="1" fill="#00ff88"/>
+
+ <!-- Browser tab on head -->
+ <path d="M82 75 L82 65 L90 60 L110 60 L118 65 L118 75" fill="#1a1a2e" stroke="#FFD700" stroke-width="2"/>
+ <circle cx="92" cy="67" r="2" fill="#ff4444"/>
+ <circle cx="100" cy="67" r="2" fill="#FFD700"/>
+ <circle cx="108" cy="67" r="2" fill="#00ff88"/>
+
+ <!-- Antenna -->
+ <line x1="100" y1="60" x2="100" y2="45" stroke="#FFD700" stroke-width="2"/>
+ <circle cx="100" cy="42" r="4" fill="#00ff88"/>
+
+ <!-- Smile -->
+ <path d="M91 112 Q100 120 109 112" fill="none" stroke="#1a1a2e" stroke-width="2" stroke-linecap="round"/>
+
+ <!-- Legs -->
+ <line x1="78" y1="133" x2="70" y2="150" stroke="#FFD700" stroke-width="3" stroke-linecap="round"/>
+ <line x1="90" y1="137" x2="85" y2="154" stroke="#FFD700" stroke-width="3" stroke-linecap="round"/>
+ <line x1="110" y1="137" x2="115" y2="154" stroke="#FFD700" stroke-width="3" stroke-linecap="round"/>
+ <line x1="122" y1="133" x2="130" y2="150" stroke="#FFD700" stroke-width="3" stroke-linecap="round"/>
+
+ <!-- Text: pinchtab -->
+ <text x="180" y="95" font-family="'SF Mono', 'Fira Code', 'JetBrains Mono', monospace" font-size="52" font-weight="800" fill="#FFD700" letter-spacing="-1">pinchtab</text>
+
+ <!-- Tagline -->
+ <text x="182" y="130" font-family="'SF Mono', 'Fira Code', 'JetBrains Mono', monospace" font-size="16" fill="#888" letter-spacing="0.5">browser control for AI agents</text>
+
+ <!-- Feature pills -->
+ <rect x="182" y="145" width="65" height="22" rx="4" fill="none" stroke="#00ff88" stroke-width="1.5"/>
+ <text x="194" y="160" font-family="monospace" font-size="11" fill="#00ff88">a11y-first</text>
+
+ <rect x="257" y="145" width="45" height="22" rx="4" fill="none" stroke="#FFD700" stroke-width="1.5"/>
+ <text x="266" y="160" font-family="monospace" font-size="11" fill="#FFD700">HTTP</text>
+
+ <rect x="312" y="145" width="55" height="22" rx="4" fill="none" stroke="#ff6b6b" stroke-width="1.5"/>
+ <text x="320" y="160" font-family="monospace" font-size="11" fill="#ff6b6b">stealth</text>
+
+ <rect x="377" y="145" width="75" height="22" rx="4" fill="none" stroke="#888" stroke-width="1.5"/>
+ <text x="385" y="160" font-family="monospace" font-size="11" fill="#888">12MB binary</text>
+</svg>
\ No newline at end of file
diff --git a/assets/logo.svg b/assets/logo.svg
new file mode 100644
index 00000000..11615a0a
--- /dev/null
+++ b/assets/logo.svg
@@ -0,0 +1,52 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
+ <!-- Background circle -->
+ <circle cx="256" cy="256" r="240" fill="#1a1a2e" stroke="#FFD700" stroke-width="8"/>
+
+ <!-- Crab claw / pinch - left -->
+ <path d="M120 200 Q80 160 100 120 Q120 80 160 100 Q180 110 170 140 L160 170 Z"
+ fill="#FFD700" stroke="#1a1a2e" stroke-width="4"/>
+ <path d="M120 200 Q80 240 100 280 Q120 320 160 300 Q180 290 170 260 L160 230 Z"
+ fill="#FFD700" stroke="#1a1a2e" stroke-width="4"/>
+
+ <!-- Crab claw / pinch - right -->
+ <path d="M392 200 Q432 160 412 120 Q392 80 352 100 Q332 110 342 140 L352 170 Z"
+ fill="#FFD700" stroke="#1a1a2e" stroke-width="4"/>
+ <path d="M392 200 Q432 240 412 280 Q392 320 352 300 Q332 290 342 260 L352 230 Z"
+ fill="#FFD700" stroke="#1a1a2e" stroke-width="4"/>
+
+ <!-- Body - banana shaped -->
+ <ellipse cx="256" cy="260" rx="100" ry="80" fill="#FFD700" stroke="#1a1a2e" stroke-width="4"/>
+
+ <!-- Banana curve stripe -->
+ <path d="M180 240 Q256 200 332 240" fill="none" stroke="#FFA500" stroke-width="6" stroke-linecap="round"/>
+
+ <!-- Eyes - screen/monitor style -->
+ <rect x="215" y="230" width="30" height="24" rx="4" fill="#1a1a2e" stroke="#00ff88" stroke-width="2"/>
+ <rect x="267" y="230" width="30" height="24" rx="4" fill="#1a1a2e" stroke="#00ff88" stroke-width="2"/>
+
+ <!-- Eye glow / pupils -->
+ <rect x="222" y="237" width="8" height="10" rx="2" fill="#00ff88"/>
+ <rect x="274" y="237" width="8" height="10" rx="2" fill="#00ff88"/>
+ <rect x="232" y="239" width="5" height="6" rx="1" fill="#00ff88" opacity="0.5"/>
+ <rect x="284" y="239" width="5" height="6" rx="1" fill="#00ff88" opacity="0.5"/>
+
+ <!-- Smile -->
+ <path d="M235 270 Q256 285 277 270" fill="none" stroke="#1a1a2e" stroke-width="3" stroke-linecap="round"/>
+
+ <!-- Little legs -->
+ <line x1="200" y1="320" x2="185" y2="360" stroke="#FFD700" stroke-width="6" stroke-linecap="round"/>
+ <line x1="230" y1="330" x2="220" y2="370" stroke="#FFD700" stroke-width="6" stroke-linecap="round"/>
+ <line x1="282" y1="330" x2="292" y2="370" stroke="#FFD700" stroke-width="6" stroke-linecap="round"/>
+ <line x1="312" y1="320" x2="327" y2="360" stroke="#FFD700" stroke-width="6" stroke-linecap="round"/>
+
+ <!-- Tab / browser tab on head -->
+ <path d="M220 195 L220 175 L240 165 L272 165 L292 175 L292 195"
+ fill="#1a1a2e" stroke="#FFD700" stroke-width="3"/>
+ <circle cx="235" cy="178" r="3" fill="#ff4444"/>
+ <circle cx="249" cy="178" r="3" fill="#FFD700"/>
+ <circle cx="263" cy="178" r="3" fill="#00ff88"/>
+
+ <!-- Antenna -->
+ <line x1="256" y1="165" x2="256" y2="135" stroke="#FFD700" stroke-width="3"/>
+ <circle cx="256" cy="130" r="6" fill="#00ff88" stroke="#1a1a2e" stroke-width="2"/>
+</svg>
\ No newline at end of file