You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@different-ai/opencode-browser

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@different-ai/opencode-browser

Browser automation plugin for OpenCode. Control your real Chrome browser with existing logins and cookies.

Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
308
-52.62%
Maintainers
2
Weekly downloads
 
Created
Source

OpenCode Browser

Browser automation plugin for OpenCode.

Control your real Chrome browser with existing logins, cookies, and bookmarks. No DevTools Protocol, no security prompts.

Why?

Chrome 136+ blocks --remote-debugging-port on your default profile for security reasons. DevTools-based automation (like Playwright) triggers a security prompt every time.

OpenCode Browser uses a simple WebSocket connection between an OpenCode plugin and a Chrome extension. Your automation works with your existing browser session - no prompts, no separate profiles.

Installation

npx @different-ai/opencode-browser install

The installer will:

  • Copy the extension to ~/.opencode-browser/extension/
  • Guide you to load the extension in Chrome
  • Update your opencode.json to use the plugin

Configuration

Add to your opencode.json:

{
  "plugin": ["@different-ai/opencode-browser"]
}

Then load the extension in Chrome:

  • Go to chrome://extensions
  • Enable "Developer mode"
  • Click "Load unpacked" and select ~/.opencode-browser/extension/

Available Tools

ToolDescription
browser_statusCheck if browser is available or locked
browser_kill_sessionTake over from another OpenCode session
browser_navigateNavigate to a URL
browser_clickClick an element by CSS selector
browser_typeType text into an input field
browser_screenshotCapture the visible page
browser_snapshotGet accessibility tree with selectors
browser_get_tabsList all open tabs
browser_scrollScroll page or element into view
browser_waitWait for a duration
browser_executeRun JavaScript in page context

Multi-Session Support

Only one OpenCode session can use the browser at a time. This prevents conflicts when you have multiple terminals open.

  • browser_status - Check who has the lock
  • browser_kill_session - Kill the other session and take over

In your prompts, you can say:

  • "If browser is locked, kill the session and proceed"
  • "If browser is locked, skip this task"

Architecture

OpenCode Plugin ◄──WebSocket:19222──► Chrome Extension
       │                                    │
       └── Lock file                        └── chrome.tabs, chrome.scripting

Two components:

  • OpenCode plugin (runs WebSocket server, defines tools)
  • Chrome extension (connects to plugin, executes commands)

No daemon. No MCP server. No native messaging host.

Upgrading from v1.x

v2.0 is a complete rewrite with a simpler architecture:

  • Run npx @different-ai/opencode-browser install (cleans up old daemon automatically)
  • Replace MCP config with plugin config in opencode.json:
- "mcp": {
-   "browser": {
-     "type": "local",
-     "command": ["npx", "@different-ai/opencode-browser", "start"],
-     "enabled": true
-   }
- }
+ "plugin": ["@different-ai/opencode-browser"]
  • Restart OpenCode

Troubleshooting

"Chrome extension not connected"

  • Make sure Chrome is running
  • Check that the extension is loaded and enabled
  • Click the extension icon to see connection status

"Browser locked by another session"

  • Use browser_kill_session to take over
  • Or close the other OpenCode session

"Failed to start WebSocket server"

  • Port 19222 may be in use
  • Check if another OpenCode session is running

Uninstall

npx @different-ai/opencode-browser uninstall

Then remove the extension from Chrome and delete ~/.opencode-browser/ if desired.

Platform Support

  • macOS ✓
  • Linux ✓
  • Windows (not yet supported)

License

MIT

Credits

Inspired by Claude in Chrome by Anthropic.

Keywords

opencode

FAQs

Package last updated on 05 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts