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

@mochi.js/core

v0.9.5

Published

The library for faithful browser automation. Bun-native; relational fingerprint matrix, biomechanical input, stock Chromium-for-Testing.

Readme

@mochi.js/core

The primary entry point for mochi — a zero-footprint, Bun-native browser automation framework.

bun add @mochi.js/core
import { mochi } from "@mochi.js/core";

const session = await mochi.launch({
  profile: "linux-chrome-stable",
  seed: "user-12345",
});

const page = await session.newPage();
await page.goto("https://example.com");
await page.humanClick("a");
await session.close();

Status

v0.7.x. mochi.launch() is fully wired: pipe-mode CDP transport, relational (profile, seed) Matrix, JIT-friendly inject delivered via Fetch.fulfillRequest body splice (with Page.addScriptToEvaluateOnNewDocument({ runImmediately: true, worldName: "" }) as the about:blank / data: fallback), behavioral synth, and a Chromium-native session.fetch (routes through CDP — Network.loadNetworkResource for simple GETs, page.evaluate("fetch") for non-GET — so JA4 is real Chrome by definition).

The full [v0.1.4 → v0.2] surface lands as additive minor bumps. See CHANGELOG.md.

What this package gives you

  • mochi.launch(opts) — spawn a Chromium-for-Testing instance with a relationally-locked fingerprint matrix derived from (profile, seed). Options include proxy, headless, binary, timeout, geoConsistency (IP/TZ/locale exit reconciliation), and challenges (Turnstile auto-click).
  • Session and Page — the runtime objects you drive.
  • page.humanClick / humanType / humanScroll — biomechanically-shaped input synthesis (Bezier + Fitts + Gaussian jitter).
  • session.fetch — out-of-band requests routed through Chromium itself via CDP. JA4/JA3/H2 are real Chrome by definition because Chromium is the client; cookies inherit from the page's origin; CORS applies for non-GET cross-origin calls.
  • page.screenshot(opts?) — PNG / JPEG / WebP via CDP Page.captureScreenshot. Options: format, quality, fullPage, clip, omitBackground, encoding. Element-bounded capture ({ element: handle }) is deferred — see https://mochijs.com/docs/reference/limits.
  • session.cookies.{save,load}(path, { pattern? }) — JSON cookie jar with version header + regex domain filter. Round-trips losslessly via Storage.getCookies / Storage.setCookies.
  • page.localStorage.{get,set} and page.sessionStorage.{get,set} — direct DOMStorage CDP access, frame-scoped (defaults to current main-frame origin; pass { origin } for cross-origin).
  • page.grantAllPermissions(opts?) — wraps Browser.grantPermissions with the full ALL_BROWSER_PERMISSIONS descriptor list.

All of this is the single import. No mixing Patchright + a fingerprint injector + a Turnstile clicker. mochi solves it once.

Why @mochi.js/core?

  • Bun-only. No Node fallback. Engines: bun >= 1.1.
  • Stock Chromium. No patched fork. Works against Chromium-for-Testing, pinned and downloadable via mochi browsers install.
  • Relational locking. Every fingerprint surface (canvas, WebGL, audio, fonts, timing) derives from a single (profile, seed) pair. No Frankenstein fingerprints. Audio + canvas digests are byte-exact via precomputed per-(profile, sample-rate) blobs (R-047 / R-048).
  • Zero-jitter spoofing. TurboFan-friendly proxies installed before any page script. Init-script delivery via Fetch.fulfillRequest body splice closes the source-attribution leak that bare addScriptToEvaluateOnNewDocument would otherwise carry.

License

MIT.

See also

Documentation