CLI overview
Full CLI reference for v0.39.1, 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
| Import | Use it for |
|---|---|
@vizzly-testing/cli/client | Capture screenshots from tests |
@vizzly-testing/cli/sdk | Build a custom programmatic integration |
@vizzly-testing/cli/config | Define 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 interactive reminders for CLI and agent skill updates. Full release notes for v0.39.1Choose a workflow
- Install the exact CLI release and check your setup.
- Compare screenshots locally while working on your UI.
- Upload screenshots from disk or use
vizzly runto wrap your test command. - Read builds and comparisons from a script with JSON output.