circleci preflight runs the working tree through CI
Introduced 2026-10-28 · score 0.97
HOW TO USE IT
When you need CI results for local staged, unstaged, and untracked changes, run `circleci preflight run --json` and inspect failed-job events. Use `circleci preflight cleanup --force` to delete finished preflight branches without a prompt.
circleci preflight run --jsoncircleci preflight cleanup --forceWHY THIS HELPS
When you need CI results for local staged, unstaged, and untracked changes before committing, run a preflight and inspect its failures.
REQUIREMENTS AND LIMITATIONS
- Version: v1.12.0
- Non-interactive: `--json` streams `branch_pushed`, `run_started`, `job_failed`, and `run_summary` events, one event per line.
- Non-interactive: Cleanup asks for confirmation; without a terminal it requires `--force`, otherwise nothing is deleted.
- --json: Stream events as JSON, one event per line.
- --force: Skip cleanup confirmation; required when cleanup would delete branches without a terminal.
- Prerequisite: The CLI must have a usable project slug, resolved from `--project` or the Git remote, and an authenticated CircleCI client.
- Snapshots include staged, unstaged, and untracked changes, minus ignored files.
- The snapshot is staged in an in-memory index copy and does not move refs or touch HEAD, the index, working tree, or stash.
- The command waits for the project's push trigger to start a run.
- If the default branch cannot be determined, the snapshot parent falls back to HEAD.
- By default, preflight stops at the first failed job; further behavior is not shown in the supplied span.
FIRST-PARTY EVIDENCE
- https://github.com/CircleCI-Public/circleci-cli/releases/tag/v1.12.0
- https://github.com/CircleCI-Public/circleci-cli/pull/1889
- https://github.com/CircleCI-Public/circleci-cli/blob/v1.12.0/internal/cmd/root/testdata/help/circleci/preflight/run.txt
- https://github.com/CircleCI-Public/circleci-cli/blob/v1.12.0/internal/cmd/root/testdata/help/circleci/preflight/cleanup.txt
- https://github.com/CircleCI-Public/circleci-cli/blob/v1.12.0/internal/cmd/preflight/run.go
Check the installed version and the source before using it. Entry JSON