aislop
v0.3.0
Published
Stop AI slop from shipping. A unified code quality CLI that catches the lazy patterns AI coding tools leave behind.
Maintainers
Readme
aislop
Stop AI slop from shipping.
aislop is a unified code-quality CLI that catches the lazy patterns AI coding tools leave behind. One command, one score out of 100.
aislop helps teams review AI-assisted code faster by combining formatting, linting, maintainability, AI-pattern detection, architecture checks, and security checks into a single report.
See it in action
Scan

Fix

Quick start
# scan your project
npx aislop scan
# auto-fix what can be fixed safely
npx aislop fix
# CI mode (JSON output + quality gate)
npx aislop ciSample output:
aislop scan v0.2.1
✓ Project my-app (typescript)
Source files: 142
✓ Formatting: done (0 issues)
! Linting: done (2 warnings)
! Code Quality: done (1 warning)
✓ Maintainability: done (0 issues)
✓ Security: done (0 issues)
------------------------------------------------------------
Summary
Score: 89/100 (Healthy)
Issues: 0 errors, 3 warnings
Auto-fixable: 2
Files: 142
Time: 2.3s
------------------------------------------------------------Why aislop
AI-generated changes often pass review because problems are spread across many files and many categories.
aislop gives you one view and one score.
- One command, full picture: formatting + lint + maintainability + AI slop + security (+ architecture)
- Score-based quality gate: use a single 0-100 score in CI and PR checks
- AI-slop-first scoring: defaults weight AI-pattern findings more than generic style noise
- Auto-fix support: remove unused imports, apply lint suggestions, and format in one pass
- Duplication visibility: flag repeated blocks and encourage extraction into shared modules
- Software engineering best practices: enforce function/file size limits, nesting limits, dead code cleanup, and safer patterns
- Works across stacks: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, Expo/React Native
- Zero-config start: run
npx aislop scanand get useful output immediately
What it catches
Six engines run in parallel: Formatting, Linting, Code Quality, AI Slop Detection, Security, and Architecture (opt-in).
| Engine | Examples | |---|---| | Formatting | Biome, ruff, gofmt, cargo fmt, rubocop, php-cs-fixer | | Linting | oxlint, ruff, golangci-lint, clippy, expo-doctor | | Code Quality | Function/file size limits, deep nesting, duplication, dead code, unused dependencies (knip) | | AI Slop | Trivial comments, swallowed exceptions, unused imports, console leftovers, type assertion abuse, TODO stubs | | Security | Hardcoded secrets, eval, innerHTML, SQL/shell injection, dependency audits | | Architecture | Custom import bans, layering rules, required patterns |
See the full rules reference.
Installation
# Run without installing
npx aislop scan
# npm
npm install --save-dev aislop
# yarn
yarn add --dev aislop
# pnpm
pnpm add -D aislop
# Global
npm install -g aislopAlso available as @heavykenny/aislop on GitHub Packages.
Usage
Scan your project
aislop scan # scan current directory
aislop scan ./src # scan a specific directory
aislop scan --changes # only files changed from HEAD
aislop scan --staged # only staged files (pre-commit)
aislop scan --json # output JSONFix issues automatically
aislop fix # auto-fix unused imports, formatting, and lint fixes
aislop fix --force # aggressive mode: dependency audit + Expo alignmentUse in CI pipelines
aislop ci # JSON output, exits 1 if score < thresholdCommon workflow
# before commit
aislop scan --staged
# during local cleanup
aislop fix
# full project check
aislop scanOther commands
aislop init # create .aislop/config.yml
aislop doctor # check which tools are available
aislop rules # list all built-in rules
aislop # interactive menuUse in your project
Pre-commit hook
npx aislop scan --stagedGitHub Actions
- uses: actions/setup-node@v6
with:
node-version: 20
- run: npm ci
- run: npx aislop ciQuality gate
Set a minimum score in .aislop/config.yml:
ci:
failBelow: 70aislop ci exits with code 1 when the score drops below the threshold. See CI/CD docs for more.
Documentation
| Topic | Link | |---|---| | Installation | docs/installation.md | | Commands & flags | docs/commands.md | | Rules reference | docs/rules.md | | Configuration | docs/configuration.md | | Scoring | docs/scoring.md | | CI / CD | docs/ci.md | | Telemetry | docs/telemetry.md |
Contributing
See CONTRIBUTING.md for development setup and how to add new rules. AI coding assistants can find project context in AGENTS.md.
Acknowledgments
aislop is built on top of excellent open-source projects:
- Biome — formatting and linting for JS/TS
- oxlint — fast JavaScript/TypeScript linter
- knip — unused files, exports, and dependencies
- ruff — Python linting and formatting
- golangci-lint — Go linting
- expo-doctor — Expo/React Native project health
