Noureddine RAMDI / PinchTab: Token-efficient Chrome automation for AI agents with Go

Created Fri, 24 Apr 2026 07:26:29 +0000 Modified Sat, 06 Jun 2026 19:20:19 +0000

pinchtab/pinchtab

PinchTab tackles a common pain point for AI developers who automate browsers: how to control Chrome instances efficiently without drowning in token costs. Unlike typical automation that dumps raw HTML or full screenshots, PinchTab focuses on extracting structured text content, bringing down token usage to about 800 tokens per page — 5 to 13 times cheaper than screenshot-based approaches. This cost reduction is critical when AI agents repeatedly browse and interact with web pages, as token usage directly translates to operational expenses.

What PinchTab is and how it works

PinchTab is a standalone HTTP server written in Go designed to bridge AI agents with Chrome instances through the Chrome DevTools Protocol (CDP). It supports both headless and headed modes, meaning it can run Chrome invisibly or with a UI, depending on your needs.

Under the hood, it orchestrates multiple Chrome instances with isolated profiles, enabling secure, parallel sessions. This multi-instance orchestration means AI agents can navigate various web pages simultaneously without interference.

The core architecture revolves around a local HTTP API that agents communicate with. This API exposes commands to navigate pages, extract content, and interact with the DOM. PinchTab emphasizes a local-first security model, aiming to keep browsing data on your machine rather than cloud-hosted environments. For enhanced isolation and security, it offers containerization options.

The project is built entirely in Go, leveraging its concurrency model and networking capabilities to handle browser automation efficiently. It communicates with Chrome via CDP, which is a low-level protocol exposed by Chromium browsers, allowing direct control over page navigation, DOM inspection, and JavaScript execution.

What sets PinchTab apart technically

The standout technical feature is its token-efficient browsing strategy. Instead of sending raw screenshots or full HTML dumps to the AI agent, PinchTab extracts structured textual content. This drastically reduces the tokens needed for downstream language model consumption. The README highlights that text extraction costs about 800 tokens per page, making it 5 to 13 times cheaper than screenshot-based methods.

This approach is a clear tradeoff: while screenshots provide pixel-perfect context and can capture UI nuances, they are costly in token terms and require additional OCR or image understanding layers. PinchTab’s focus on structured text means it sacrifices some UI fidelity for cost and speed — a sensible compromise when the primary goal is text-based understanding.

The codebase is surprisingly clean and focused, reflecting Go best practices around concurrency and error handling. The HTTP server and CDP client layers are well modularized, which should ease extending or customizing the project for specific agent workflows. Multi-instance orchestration is robust, with isolated Chrome profiles ensuring no data leakage between sessions.

One limitation is Windows support, which is currently marked as best-effort and less tested. The project recommends running server or bridge commands directly instead of the daemon workflow on Windows, signaling some rough edges in cross-platform consistency.

Quick start

PinchTab provides straightforward installation commands for macOS and Linux, with a Homebrew tap and npm package as well.

macOS / Linux:

curl -fsSL https://pinchtab.com/install.sh | bash

Homebrew (macOS / Linux):

brew install pinchtab/tap/pinchtab

npm:

npm install -g pinchtab

After installation, you can generate shell completions for zsh:

pinchtab completion zsh > "${fpath[1]}/_pinchtab"

The README emphasizes that the primary tested workflow is local macOS and Linux, with Windows support being limited.

Verdict

PinchTab is a solid tool for AI developers who need to automate Chrome browsers efficiently and cost-effectively, particularly when token usage is a bottleneck. Its focus on structured text extraction makes it a practical choice for agentic workflows that interact heavily with web content and want to keep operational costs down.

The Go codebase is clean and modular, facilitating customization and extension. Multi-instance orchestration and local-first security are thoughtful features that make PinchTab viable for production scenarios where isolation and privacy matter.

However, if you need pixel-perfect UI context or sophisticated visual automation, PinchTab’s text-centric approach might fall short. Also, Windows users should be prepared for limited support and potential manual workarounds.

Overall, PinchTab is worth exploring if you’re building AI agents or automation pipelines that use Chrome as a browser backend and want to optimize token efficiency without sacrificing too much on capability.


→ GitHub Repo: pinchtab/pinchtab ⭐ 8,823 · Go