@mayurajs/browser-hyperbrowser
v1.2.0
Published
Hyperbrowser browsers for mayura/browser, over its sessions API.
Readme
@mayurajs/browser-hyperbrowser
Hyperbrowser browsers for mayura/browser: hosted Chromium sessions, created over
Hyperbrowser's sessions API and driven over CDP, from any runtime, with no dependency.
npm install mayura @mayurajs/browser-hyperbrowserimport { createBrowsers } from 'mayura/browser';
import { hyperbrowserBrowsers } from '@mayurajs/browser-hyperbrowser';
const browsers = createBrowsers(hyperbrowserBrowsers({ apiKey }), {
maxBrowsers: 1, maxLifetimeMs: 30 * 60_000,
origins: ['https://example.com'],
});
const browser = await browsers.open();
await browser.goto('https://example.com/');
await browser.release();- Each browser is a session: created when opened, stopped when done. It is not kept alive, so it also stops when its
connection does, and Hyperbrowser stops it at its lifetime (whole minutes, 1 to 720) should neither happen. A session
that already ended counts as released; one Hyperbrowser failed to close (
close-error) does not. - Proxies, stealth, captcha solving, ad blocking, recording and saved downloads are off unless asked for. Hyperbrowser
has no labels for sessions, so
labelsare not sent. liveViewUrlis Hyperbrowser's live view, with a token in it: by default it only shows the session (liveView: 'view');'interact'lets whoever has the link use it too, andfalsegives none.- Treat the WebSocket URL as a secret, as Hyperbrowser does not say what it carries: Mayura never logs it.
- Origins are enforced inside the browser, by intercepting its requests over CDP; a live check against Hyperbrowser confirmed it on October 6, 2026. Should a connection ever not allow that, opening a browser fails rather than running unchecked.
- Options:
apiKey,liveView,solveCaptchas,adblock,region,maxLifetimeMs(12 hours),fetch,baseUrl.
See the browser guide. Apache-2.0.
