@solarisdk/browserbase-compat
v0.3.4
Published
Drop-in Browserbase-style SDK surface for Solari Browser: sessions, connectUrl (CDP), contexts, live view, replay events.
Maintainers
Readme
@solarisdk/browserbase-compat
A Browserbase-shaped SDK for Solari Browser: change the import and the key, keep your code.
npm install @solarisdk/browserbase-compatimport Browserbase from "@solarisdk/browserbase-compat";
import { chromium } from "playwright-core";
const bb = new Browserbase({ apiKey: process.env.SOLARI_API_KEY }); // slr_… key
const session = await bb.sessions.create();
const browser = await chromium.connectOverCDP(session.connectUrl);
const page = browser.contexts()[0].pages()[0] ?? (await browser.contexts()[0].newPage());
await page.goto("https://example.com");
await browser.close();
await bb.sessions.update(session.id, { status: "REQUEST_RELEASE" });Sessions, contexts, live view and recording are supported. Every other Browserbase resource and method exists but throws
SolariCompatUnsupported naming it (extensions, secrets, webhooks, projects, downloads/uploads APIs, video replays,
bring-your-own proxies, Selenium, ...). See docs.getsolari.com/browserbase (and COMPAT.md in this package) for the full list
and every difference. Requires Node 20+. No Playwright version pin is needed: connectUrl is a plain CDP endpoint.
Licence: MIT. See NOTICE.
This is an independent project. It is not affiliated with, endorsed by, or sponsored by Browserbase, Inc. "Browserbase" is a trademark of its owner and is used here only to describe API compatibility.
