Socket
Book a DemoInstallSign in
Socket

@percy/cli

Package Overview
Dependencies
Maintainers
1
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/cli

[![Test](https://github.com/percy/cli/workflows/Test/badge.svg)](https://github.com/percy/cli/actions)

1.31.1
latest
Source
npmnpm
Version published
Weekly downloads
395K
-9.5%
Maintainers
1
Weekly downloads
 
Created

What is @percy/cli?

@percy/cli is a command-line interface for Percy, a visual testing and review platform. It allows you to automate visual testing for your web applications by capturing screenshots and comparing them against baselines to detect visual changes.

What are @percy/cli's main functionalities?

Snapshot

This feature allows you to capture snapshots of your web application at different screen widths. The code sample demonstrates how to capture snapshots of a local web application running on port 3000 at three different screen widths.

const percySnapshot = require('@percy/cli');

(async () => {
  await percySnapshot('http://localhost:3000', { widths: [375, 768, 1280] });
})();

Start and Stop Percy

This feature allows you to start and stop the Percy agent programmatically. The code sample demonstrates how to start the Percy agent, run your tests, and then stop the agent.

const { start, stop } = require('@percy/cli');

(async () => {
  await start();
  // Run your tests here
  await stop();
})();

Upload Snapshots

This feature allows you to upload pre-captured snapshots to Percy for comparison. The code sample demonstrates how to upload snapshots from a local directory.

const { upload } = require('@percy/cli');

(async () => {
  await upload({ snapshots: ['./snapshots'] });
})();

Other packages similar to @percy/cli

FAQs

Package last updated on 21 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.