CLI Reference
CLI Overview
The ui-inspect CLI provides visual regression testing from your terminal and CI/CD pipelines.
Installation
pnpm add -D @ui-inspect/cliCommands
build
Capture screenshots and run visual comparisons
upload
Upload pre-captured screenshots from a directory
approve
Approve pending baselines
report
Post build results as a GitHub PR comment
turbosnap
Analyze which screenshots need re-testing
ci-setup
Generate CI/CD workflow files
Global options
| Flag | Description |
|---|---|
--version | Show CLI version |
--help | Show help for any command |
Environment variables
| Variable | Required | Description |
|---|---|---|
UI_INSPECT_TOKEN | Yes | API authentication token |
UI_INSPECT_API_URL | No | Override API server URL |
UI_INSPECT_PROJECT_ID | No | Override project ID from config |
Configuration
The CLI reads from ui-inspect.config.yml in your project root. See Configuration for the full spec.
Exit codes
| Code | Meaning |
|---|---|
0 | Success, no regressions |
1 | Visual regressions found (when --fail-on-diff is set) |
2 | Configuration or authentication error |