aislop ci is the same scan engine as aislop scan, wrapped in a gate. It prints structured JSON, then exits with code 1 if the score falls below your configured threshold or if any error-severity diagnostic is present. Because it always emits JSON by default, it slots into any CI provider without extra parsing or configuration—just run it and let the exit code do the work.
The simplest set-and-forget form always pulls the latest published CLI, so there is nothing to pin or bump:
Basic usage
Flags
Only gate files that changed relative to the diff base. In CI, PR changes are already committed, so a plain
--changes (which diffs against HEAD) sees nothing. Always pair this with --base to point at the PR target branch.The git ref to diff against when
--changes is set. Defaults to HEAD. Set this to the target branch ref so the gate only evaluates the files a pull request actually touches.Only gate staged files. Use this in a pre-commit hook to block commits that would regress the score.
Render the human-friendly terminal UI instead of JSON output. Useful when you are running
aislop ci locally to debug a gate failure without switching to aislop scan.Emit a SARIF 2.1.0 report instead of JSON. Upload this with the GitHub code scanning action to surface findings in pull request reviews and the Security tab.
Select
json or sarif output format. Equivalent to --json or --sarif respectively.PR-scoped gating
A plainaislop ci --changes diffs the working tree against HEAD. In CI, the PR commits are already part of the branch history, so that diff is empty. To gate only the files a pull request touches, pass the target branch as --base:
origin/<branch> resolves directly. On a shallow or single-branch clone, fetch the target branch first and use FETCH_HEAD:
JSON output schema
aislop ci emits a single JSON object to stdout. The schema matches aislop scan --json. Values below are illustrative:
Quality gate configuration
Set your minimum acceptable score in.aislop/config.yml:
aislop ci exits 1 when either condition is true:
- The score is below
failBelow - Any diagnostic with
errorseverity is present
The default
failBelow threshold is 0, meaning the gate only fails on error-severity findings unless you set a higher bar. Run aislop init --strict to start with a threshold of 85.CI provider recipes
- GitHub Actions
- GitLab CI
- CircleCI
- Bitbucket Pipelines
The self-contained form always runs the latest CLI—nothing to pin:Prefer the Marketplace Action? It wraps
setup-node and runs the same gate:Fastest setup: aislop init
Runaislop init and answer yes to the GitHub Actions workflow prompt. It writes both .aislop/config.yml and .github/workflows/aislop.yml for you. Commit both files and your quality gate is live.
--strict for an enterprise-grade baseline with all engines enabled and failBelow: 85:
Exit codes
| Exit code | Reason |
|---|---|
0 | Score is at or above failBelow and no error-severity findings |
1 | Score is below failBelow, or at least one error-severity diagnostic is present |