@browserbasehq/opencode
v0.4.0
Published
Browserbase browse plugin for OpenCode: browser automation, navigation, extraction, screenshots, and interaction via the browse CLI
Readme
@browserbasehq/opencode
OpenCode plugin for Browserbase browser automation. It gives your agent the browse CLI for navigating pages, extracting content, taking screenshots, and interacting with real web pages.
Installation
The plugin supports OpenCode 2 and OpenCode 1 from the same package.
OpenCode 2
opencode plugin add @browserbasehq/opencodeOr add it to opencode.jsonc yourself:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["@browserbasehq/opencode"]
}OpenCode 1
Add it to opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@browserbasehq/opencode"]
}OpenCode installs the package on the next start.
Install the browse CLI
The plugin bundles the browse skill, but you need the CLI installed globally:
npm install -g browseVerify the installation:
which browse && browse --helpAuthentication
Local browsing (no key required)
For local browser sessions, no API key is needed. The browse CLI uses Chrome or Chromium on your machine:
browse open https://example.com --local
browse snapshot
browse stopBrowserbase cloud
For remote stealth sessions, proxies, and CAPTCHA solving, set your API key:
export BROWSERBASE_API_KEY=your-api-keyGet a key at browserbase.com/settings.
Optionally set a project ID:
export BROWSERBASE_PROJECT_ID=your-project-idThe plugin passes these environment variables to shell commands automatically, so the browse CLI is authenticated without manual configuration in each session.
Skills
The plugin bundles the browse CLI skill, which teaches your agent:
- Opening and navigating web pages
- Taking accessibility snapshots (structured page state)
- Taking screenshots
- Clicking, typing, and interacting with elements
- Managing browser sessions and tabs
- Using Browserbase cloud APIs
- Working with contexts, extensions, and functions
Just ask your agent:
- "Go to Hacker News and get the top 5 stories."
- "Fill out the signup form on example.com."
- "Take a screenshot of localhost:3000."
Links
License
MIT
