Skip to content

feat: skip multiple Chromatic projects in a single CLI invocation#1249

Open
hamidrezahanafi wants to merge 1 commit intochromaui:mainfrom
hamidrezahanafi:hrh.skipmultipleprojectatonce
Open

feat: skip multiple Chromatic projects in a single CLI invocation#1249
hamidrezahanafi wants to merge 1 commit intochromaui:mainfrom
hamidrezahanafi:hrh.skipmultipleprojectatonce

Conversation

@hamidrezahanafi
Copy link
Copy Markdown

Summary

Adds the ability to skip multiple Chromatic projects in one CLI invocation by passing multiple --project-token values alongside --skip. Previously, skipping N projects required N separate CLI calls — now it can be done with a single command.

Motivation

In monorepo setups with many Chromatic projects, skipping builds (e.g. on certain branches) required invoking the CLI once per project. This was slow, verbose, and hard to maintain in CI configurations. This change collapses all those invocations into one.

How it works

When --skip is set and multiple --project-token values are provided, the CLI:

  1. Gathers git info (commit, branch, slug) once.
  2. For each token: authenticates and calls the SkipBuild mutation.
  3. Reports how many projects were skipped and exits with code 0.
    If some tokens fail, the CLI logs warnings but continues with the rest. It only throws an error if all tokens fail.
    When a single token is provided, existing behavior is completely unchanged.

Usage

CLI

npx chromatic \
  --project-token token-app-a \
  --project-token token-app-b \
  --project-token token-app-c \
  --skip

@hamidrezahanafi hamidrezahanafi force-pushed the hrh.skipmultipleprojectatonce branch from fd91216 to 2dd484d Compare March 17, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant