npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@silyze/browsary-cloud-client

v1.1.3

Published

Browser provider for Browsary Cloud instances

Readme

Browsary Cloud Client

Browser provider for Browsary Cloud instances, enabling remote browser management via a container service and coordination layer.

Installation

npm install @silyze/browsary-cloud-client

Usage

BrowserClient

The BrowserClient class communicates with a Browsary Cloud server to manage browser containers.

import BrowserClient, {
  BrowserClientError,
} from "@silyze/browsary-cloud-client";

const client = new BrowserClient(new URL("https://your-cloud-endpoint:39029"));

// Fetch server metadata
try {
  const info = await client.serverInfo();
  console.log(info);
} catch (err) {
  if (err instanceof BrowserClientError)
    console.error("Client error:", err.message);
}

// List all active containers
const containers = await client.list();

// Create a new browser container
const created = await client.create({
  name: "test-browser",
  password: "secret",
  screen: { width: 1280, height: 720 },
  args: "--no-sandbox",
  coordinatorUrl: "https://coordinator.example.com/",
  image: "google-chrome",
});

// Build service URLs
const vncUrl = client.vncUrl(created);
const sshUrl = client.sshUrl(created);
const remoteUrl = client.remoteUrl(created);

// Control container lifecycle
await client.start(created.name);
await client.pause(created.name);
await client.unpause(created.name);
await client.stop(created.name);

// Stream logs
const logStream = await client.logs(created.name);
for await (const chunk of logStream) {
  process.stdout.write(chunk);
}

// Attach to container stdin
const attachStream = await client.attach(created.name, someReadableStream);

RemoteBrowserProvider

RemoteBrowserProvider extends BrowserProvider to launch and manage Puppeteer Browser instances in Browsary Cloud.

import { RemoteBrowserProvider } from "@silyze/browsary-cloud-client";
import { Coordinator } from "@silyze/coordinator";

// Initialize your coordinator
const coordinator = new MyCoordinator("https://coordinator.example.com/");

// Create a provider with optional custom client and default container config
const provider = new RemoteBrowserProvider({
  coordinator,
  default: { name: "test-browser" },
});

// Acquire a Browser instance (launches or connects to the container)
const browser = await provider.getBrowser();

// Use puppeteer-core API
const page = await browser.newPage();
await page.goto("https://example.com");

// Release when done
await provider.releaseBrowser(browser);

API Reference

Types

ServerOsInfo

{ name: string; version?: string; kernel: { type: string; version: string } }

ServerMemoryInfo

{
  percentage: number;
  free: number;
  total: number;
}

ServerCpuInfo / ServerCpu

{ amount: number; load: [number, number, number]; cpus: ServerCpu[] }

ServerInfo

{
  name: string;
  id: string;
  os: ServerOsInfo;
  memory: ServerMemoryInfo;
  cpu: ServerCpuInfo;
}

BrowserServiceContainer

Ports for VNC, remote protocol, and SSH

BrowserContainer

Container metadata including name, state, status, and service ports

BrowserContainerCreateDetails

Parameters to create a new container:

  • password: VNC/SSH password
  • screen: height/width in pixels
  • name: unique container name
  • args: Docker or browser flags
  • coordinatorUrl: URL for coordination
  • image: container image tag

BrowserClientError

Thrown on non-JSON or error responses

BrowserClient Methods

  • serverInfo(): Promise<ServerInfo>
  • list(): Promise<Array<BrowserContainer & { id: string }>>
  • create(details): Promise<Omit<BrowserContainer, 'status'|'state'> & { id: string }>
  • get(name): Promise<BrowserContainer>
  • start/stop/pause/unpause(name): Promise<string>
  • logs(name): Promise<ReadableStream>
  • attach(name, input?): Promise<ReadableStream>
  • vncUrl(container), sshUrl(container), remoteUrl(container): build service URLs

RemoteBrowserProvider

Extends BrowserProvider<RemoteBrowserConfig>:

  • getBrowser(config?): Promise<Browser>
  • releaseBrowser(browser): void | Promise<void>
BaseRemoteBrowserConfig

Extends BaseBrowserConfig with:

  • client?: custom BrowserClient
  • coordinator: Coordinator instance
  • default: RemoteBrowserConfig for default container
RemoteBrowserConfig

Either { name: string } to reuse a container or full create details without coordinatorUrl

Error Handling

All client methods throw BrowserClientError when the server returns a non-200 status or invalid JSON payload.