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

@testmuai/browser-cloud

v1.0.1

Published

Web Browser for AI Agents powered by TestMu AI

Downloads

55

Readme

TestMu AI Browser Cloud SDK

Web Browser for AI Agents powered by TestMu AI

TypeScript License: MIT

Connect with Puppeteer, Playwright, or Selenium to TestMu AI Browser Cloud or local browsers - with built-in stealth, session persistence, and full observability.

import { Browser } from '@testmuai/browser-cloud';

const client = new Browser();
const session = await client.sessions.create({ adapter: 'puppeteer', ... });
const browser = await client.puppeteer.connect(session);

Installation

npm install @testmuai/browser-cloud

Requirements: Node.js 16+ (Node 18+ for Playwright adapter)


Quick Start

import { Browser } from '@testmuai/browser-cloud';

const client = new Browser();

// Create a session
const session = await client.sessions.create({
  adapter: 'puppeteer',
  stealthConfig: {
    humanizeInteractions: true,
    randomizeUserAgent: true,
  },
  profileId: 'my-agent-profile',
  lambdatestOptions: {
    build: 'My Agent',
    name: 'First Run',
    'LT:Options': {
      username: process.env.LT_USERNAME,
      accessKey: process.env.LT_ACCESS_KEY,
    }
  }
});

// Connect via Puppeteer
const browser = await client.puppeteer.connect(session);
const page = (await browser.pages())[0];

await page.goto('https://example.com');
console.log(await page.title());

// Cleanup
await browser.close();
await client.sessions.release(session.id);

Features

Adapters

Connect with your preferred automation library. All three connect to the same cloud infrastructure.

Puppeteer

const session = await client.sessions.create({ adapter: 'puppeteer', ... });
const browser = await client.puppeteer.connect(session);
const page = (await browser.pages())[0];

Playwright (requires Node 18+)

const session = await client.sessions.create({ adapter: 'playwright', ... });
const { browser, context, page } = await client.playwright.connect(session);

Selenium

const session = await client.sessions.create({ adapter: 'selenium', ... });
const driver = await client.selenium.connect(session);

Stealth Mode

Make your agent's browser indistinguishable from a real user. Patches 15+ browser fingerprints automatically.

const session = await client.sessions.create({
  adapter: 'puppeteer',
  stealthConfig: {
    humanizeInteractions: true,   // Random delays on clicks and typing
    randomizeUserAgent: true,     // Pick from pool of realistic UAs
    randomizeViewport: true,      // +/-20px jitter on viewport dimensions
  },
  lambdatestOptions: { ... }
});

Puppeteer uses puppeteer-extra with the stealth plugin. Playwright uses custom init scripts injected before page load. Both handle user-agent, viewport, and interaction humanization automatically.

Session Context

Extract and inject browser state (cookies, localStorage, sessionStorage) across sessions. Log in once, skip login forever.

// Extract from a logged-in session
const context = await client.context.getContext(page);

// Inject into a new session
await client.context.setContext(newPage, context);

// Or pass it at session creation
const session = await client.sessions.create({
  sessionContext: savedContext,
  ...
});

Profiles

Persist browser state to disk across separate script runs. Your agent logs in once, the profile auto-saves on browser.close(), and every future run loads the saved state.

const session = await client.sessions.create({
  adapter: 'puppeteer',
  profileId: 'my-app-login',   // Auto-loads and auto-saves
  lambdatestOptions: { ... }
});

Manual management:

await client.profiles.saveProfile('my-profile', page);
await client.profiles.loadProfile('my-profile', page);
const profiles = await client.profiles.listProfiles();
await client.profiles.deleteProfile('my-profile');

Quick Actions

One-liner operations. No session management needed - the SDK handles browser setup, navigation, and cleanup.

// Scrape content
const data = await client.scrape({
  url: 'https://example.com',
  format: 'markdown',   // 'html' | 'markdown' | 'text' | 'readability'
});

// Screenshot
const image = await client.screenshot({
  url: 'https://example.com',
  fullPage: true,
  format: 'png',
});

// PDF
const pdf = await client.pdf({
  url: 'https://example.com',
  format: 'A4',
});

Computer Actions

Drive the browser through coordinate-based actions for AI vision agents.

// Click at coordinates
await client.sessions.computer(session.id, page, {
  action: 'click',
  coordinate: [100, 200]
});

// Type text
await client.sessions.computer(session.id, page, {
  action: 'type',
  text: 'Hello World'
});

// Screenshot for AI vision loop
const { base64_image } = await client.sessions.computer(session.id, page, {
  action: 'screenshot'
});

File Service

Transfer files between your local machine and the cloud browser.

// Upload
const fileBuffer = fs.readFileSync('document.pdf');
await client.files.uploadToSession(session.id, fileBuffer, 'document.pdf');

// Download
const result = await client.files.downloadFromSession(session.id, 'https://example.com/report.csv');
fs.writeFileSync('report.csv', result);

Extensions

Load Chrome extensions into cloud sessions.

const ext = await client.extensions.register({
  name: 'My Extension',
  version: '1.0.0',
  cloudUrl: 'https://s3.amazonaws.com/bucket/extension.zip',
});

const session = await client.sessions.create({
  adapter: 'puppeteer',
  extensionIds: [ext.id],
  lambdatestOptions: { ... }
});

Tunnel

Access localhost and internal networks from cloud browsers.

const session = await client.sessions.create({
  adapter: 'puppeteer',
  tunnel: true,
  tunnelName: 'my-tunnel',
  lambdatestOptions: { ... }
});

// Cloud browser can now reach localhost
await page.goto('http://localhost:3000');

TestMu AI Browser Cloud

Connect to TestMu AI's cloud infrastructure for production workloads. Every session comes with video recording, console logs, network capture, and a live session viewer.

const session = await client.sessions.create({
  adapter: 'puppeteer',
  lambdatestOptions: {
    build: 'AI Agent Build',
    name: 'Production Run',
    platformName: 'Windows 11',
    browserName: 'Chrome',
    browserVersion: 'latest',
    'LT:Options': {
      username: process.env.LT_USERNAME,
      accessKey: process.env.LT_ACCESS_KEY,
      video: true,
      console: true,
    }
  }
});

console.log('Live viewer:', session.sessionViewerUrl);
console.log('Dashboard:', session.debugUrl);

Environment variables:

export LT_USERNAME=your_username
export LT_ACCESS_KEY=your_access_key

Sign up at testmuai.com to get your credentials.


Examples

See the examples/ directory for complete working demos:


Running Tests

# Run all tests (local + cloud)
./test.sh

# Local tests only (no cloud credentials needed)
./test.sh quick

# Cloud tests only
./test.sh cloud

# Build only
./test.sh build

License

MIT