whatisgithub

What is browsercode?

browser-use/browsercode — explained in plain English

Analysis updated 2026-05-18

97TypeScriptAudience · developerComplexity · 3/5Setup · moderate

In one sentence

An AI agent that controls a web browser by writing JavaScript against Chrome's low-level protocol, following natural-language instructions instead of clicking around.

Mindmap

mindmap
  root((BrowserCode))
    What it does
      Writes JS to drive browser
      Uses Chrome DevTools Protocol
      Follows plain instructions
    Tech stack
      TypeScript
      OpenCode
      Browser Harness
    Use cases
      Web scraping
      Automated site testing
      Reusable scripts
    Audience
      Developers
      QA testers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automate browser tasks from a plain-English instruction

USE CASE 2

Scrape structured data like flight listings from a website

USE CASE 3

Test a local website and open a pull request with fixes

USE CASE 4

Save and reuse browser automation scripts across sessions

What is it built with?

TypeScriptJavaScriptChrome DevTools Protocol

How does it compare?

browser-use/browsercodeardupilot/node-mavlinkgonemedia/aipointer
Stars979698
LanguageTypeScriptTypeScriptTypeScript
Last pushed2025-08-26
MaintenanceQuiet
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires your own AI model provider API key.

So what is it?

BrowserCode is an AI agent that can control a web browser on your behalf by writing and running JavaScript code. Instead of clicking and navigating with a simulated mouse and keyboard (which is how most browser automation works), it takes a more powerful approach: it writes JavaScript programs that talk directly to Chrome using the Chrome DevTools Protocol (CDP), a low-level interface that gives deep programmatic control over the browser. You install it with a single command in your terminal. Once running, you can give it natural-language instructions like "find me all flight details from New York to San Francisco tomorrow on Google Flights" or "test this local website and fix any bugs you find, then open a pull request." The agent figures out how to accomplish those tasks by writing browser automation scripts, which it saves for reuse in future sessions. The agent can connect to your existing browser tabs, create a new separate browser profile to work in the background, or spin up a cloud-hosted browser with stealth capabilities and proxy support. It supports multiple AI model providers, you supply your own API key. The tool is built on top of two other open-source projects: OpenCode (a terminal-based AI coding agent) and Browser Harness (a browser automation library from the same team). The key addition is a single core capability called browser_execute, which runs JavaScript in the context of a live browser session and returns the results, screenshots, logs, and values, back to the AI model. Anonymous usage data is collected by default but can be disabled by setting an environment variable.

Copy-paste prompts

Prompt 1
Help me install BrowserCode and connect it to my existing browser tabs
Prompt 2
Write a BrowserCode task that finds flight details on Google Flights
Prompt 3
Use BrowserCode to test my local site and open a pull request for any bugs found
Prompt 4
Set up BrowserCode with a cloud-hosted browser and proxy support
Prompt 5
Explain how BrowserCode's browser_execute function talks to Chrome

Frequently asked questions

What is browsercode?

An AI agent that controls a web browser by writing JavaScript against Chrome's low-level protocol, following natural-language instructions instead of clicking around.

What language is browsercode written in?

Mainly TypeScript. The stack also includes TypeScript, JavaScript, Chrome DevTools Protocol.

How hard is browsercode to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is browsercode for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.