CLI Reference
approve
Approve pending baselines and optionally promote them to the main branch.
The approve command accepts pending baseline screenshots, establishing them as the reference for future comparisons.
Usage
npx ui-inspect approve [options]Options
| Flag | Type | Default | Description |
|---|---|---|---|
--project <id> | string | config file | Project ID |
--branch <name> | string | current branch | Filter by branch |
--component <name> | string | — | Approve only a specific component |
--all | boolean | false | Approve all branches (not just current) |
--json | boolean | false | Output as JSON |
Examples
Approve all pending baselines on current branch
npx ui-inspect approve --project proj_abc123Approve a specific component
npx ui-inspect approve --project proj_abc123 --component "homepage"Approve all branches
npx ui-inspect approve --project proj_abc123 --allBaseline workflow
- First run — Screenshots become pending baselines
- Review — Check the visual diffs in the dashboard
- Approve — Run
approveto accept them as the new baseline - Future builds — Screenshots are compared against approved baselines
You can also approve/reject baselines from the web dashboard under Baselines.