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

testivai-cli

v1.0.13

Published

CLI tool for testivAI Visual Regression testing

Readme

testivAI CLI

Command-line interface for testivAI Visual Regression testing.

Installation

npm install -g testivai-cli

Quick Start

Initialize a Project

testivai init --framework playwright --baseline-dir .testivai/baseline

Compare Screenshots

testivai compare --baseline-dir .testivai/baseline --compare-dir .testivai/compare

Get Help

testivai help
testivai help init
testivai help compare

Commands

testivai init

Initialize testivAI Visual Regression in the current project.

Options:

  • --framework, -f - Testing framework to use (playwright, cypress, puppeteer, selenium) [default: playwright]
  • --baseline-dir, -b - Directory to store baseline screenshots [default: .testivai/visual-regression/baseline]
  • --compare-dir, -c - Directory to store comparison screenshots [default: .testivai/visual-regression/compare]
  • --report-dir, -r - Directory to store generated reports [default: .testivai/visual-regression/reports]
  • --diff-threshold, -t - Threshold for acceptable difference between screenshots (0-1) [default: 0.1]

Example:

testivai init --framework playwright --baseline-dir ./screenshots/baseline --diff-threshold 0.05

testivai compare

Compare screenshots against baselines.

Options:

  • --baseline-dir, -b - Directory containing baseline screenshots [default: .testivai/visual-regression/baseline]
  • --compare-dir, -c - Directory containing comparison screenshots [default: .testivai/visual-regression/compare]
  • --report-dir, -r - Directory to store generated reports [default: .testivai/visual-regression/reports]
  • --diff-threshold, -t - Threshold for acceptable difference between screenshots (0-1) [default: 0.1]
  • --update-baselines, -u - Update baselines with comparison screenshots if different [default: false]

Example:

testivai compare --baseline-dir ./screenshots/baseline --compare-dir ./screenshots/current --update-baselines

testivai help

Display help information for commands.

Usage:

testivai help [command]

Examples:

testivai help           # Show general help
testivai help init      # Show help for init command
testivai help compare   # Show help for compare command

Configuration File

The CLI can generate a configuration file (testivai.config.js) to store your settings:

module.exports = {
  framework: 'playwright',
  baselineDir: '.testivai/visual-regression/baseline',
  compareDir: '.testivai/visual-regression/compare',
  reportDir: '.testivai/visual-regression/reports',
  diffThreshold: 0.1,
  updateBaselines: false
};

Integration with Testing Frameworks

The CLI is designed to work alongside the testivAI Visual Regression SDK. For programmatic usage in your tests, install the SDK:

npm install testivai-visual-regression

See testivai-visual-regression for SDK documentation.

Workflow

  1. Initialize: Set up testivAI in your project

    testivai init --framework playwright
  2. Run Tests: Use the SDK in your test files to capture screenshots

  3. Compare: Compare captured screenshots against baselines

    testivai compare
  4. Review: Check the generated HTML report for visual differences

  5. Update: Update baselines when changes are intentional

    testivai compare --update-baselines

Examples

Basic Workflow

# Initialize project
testivai init

# Run your tests (using the SDK)
npm test

# Compare screenshots
testivai compare

# Update baselines if changes are intentional
testivai compare --update-baselines

Custom Configuration

# Initialize with custom settings
testivai init \
  --framework cypress \
  --baseline-dir ./visual-tests/baseline \
  --compare-dir ./visual-tests/current \
  --report-dir ./visual-tests/reports \
  --diff-threshold 0.05

# Compare with custom settings
testivai compare \
  --baseline-dir ./visual-tests/baseline \
  --compare-dir ./visual-tests/current \
  --diff-threshold 0.05

Exit Codes

  • 0 - Success
  • 1 - Error occurred

License

MIT