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 (native messaging + per-tab ownership).

Source
npmnpm
Version
4.2.6
Version published
Weekly downloads
516
-23.89%
Maintainers
2
Weekly downloads
 
Created
Source

OpenCode Browser

Browser automation plugin for OpenCode.

Control your real Chromium browser (Chrome/Brave/Arc/Edge) using your existing profile (logins, cookies, bookmarks). No DevTools Protocol, no security prompts.

Why this architecture

This version is optimized for reliability and predictable multi-session behavior:

  • No WebSocket port → no port conflicts
  • Chrome Native Messaging between extension and a local host process
  • A local broker multiplexes multiple OpenCode plugin sessions and enforces per-tab ownership

Installation

npx @different-ai/opencode-browser install

The installer will:

  • Copy the extension to ~/.opencode-browser/extension/
  • Walk you through loading + pinning it in chrome://extensions
  • Ask for the extension ID and install a Native Messaging Host manifest
  • Update your opencode.json or opencode.jsonc to load the plugin

Configure OpenCode

Your opencode.json or opencode.jsonc should contain:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@different-ai/opencode-browser"]
}

How it works

OpenCode Plugin <-> Local Broker (unix socket) <-> Native Host <-> Chrome Extension
  • The extension connects to the native host.
  • The plugin talks to the broker over a local unix socket.
  • The broker forwards tool requests to the extension and enforces tab ownership.

Per-tab ownership

  • First time a session touches a tab, the broker auto-claims it for that session.
  • Other sessions attempting to use the same tab will get an error.
  • Use browser_status to inspect claims if needed.

Available tools

Core primitives:

  • browser_status
  • browser_get_tabs
  • browser_navigate
  • browser_query (modes: text, value, list, exists, page_text; optional timeoutMs/pollMs)
  • browser_click
  • browser_type
  • browser_scroll
  • browser_wait

Diagnostics:

  • browser_snapshot
  • browser_screenshot
  • browser_version

Troubleshooting

Extension says native host not available

  • Re-run npx @different-ai/opencode-browser install
  • Confirm the extension ID you pasted matches the loaded extension in chrome://extensions

Tab ownership errors

  • Use browser_status to see current claims
  • Close the other OpenCode session to release ownership

Uninstall

npx @different-ai/opencode-browser uninstall

Then remove the unpacked extension in chrome://extensions and remove the plugin from opencode.json or opencode.jsonc.

Keywords

opencode

FAQs

Package last updated on 10 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