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

@accesslint/chrome

v0.2.0

Published

Ensure a debuggable Chrome that serves the CDP HTTP discovery API, and manage its lifecycle. Launches detached so it outlives the launcher process; exposes ensure/stop/status.

Readme

@accesslint/chrome

Ensure a debuggable Chrome that AccessLint's live-DOM audits can drive, and manage its lifecycle.

The AccessLint CLI (@accesslint/cli) is a pure CDP client: give it a debug endpoint and a URL, and it injects @accesslint/core and audits. It does not launch Chrome. This package fills that gap — and launches Chrome detached so it outlives the one-shot launcher process that started it.

Why a separate package

chrome-launcher's launch() ties Chrome's lifetime to the calling process, which is wrong for a npx-style one-shot: when the command exits, Chrome would die before the audit connects. So this package spawns Chrome detached, records its pid + throwaway profile to a state file, and exposes explicit stop.

It also encodes the HTTP-discovery trap: a Chrome opened via the DevTools checkbox (or chrome-devtools-mcp) holds the debug port open but serves only a WebSocket — chrome-remote-interface can't drive it. This package treats a Chrome as usable only when /json/version answers, never on a bare TCP probe. When you pin a port (--port or ACCESSLINT_CDP_PORT) it fails if that port is squatted, so callers stay pointed at the port they asked for; an unpinned ensure steps to the next free port instead.

Usage

# Get-or-launch a driveable Chrome; prints its endpoint as JSON.
npx @accesslint/chrome ensure
# → {"ok":true,"mode":"launched","host":"127.0.0.1","port":9222,"pid":1234,"managed":true,...}

# Idempotent: a second ensure attaches to the running one.
npx @accesslint/chrome ensure        # → {"mode":"attached",...}

# Tear it down.
npx @accesslint/chrome stop --all

Commands

| Command | What it does | | -------- | ------------------------------------------------------------------------- | | ensure | Attach to a driveable Chrome on the port, or launch a detached one. | | stop | Kill a managed instance (--port) or all of them (--all) and clean up. |

Options

-p, --port <n>   CDP port to attach to / launch on (default 9222)
    --headed     Launch a visible Chrome instead of headless (ensure)
    --download   Download a managed Chrome for Testing if none is installed (ensure)
    --all        Stop every managed instance (stop)

If the default port is occupied by an undriveable Chrome (checkbox mode), an unpinned ensure steps to a free port and reports the actual one — read port from its JSON output. If you pinned that port with --port, ensure fails instead; free the port or pass a different one.

By default ensure uses the system Chrome (CHROME_PATH or a platform search) and fails if none is found. Pass --download (or set ACCESSLINT_CHROME_DOWNLOAD=1) to fall back to a pinned Chrome for Testing build fetched via @puppeteer/browsers into a cache dir. The download (~170MB) happens once on first use; later runs reuse the cached binary. A system Chrome, when present, always wins — the download is only a fallback.

Environment

ACCESSLINT_CDP_PORT         default port
CHROME_PATH                 override Chrome binary discovery
ACCESSLINT_CHROME_DOWNLOAD   1/true to enable the Chrome for Testing fallback
ACCESSLINT_CHROME_CACHE_DIR  where downloaded Chrome is cached (default ~/.cache/accesslint-chrome)

Library API

import { ensure, stop } from "@accesslint/chrome";

const chrome = await ensure({ port: 9222 }); // { mode, host, port, pid, managed, ... }
// … run an audit against chrome.host:chrome.port …
await stop({ port: chrome.port });

License

MIT