nicobailon/surf-cli

The CLI for AI agents to control Chrome. Zero config, agent-agnostic, battle-tested.

What it solves

Surf provides a simplified, agent-agnostic CLI for AI agents to control a web browser (Chrome and others). It eliminates the need for complex configurations, MCP servers, or proprietary API keys by allowing agents to interact with the browser via standard CLI commands over a Unix socket.

How it works

Surf operates as a CLI tool that communicates with a browser extension and a native host. It uses stable element identifiers (element refs) from the accessibility tree to ensure interactions are resilient to DOM changes. It also supports remote control over Tailscale, allowing a CLI on one machine to control a browser on another using mutual Ed25519 challenge-response authentication.

Who it’s for

AI agent developers who need a reliable, zero-config way to let their agents browse the web, interact with pages, and perform tasks without being tied to a specific AI provider or browser automation framework.

Highlights

  • Agent-Agnostic: Works with any tool that can run shell commands (e.g., Claude Code, GPT, Gemini, Cursor).
  • Zero Config: Requires only an extension installation and a native host setup.
  • AI without API Keys: Leverages existing browser logins to query ChatGPT, Gemini, Perplexity, and Grok.
  • Semantic Locators: Find and interact with elements by ARIA role, text, or label instead of fragile CSS selectors.
  • Window Isolation: Allows agents to work in separate windows to avoid interfering with the human user's active tabs.
  • Network Capture: Automatically logs network requests for filtering and replaying API calls.
  • Remote Access: Securely control browsers across a Tailnet using Tailscale.