UI Inspect
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

FlagTypeDefaultDescription
--project <id>stringconfig fileProject ID
--branch <name>stringcurrent branchFilter by branch
--component <name>stringApprove only a specific component
--allbooleanfalseApprove all branches (not just current)
--jsonbooleanfalseOutput as JSON

Examples

Approve all pending baselines on current branch

npx ui-inspect approve --project proj_abc123

Approve a specific component

npx ui-inspect approve --project proj_abc123 --component "homepage"

Approve all branches

npx ui-inspect approve --project proj_abc123 --all

Baseline workflow

  1. First run — Screenshots become pending baselines
  2. Review — Check the visual diffs in the dashboard
  3. Approve — Run approve to accept them as the new baseline
  4. Future builds — Screenshots are compared against approved baselines

You can also approve/reject baselines from the web dashboard under Baselines.

On this page