@hackcove/pixelslash
v0.7.0
Published
Visual review from the command line: capture Main and Branch, pixel-diff them, write a report.
Maintainers
Readme
pixelslash
Visual review from the command line: capture Main and Branch (Playwright, or PNGs you already
have), pixel-diff them, and write a report.html. Optionally judge each shot against a design
system with a local vision model, or upload the shots to a PixelSlash server for review.
This is the CLI of PixelSlash. The full
reference for every command and flag is that repository's
docs/cli.md.
Install
npm i -D @hackcove/pixelslash
npx @hackcove/pixelslash install-browser # once per machine, for URL capture- Bun is required. The bundle runs on the Bun runtime (
#!/usr/bin/env bun), not Node; install Bun first (engines.bunis>=1.4.0). - Playwright is a peer dependency. npm installs
playwrightnext to the package. It is a peer because the browser it launches is yours:pixelslash install-browserruns that same Playwright to installchromium-headless-shell, once per machine (install-browser firefox,webkitoralladd the others, for--browser). Without it, URL capture fails; PNG mode needs no browser.
Use
# two screenshots you already have
npx @hackcove/pixelslash --live-png main.png --local-png branch.png --out out
# two URLs that are already up
npx @hackcove/pixelslash --live https://example.com --local http://localhost:3000 --out outOpen out/report.html. The exit code is 0 unless new violations were found on Branch; 2 is a
usage error.
MIT. See the LICENSE file at the repository root.
