ci command is designed to run identically on every CI provider. It scans your codebase, outputs structured JSON, and exits with a non-zero code when the score drops below your configured threshold or any error-severity diagnostic is present. Because npx --yes aislop@latest ci always fetches the latest published CLI, there is no version pin to maintain across your pipelines.
GitLab CI
Add anaislop job to your .gitlab-ci.yml. The job runs on merge requests and pushes to main by default — adjust the rules block to match your branching strategy.
CircleCI
Add anaislop job to your CircleCI config and include it in your quality-gate workflow.
Bitbucket Pipelines
Bitbucket clones repositories with a shallow history by default. Branch diffs require full history, and the PR target branch is exposed as$BITBUCKET_PR_DESTINATION_BRANCH. Fetch the target branch before running aislop, then gate on only the changed files using --changes --base FETCH_HEAD.
Bitbucket’s clone contains only the source branch. Running
git fetch origin <branch> sets FETCH_HEAD without creating a local origin/<branch> ref — use --base FETCH_HEAD rather than --base origin/<branch> to avoid a ref-resolution error.PR-scoped gating
By default,aislop ci scores your entire codebase. Passing --changes --base <ref> restricts the scan to files that differ between the current HEAD and the base branch, making the gate faster and more actionable on large repositories.
scan and ci accept --changes and --base, and the score gate and exit code apply to the scoped set of files. If --base cannot be resolved, the run fails rather than silently passing an empty scan.
- Full clone (GitLab / CircleCI)
- Shallow clone (Bitbucket)
Quality gate configuration
Set your minimum acceptable score in.aislop/config.yml. aislop exits with code 1 when the score falls below failBelow or when any error-severity diagnostic is present.
JSON output format
Bothaislop ci and aislop scan --json emit structured JSON that you can parse in scripts or forward to dashboards. The shape looks like this: