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

swiftbrowse

v0.1.2

Published

The AI browser for browser automation and end-to-end testing: JavaScript/TypeScript SDK

Readme

swiftbrowse

The AI browser for browser automation and end-to-end testing. A native engine (Rust, driving Chromium over the DevTools Protocol) with one contract across a test runner, this TypeScript/JavaScript SDK, a Python SDK, and an MCP server for AI agents.

📖 Documentation: https://steady-ember-82q7.here.now/

npm install -D swiftbrowse
npx playwright install chromium chromium-headless-shell   # a Chromium for SwiftBrowse to drive
npx swiftbrowse doctor                                   # check what this machine can run

Tests in code

import { test, before, after } from 'node:test';
import { launch } from 'swiftbrowse';

let browser;
before(async () => { browser = await launch(); });
after(() => browser.close());

test('signs in', async () => {
  const page = await browser.newSession();      // isolated: own cookies, storage, tabs
  await page.navigate('http://localhost:3000/login');
  await page.fill('Email', '[email protected]');
  await page.click({ by: 'role', role: 'button', name: 'Sign in' },
    { expect: { type: 'url_contains', value: '/dashboard' } });
  await page.expect({ type: 'text_visible', text: 'Welcome, Ada' });
  await page.close();
});
  • Every engine operation is a typed method (navigate, click, fill, check, hover, selectOption, uploadFile, route, switchTab, switchFrame, saveStorageState, …), with required arguments in order and the rest as options.
  • A target is a string (accessible name, label, test id or text) or a locator (role, label, test_id, text, css, xpath). Several matches are an error, never a guess.
  • Actions wait until the element is visible, enabled, not covered and not moving. expect assertions retry until they pass.
  • A failed action or assertion throws SwiftBrowseError, so node:test, Vitest or Jest report it.
  • Sessions attach to a warm background browser, so creating one takes milliseconds.

Tests as JSON, with the built-in runner

{
  "name": "sign in",
  "tests": [
    { "name": "signs in", "steps": [
      { "op": "navigate", "url": "login" },
      { "op": "fill", "target": "Email", "value": "[email protected]" },
      { "op": "click", "target": "Sign in", "expect": { "type": "url_contains", "value": "/dashboard" } }
    ] }
  ]
}
npx swiftbrowse test --base-url http://localhost:3000/ -j 4 --retries 2 --html report.html --trace retain-on-failure

The runner supports parallel workers, retries and flaky detection, sharding, saved logins, network mocking, tabs, frames, uploads, traces with a live DOM, video, and JUnit/HTML reports. On the project's benchmark suite it runs 2–3× faster than Playwright Test.

For AI agents

{ "mcpServers": { "swiftbrowse": { "command": "npx", "args": ["-y", "swiftbrowse", "mcp"] } } }

Learn more

The native binary comes from a platform package (swiftbrowse-linux-x64, -linux-arm64, -darwin-arm64, -darwin-x64 or -windows-x64) that npm installs automatically. Set SWIFTBROWSE_BIN to use another binary. Apache-2.0.