Skip to content
v0.31.0

CLI overview

Full CLI reference for v0.31.0, published . Cloud features may behave differently today.

Use the Vizzly CLI to capture screenshots during tests, compare them against local baselines, and send builds to Vizzly for review.

Capture screenshots in your tests

Install this CLI release first, then call the client from your test runner. Capture a Playwright page and send the image to Vizzly.

import { vizzlyScreenshot } from '@vizzly-testing/cli/client';
let image = await page.screenshot();
await vizzlyScreenshot('checkout', image, {
properties: { browser: 'chromium', theme: 'dark' },
});

The client accepts an image buffer or a file path. Keep the screenshot name stable between runs so Vizzly can match it to the baseline. Use properties to distinguish browser, viewport, or theme variants.

Wrap your tests with npx vizzly tdd run "npm test" --no-open to compare locally. Use npx vizzly run "npm test" --wait to send the screenshots for cloud review. Both commands start the capture server for the test process.

Pick a package entry point

ImportUse it for
@vizzly-testing/cli/clientCapture screenshots from tests
@vizzly-testing/cli/sdkBuild a custom programmatic integration
@vizzly-testing/cli/configDefine project settings with defineConfig()

See the SDK guides for test framework setup. Those guides follow the current SDK releases.

What changed in this release

Added project link for cloud upload credentials and compact agent context output for builds. Full release notes for v0.31.0

Choose a workflow

Reference