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/cli

v0.10.0

Published

CLI tool for auditing HTML accessibility using @accesslint/core

Readme

@accesslint/cli

CLI tool for auditing HTML accessibility using @accesslint/core.

npx -y @accesslint/cli scan [source] [options]   # audit a URL, HTML file, or stdin
npx -y @accesslint/cli init                       # scaffold accesslint.config.json

v0.8 — breaking change. The audit now lives under the scan subcommand: run accesslint scan <source> (previously accesslint <source>).

scan — audit

Sources

# Audit a local file
npx -y @accesslint/cli scan index.html

# Audit a URL (requires a debuggable Chrome; start one first)
npx @accesslint/chrome ensure
npx -y @accesslint/cli scan https://example.com

# Pipe HTML via stdin
curl -s https://example.com | npx -y @accesslint/cli scan

# Audit a named target from accesslint.config.json (see `init` below)
npx -y @accesslint/cli scan dev

A non-URL, non-file argument is resolved as a target name from accesslint.config.json (the local overlay takes precedence), expanding to that target's url and options; explicit flags override the target's. With no argument, the config's default target is audited. An unknown name lists the available targets. To pipe HTML in a project that has a config, pass --stdin.

Options

-f, --format <fmt>    Output format: text, json (default: text)
--pretty              Pretty-print json output (default: single line)
--include-aaa         Include AAA-level rules
-d, --disable <ids>   Comma-separated rule IDs to disable
-h, --help            Show help
--version             Show version

URL audits connect to a debuggable Chrome over CDP. Start one with npx @accesslint/chrome ensure, then pass the port if it differs from the default.

-p, --port <n>          CDP port (URL audits only, default: 9222)
--host <host>           CDP host (URL audits only, default: 127.0.0.1)
-s, --selector <sel>    CSS selector to scope the audit; auto-waits for element (URL only)
--wait-for <s>          Selector or visible text to wait for before auditing (URL only)
--wait-timeout <ms>     Max ms to wait for --wait-for or --selector (default: 10000)
--attach                Only attach to an existing tab matching the URL; fail if not found
--snapshot <name>       Snapshot name — fail only on violations new since baseline (URL only)
--snapshot-dir <dir>    Directory for snapshot files (default: ./accessibility-snapshots)
--update-snapshot       Force-overwrite the snapshot baseline (also: ACCESSLINT_UPDATE=1)

Exit codes

| Code | Meaning | | ---- | ---------------- | | 0 | No violations | | 1 | Violations found | | 2 | Error |

Examples

# Text output with colors
echo '<img src="photo.jpg">' | npx -y @accesslint/cli scan

# JSON output
npx -y @accesslint/cli scan --format json index.html

# Audit a fragment — page-level rules (document-title, html-has-lang) are skipped automatically
echo '<button></button>' | npx -y @accesslint/cli scan

# Disable specific rules
npx -y @accesslint/cli scan -d "landmarks/region,navigable/bypass" index.html

# Snapshot mode — capture a baseline; fail only on new violations
npx -y @accesslint/cli scan --snapshot main https://example.com

init — scaffold config

npx -y @accesslint/cli init        # interactive, framework-aware defaults
npx -y @accesslint/cli init --yes  # accept the defaults (CI / non-interactive)

Writes accesslint.config.json with named audit targets, plus a gitignored accesslint.config.local.json overlay for prod/staging. Defaults are inferred from your package.json: the framework sets the dev port (an explicit -p/--port in the dev script wins). No port scanning. A Storybook target is not added by default — pass --storybook (or opt in at the prompt when Storybook is detected); its URL is pre-filled when found.

// accesslint.config.json
{
  "default": "dev",
  "targets": {
    "dev": { "url": "http://localhost:5173" },
    "storybook": { "url": "http://localhost:6006" },
  },
}

Each target carries the same options as scan flags (url, selector, waitFor, includeAAA, disable, snapshotDir), so a target is a fully-specified audit context.

-y, --yes               Accept framework-aware defaults without prompting
--dev-url <url>         Override the inferred dev URL
--storybook             Add a Storybook target
--skip-storybook        Do not add a Storybook target
--prod-url <url>        Prod/staging URL (written to the gitignored overlay)
--default <name>        Name of the default target (default: dev)
--force                 Overwrite an existing accesslint.config.json
--cwd <dir>             Project directory (default: current directory)