11# BrowserCode
22
33An AI coding agent that drives real browsers. Forks
4- [ anomalyco/opencode] ( https://github.com/anomalyco/opencode ) and vendors
4+ [ anomalyco/opencode] ( https://github.com/anomalyco/opencode ) and ships a
5+ TypeScript port of
56[ browser-use/browser-harness] ( https://github.com/browser-use/browser-harness ) .
67
78## Install
@@ -11,14 +12,14 @@ curl -fsSL https://bcode.sh/install | bash
1112```
1213
1314Installs ` bcode ` to ` ~/.bcode/bin ` . macOS, Linux, and Windows (Git Bash).
14- Also requires ` uv ` ( [ install ] ( https ://astral.sh/uv/install.sh ) ) and Chrome
15- with ` chrome://inspect ` enabled (or ` BU_CDP_WS ` set to a remote CDP endpoint).
15+ Requires Chrome with ` chrome ://inspect ` enabled (or ` BU_CDP_WS ` set to a
16+ remote CDP endpoint).
1617
1718## What's different from opencode
1819
19- - One new tool, ` browser_execute(python ) ` , that runs Python against a
20- long-lived browser daemon . The daemon connects to your real Chrome via CDP
21- and persists across calls within a session.
20+ - One new tool, ` browser_execute(code ) ` , that runs JavaScript/TypeScript
21+ in a real browser via CDP . The CDP session persists across calls within
22+ an agent session.
2223- Everything else from opencode works the same. Same providers, same TUI,
2324 same config (` opencode.json ` ).
2425
@@ -33,9 +34,6 @@ bun run --cwd packages/opencode dev
3334
3435Needs ` bun >= 1.3.13 ` plus the runtime prereqs above.
3536
36- The first ` browser_execute ` call builds a Python venv at
37- ` packages/bcode-browser/harness/.venv/ ` (cold ~ 15s, warm ~ 50ms after).
38-
3937## Configure browser permission
4038
4139` browser_execute ` is enabled by default. To disable or gate it, edit
@@ -55,15 +53,13 @@ The first `browser_execute` call builds a Python venv at
5553
5654- ` packages/opencode/ ` — vendored from ` anomalyco/opencode ` (treat as
5755 upstream; modifications are deliberate exceptions).
58- - ` packages/bcode-browser/ ` — BrowserCode-specific code:
59- - ` src/ ` — ` browser_execute ` Effect service.
60- - ` harness/ ` — vendored from ` browser-use/browser-harness ` .
56+ - ` packages/bcode-browser/ ` — BrowserCode-specific code: in-process CDP
57+ harness, ` browser_execute ` implementation, embedded skills.
6158
6259## Maintenance docs
6360
64- - ` UPSTREAM.md ` — modification zones, sync log against both upstreams .
61+ - ` UPSTREAM.md ` — modification zones, sync log.
6562- ` opencode-sync.md ` — runbook for syncing from anomalyco/opencode.
66- - ` harness-sync.md ` — runbook for syncing from browser-use/browser-harness.
6763- ` AGENTS.md ` — code style + maintenance notes for agents working in this repo.
6864- ` install.sh ` — what ` bcode.sh/install ` serves.
6965
0 commit comments