
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
open-browser-use-sdk
Advanced tools
JavaScript/TypeScript client for controlling a real Chrome profile through Open Browser Use. The SDK keeps the low-level JSON-RPC/CDP surface available and also provides higher-level browser/tab helpers for common agent workflows.
open-browser-use CLI and Chrome extension are installed and connected.open-browser-use ping returns "pong"./tmp/open-browser-use/active.json.open-browser-use ping
open-browser-use info
npm install open-browser-use-sdk
Use connectOpenBrowserUse when you want a Playwright-like flow in a normal
Node runtime.
import { readFile } from "node:fs/promises";
import { connectOpenBrowserUse } from "open-browser-use-sdk";
const registry = JSON.parse(
await readFile("/tmp/open-browser-use/active.json", "utf8")
);
const browser = await connectOpenBrowserUse({
socketPath: registry.socketPath,
sessionId: "github-issue-scan",
turnId: `turn-${Date.now()}`,
timeoutMs: 20000,
});
let tab;
try {
await browser.client.nameSession("GitHub issue scan - OBU");
tab = await browser.newTab();
await tab.goto("https://github.com/iFurySt/open-codex-computer-use/issues", {
waitUntil: "domcontentloaded",
timeoutMs: 15000,
});
await tab.playwright.waitForLoadState({
state: "domcontentloaded",
timeoutMs: 15000,
});
const snapshot = await tab.playwright.domSnapshot();
const relevant = snapshot
.split("\n")
.filter((line) =>
/Open|Closed|Issues|issue|No results|open-codex-computer-use|Pull requests|Starred/.test(line)
);
console.log(relevant.slice(0, 160).join("\n"));
} finally {
await browser.client.finalizeTabs([]);
browser.close();
}
The same tab helpers are available without the playwright alias:
await tab.goto(url, { waitUntil: "load", timeoutMs: 15000 });
await tab.waitForLoadState({ state: "domcontentloaded", timeoutMs: 15000 });
const text = await tab.domSnapshot();
const value = await tab.evaluate("document.title");
For multiple pages, create tabs first, then run navigation and extraction in parallel. This avoids backend session races while still parallelizing the slow page work.
const targets = [
["repo", "https://github.com/iFurySt/open-codex-computer-use"],
["issues", "https://github.com/iFurySt/open-codex-computer-use/issues"],
["pulls", "https://github.com/iFurySt/open-codex-computer-use/pulls"],
];
const tabs = [];
for (const [kind] of targets) {
tabs.push([kind, await browser.newTab()]);
}
await Promise.all(
targets.map(([_, url], index) =>
tabs[index][1].goto(url, { waitUntil: "load", timeoutMs: 25000 })
)
);
const results = await Promise.all(
tabs.map(async ([kind, tab]) => ({
kind,
tabId: tab.id,
text: await tab.playwright.domSnapshot(),
}))
);
Use OpenBrowserUseClient when you need direct Browser Use JSON-RPC methods or
raw CDP commands.
import { readFile } from "node:fs/promises";
import { OpenBrowserUseClient } from "open-browser-use-sdk";
const { socketPath } = JSON.parse(
await readFile("/tmp/open-browser-use/active.json", "utf8")
);
const client = new OpenBrowserUseClient({
socketPath,
sessionId: "raw-cdp-example",
});
try {
await client.connect();
await client.nameSession("Raw CDP example - OBU");
const tab = await client.createTab();
await client.attach(tab.id);
await client.executeCdp(tab.id, "Page.navigate", {
url: "https://example.com",
});
const title = await client.executeCdp(tab.id, "Runtime.evaluate", {
expression: "document.title",
returnByValue: true,
});
console.log(title.result.value);
} finally {
await client.finalizeTabs([]);
client.close();
}
The unrestricted escape hatch is request(method, params):
await client.request("executeCdp", {
target: { tabId: 123 },
method: "Runtime.evaluate",
commandParams: {
expression: "document.body.innerText",
returnByValue: true,
},
});
The JS SDK can subscribe to JSON-RPC notifications from the native socket. This is useful for downloads and CDP events.
const unsubscribe = client.onNotification((event) => {
if (event.method === "onDownloadChange") {
console.log("download", event.params);
}
if (event.method === "onCDPEvent") {
console.log("cdp", event.params);
}
});
// Later:
unsubscribe();
getInfo, nameSession, turnEndedcreateTab, getTabs, getUserTabs, claimUserTab, finalizeTabsattach, detach, executeCdp, requestmoveMousewaitForFileChooser, setFileChooserFileswaitForDownload, downloadPathreadClipboardText, writeClipboardText, readClipboard,
writeClipboardAlways finish browser work by finalizing tabs and closing the socket:
try {
// Browser work here.
} finally {
await browser.client.finalizeTabs([]);
browser.close();
}
Use finalizeTabs([]) unless the user explicitly needs a tab left open. To keep
a tab, pass a keep item such as:
await browser.client.finalizeTabs([{ tabId: tab.id, status: "handoff" }]);
open-browser-use ping and open-browser-use info.FAQs
JavaScript/TypeScript SDK for Open Browser Use.
The npm package open-browser-use-sdk receives a total of 54 weekly downloads. As such, open-browser-use-sdk popularity was classified as not popular.
We found that open-browser-use-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.