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

pixel-diff-ui

v0.0.5

Published

Lightweight visual regression testing CLI with built-in dashboard and approval workflow

Downloads

30

Readme

📸 pixel-diff-ui

A lightweight visual regression testing tool for frontend apps.
Easily record baseline screenshots, compare changes, and review them in a built-in dashboard with Approve flows.

No heavy setup, no Docker, no boilerplate tests. Just plug and play.


Features

  • One-liner commandsrecord, compare, dashboard.
  • Multi-scenario config — test multiple pages/components in one run.
  • Built-in Dashboard UI — review baseline, current, and diff side by side.
  • Approve flow — accept intended changes, update baselines automatically.
  • CI/CD integration ready — fail builds on unexpected visual changes.
  • Lightweight — Node + Puppeteer, no extra infra.

Installation

npm install -g pixel-diff-ui

or run with npx:

npx pixel-diff-ui record ...

Usage

1. Record a baseline

Start your app (e.g. Next.js on http://localhost:3000) and run:

pixel-diff-ui record -n homepage -u http://localhost:3000 -v 1366x768

This saves a baseline screenshot in __pixel_baseline__/.


2. Compare with current UI

After making changes in your app:

pixel-diff-ui compare -n homepage -u http://localhost:3000 -v 1366x768

This generates:

  • __pixel_output__/…_current.png → latest screenshot
  • __pixel_output__/…_diff.png → highlighted visual differences

3. Multi-scenario with config

Create a pixel-diff.json in your project:

{
  "baselineDir": "__pixel_baseline__",
  "outputDir": "__pixel_output__",
  "threshold": 0.1,
  "scenarios": [
    {
      "name": "Homepage",
      "url": "http://localhost:3000",
      "viewport": "1366x768"
    },
    {
      "name": "About Page",
      "url": "http://localhost:3000/about",
      "viewport": "1366x768"
    },
    {
      "name": "Mobile Homepage",
      "url": "http://localhost:3000",
      "viewport": "375x812"
    }
  ]
}

Run all scenarios in one go:

pixel-diff-ui record --config pixel-diff.json
pixel-diff-ui compare --config pixel-diff.json

4. Review in Dashboard

Launch the built-in dashboard:

pixel-diff-ui dashboard --config pixel-diff.json
  • Shows Baseline / Current / Diff for each scenario.
  • Click Approve → updates baseline with current screenshot.
  • Commit new baselines to keep history in version control.

CI/CD Integration

Perfect for pull requests:

  • Run pixel-diff-ui compare --config pixel-diff.json
  • If diffs are found, the CLI exits with code 1 (failing the build).
  • Upload __pixel_output__/ as build artifacts for review.
  • Reviewer uses Dashboard locally or commits updated baselines when design changes are approved.

Benefits

  • Catch accidental UI regressions: Pixel-perfect checks that unit tests can’t detect.
  • Team workflow: Designers & devs review visual changes before merging.
  • Simple approval flow: Update baselines only when changes are intended.
  • Lightweight: No heavy Docker or third-party services, works locally & in CI.

Why is this novel?

Existing tools exist (BackstopJS, jest-image-snapshot, Differencify, etc.), but they have trade-offs:

  • BackstopJS → powerful but config-heavy & not very DX-friendly.
  • jest-image-snapshot → requires writing test code, no dashboard.
  • Differencify → low-level library, no UI, no workflows.
  • Micoo → Docker-based, heavy infra.

pixel-diff-ui is different:

  • Developer-first CLI workflow (record, compare, dashboard).
  • Zero-config defaults that just work.
  • Built-in Dashboard UI with approve button.
  • Works standalone, integrates easily into any project.

It’s like Jest snapshots — but for pixels, with a UI.


Roadmap

  • [ ] Approve All button in dashboard
  • [ ] CI-friendly HTML report export
  • [ ] Ignore regions (mask out ads/timestamps)
  • [ ] GitHub Action for easy PR checks