A streamlined coding agent that drives real browsers through unconstrained CDP.
The unbounded power of the browser working seamlessly with your code. The agent adapts to every site at runtime and writes scripts to reuse later.
Run this in a terminal that supports bash:
curl -fsSL https://bcode.sh/install | bashOpen the TUI:
bcodeRun an agent headlessly:
bcode run "Connect to my browser and find the cheapest way to SF via any bus/train/rideshare"BrowserCode supports any model you can reach with an API key, plus every provider OpenCode supports.
Use /connect in the TUI, or set provider API keys in your environment.
Recommended models from current BrowserCode evals:
- Frontier:
claude-opus-4-7,gpt-5.5 - Value:
glm-5.1,mimo-v2.5-pro - Budget:
gemini-3-flash-preview
Let the agent connect for you. It knows how. You can prompt:
Connect to my current tab at https://amazon.com and look for a better deal for 64GB DDR5 RAM and return the URLs
The agent will take control of your actual browser.
Make a new browser profile and work in the background to QA test http://localhost:3000, fix any bugs and open a PR
The agent will work locally in its own browser profile.
Open a remote browser and extract every item sold at https://mcdonalds.com in SF
The agent will control a Browser Use Cloud browser and give you a link to watch it.
- Browser Use Cloud offers unlimited free browsers, limited to 3 concurrent sessions, with stealth, captcha solving, and proxies.
- Just set
BROWSER_USE_API_KEYin your environment. The agent can sign up completely autonomously; just ask it to. To upgrade further, go to cloud.browser-use.com.
Browser ability and code-writing ability are deeply connected.
We turned browser interaction into a coding problem; the agent writes JavaScript that drives Chrome directly through CDP. Maximal power to the agent. Minimal abstractions.
BrowserCode outperforms every browser agent we have tested it against.
BrowserCode is a fork of OpenCode with a vendored TypeScript port of Browser Harness.
It adds one core browser primitive:
browser_execute(code)
-> runs JavaScript in-process
-> talks to Chrome through the DevTools Protocol
-> keeps the browser session alive across calls
-> returns logs, values, and screenshots to the agent
Reusable browser scripts are written to:
.bcode/agent-workspace/
BrowserCode is not built by the OpenCode team and is not affiliated with OpenCode in any way.
BrowserCode sends anonymous usage traces to help improve the project. To opt out, set DO_NOT_TRACK=1 in your environment.
Most upstream contributions belong in one of the projects BrowserCode builds on:
- Browser automation: browser-use/browser-harness
- Core coding-agent: anomalyco/opencode
Run from source:
git clone https://github.com/browser-use/browsercode.git
cd browsercode
bun install
bun run --cwd packages/opencode devTell your computer what to do, and it gets it done.