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

ux-audit

v0.1.1

Published

Deterministic UI/UX testing and evidence platform for AI-assisted remediation

Readme

ux-audit

Deterministic UI/UX testing and evidence platform for AI-assisted remediation.

ux-audit audits one or more URLs using deterministic checks (Axe + Lighthouse), then writes a structured evidence bundle your AI agent (or team) can use to prioritize and implement fixes.

Features

  • Deterministic checks for accessibility and performance
  • Flexible scope: single URL, URL list, or base URL + paths
  • Pattern opt-in for targeted UX guidance (for example auth, forms, crud)
  • Evidence bundle with JSON/Markdown report and per-page artifacts
  • Optional screenshots and DOM snapshots for debugging
  • Authenticated page support via Playwright storage state

Requirements

  • Node.js >=18
  • Chrome/Chromium available for Lighthouse
  • Playwright Chromium browser installed for Axe runner

Install

npm install ux-audit

If you are developing this repo locally:

npm install
npm run build
npm run install:browsers

Quick Start

Audit a single page:

npx ux-audit audit https://example.com

Audit multiple URLs:

npx ux-audit audit --urls https://example.com/,https://example.com/docs --out ./test-run

Audit with base URL + paths:

npx ux-audit audit --base-url https://example.com --paths /,/pricing,/docs --patterns auth,forms

Show CLI help:

npx ux-audit --help

CLI Usage

ux-audit audit [url] [options]

Scope (choose one):

  • url (positional) or --url <url>
  • --urls <url1,url2,...>
  • --base-url <url> --paths <path1,path2,...>

Options:

  • --out <dir> output directory (default: ./ux-audit-bundle)
  • --patterns <id,id,...> enable pattern-specific checks
  • --include-screenshots include screenshots (default: enabled)
  • --no-screenshots disable screenshots
  • --include-dom-snapshot include page HTML snapshots
  • --storage-state <path> Playwright auth state JSON
  • --config <path> config file path override
  • --help, -h

Exit codes:

  • 0 success with no critical findings
  • 1 critical findings exist (or runtime failure)

Configuration

By default, the CLI looks for:

  • ux-audit.config.json
  • ux-audit.config.js
  • .ux-audit.json

Recommended config format (ux-audit.config.json):

{
  "baseUrl": "https://example.com",
  "paths": ["/", "/docs"],
  "patterns": ["auth", "forms"],
  "out": "./custom-out",
  "auth": {
    "storageState": "./playwright-auth.json"
  }
}

Supported fields:

  • urls: string[]
  • baseUrl: string
  • paths: string[]
  • patterns: string[]
  • out: string
  • auth.storageState: string

CLI arguments override config values.

Pattern IDs

Available pattern IDs:

  • auth
  • forms
  • crud
  • navigation
  • onboarding
  • search-filter
  • empty-error-loading
  • settings
  • dashboards
  • checkout
  • content-display
  • modals-overlays
  • data-tables

Auditing Authenticated Pages

  1. Create a Playwright storage state file from a logged-in session:
// Example snippet
await context.storageState({ path: "playwright-auth.json" });
  1. Run audit with that state:
npx ux-audit audit https://yourapp.com/dashboard --storage-state ./playwright-auth.json --out ./test-run

Security note: storage state contains session data. Never commit it.

Output Bundle

For each run, ux-audit writes:

  • ux-audit-report.json machine-readable findings
  • ux-audit-report.md human-readable summary
  • index.json manifest with scope, patterns, and artifact paths
  • a11y/*.json per-page Axe + heuristics artifacts
  • metrics/*.json per-page Lighthouse artifacts
  • screenshots/*.png when screenshots are enabled
  • snapshots/*.html when --include-dom-snapshot is enabled
  • patterns.json when pattern IDs are enabled
  • AGENT_PROMPT.md guide for consuming findings in an AI workflow

NPM Scripts (repo)

  • npm run build compile TypeScript
  • npm run test run Jest tests
  • npm run test:node run Node test runner
  • npm run install:browsers install Playwright Chromium
  • npm run audit -- <args> run CLI through package script
  • npm run audit:demo run demo audit against https://example.com

Programmatic API

The package currently exports:

  • runAudit from src/pipeline/runAudit.ts
  • getPatternIds from src/patterns/catalog.ts
  • report/finding types from src/report/types.ts

License

MIT