Loading repository data…
Loading repository data…
scanaislop / repository
Catch the slop AI coding agents leave in your code: narrative comments, swallowed exceptions, as-any casts, dead code, oversized functions. 50+ rules across 8 languages (TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP). Sub-second, deterministic, no LLM at runtime. MIT-licensed.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Catch the slop AI coding agents leave in your code.
The patterns Claude Code, Cursor, Codex, and OpenCode leave behind: narrative comments above self-explanatory code, swallowed exceptions, hidden fallbacks, as any casts, hallucinated imports, duplicated helpers, dead code, todo stubs, oversized functions. Tests pass. Lint passes. The code rots anyway.
aislop catches them. 50+ rules across 8 language targets (TypeScript, JavaScript, Expo / React Native, Python, Go, Rust, Ruby, PHP). Scores every change 0–100. Sub-second. Deterministic — no LLM in the runtime path, same code in, same score out. MIT-licensed, free CLI.
npx aislop@latest scan
No install needed. Works on any project. Get your score in seconds.
Also available on npm, Yarn, Bun, Homebrew, and PyPI:
npm install -g aislop # npm
yarn dlx aislop scan # Yarn (no install)
bun add -g aislop # Bun
brew install scanaislop/tap/aislop # Homebrew
pipx install aislop # Python
See Installation for every option.
aislop agent # repair with your coding agent (Codex/Claude/OpenCode)
aislop fix # auto-fix the mechanical issues
aislop fix -f # aggressive fixes (deps, unused files)
aislop ci # CI mode (JSON + gate)
aislop hook install --claude # per-edit hook
Public badge: Show your score on your README
[](https://scanaislop.com)
Run npx aislop@latest badge to auto-generate. Free at scanaislop.com.
The same CLI is published to npm, Homebrew, and PyPI. Pick whichever fits your stack.
Node / npm
# Run without installing
npx aislop@latest scan
# npm
npm install --save-dev aislop
# yarn
yarn add --dev aislop
# pnpm
pnpm add -D aislop
# bun
bun add -d aislop
# Global
npm install -g aislop
Also available as @scanaislop/aislop on GitHub Packages.
Homebrew (macOS / Linux)
brew install scanaislop/tap/aislop
Homebrew installs Node.js as a dependency if it isn't already present. Details: homebrew-tap.
Python / pipx
pipx install aislop
pipx keeps aislop in its own isolated environment. Needs Node.js on PATH. Details: PyPI package.
Full reference for every channel, bundled tooling, and external tools: docs/installation.md.
Examples below use the installed aislop binary. For a one-off latest run, prefix the command with npx aislop@latest, for example npx aislop@latest scan.
aislop --help # clean overview
aislop commands # every public command and major flag
aislop <command> --help # detailed help for one command
aislop version # installed version
aislop -V # installed version
aislop update # current and latest npm versions
aislop scan # current directory
aislop scan ./src # specific directory
aislop scan --changes # changed files from HEAD
aislop scan --changes --base origin/main # changed vs a base branch (PRs)
aislop scan --staged # staged files only
aislop scan -d # verbose file/rule detail
aislop scan --json # JSON output
aislop scan --sarif # SARIF 2.1.0 output (GitHub code scanning)
aislop scan --format json # alternate JSON form
aislop scan --include "src/**" # only matching paths
aislop scan --exclude "dist,gen" # skip extra paths
Exclude files: node_modules, .git, dist, build, coverage excluded by default. Add more in .aislop/config.yml:
exclude:
- "**/*.test.ts"
- src/generated
Or via CLI: aislop scan --exclude "**/*.test.ts,dist"
Unsupported languages: aislop only analyses the 8 language targets above. If a repo is mostly something else (C, C++, C#, Swift, Kotlin, …), scoring a handful of incidental files would misrepresent it, so aislop withholds the score and says so rather than printing a number off code it never read. --json returns score: null, scoreable: false, and a coverage breakdown.
Per-rule severity: Override the severity of any rule by id, or turn it off:
# .aislop/config.yml
rules:
ai-slop/narrative-comment: warning # error | warning | off
ai-slop/trivial-comment: "off" # drop this rule entirely
security/hardcoded-secret: error
off drops matching diagnostics; error/warning rewrites severity before scoring and reporting. Absent map keeps default behavior.
Suppress findings inline: Silence a specific line when you know better, with an optional reason after --:
// aislop-ignore-next-line ai-slop/hidden-fallback -- options is validated upstream
const opts = { ...defaults, ...(input || {}) };
const legacy = doThing(); // aislop-ignore-line
aislop-ignore-next-line covers the line below, aislop-ignore-line the line it sits on, and aislop-ignore-file (place anywhere in the file) the whole file. Name one or more rules to scope the suppression, or omit them to silence every rule on that line. The directive works in any comment syntax (//, #, <!-- -->). Suppressed findings are removed before scoring, and the run reports how many were silenced.
Ignore whole paths: Add an .aislopignore at the project root (same glob semantics as exclude, # comments allowed):
src/generated
**/*.snap
legacy
Extend config: Project config can extend a parent:
# .aislop/config.yml
extends: ../../.aislop/base.yml
ci:
failBelow: 80 # override specific keys
Editor validation: Point your editor at the JSON Schema in schema/aislop.config.schema.json for autocomplete and validation of .aislop/config.yml. Regenerate it from the source config schema with pnpm gen:schema.
The deterministic layer beneath aislop agent: auto-fix what's purely mechanical (formatters, unused imports, dead code). For anything that needs judgement, reach for aislop agent or hand off to your coding agent with full diagnostic info.
aislop fix # auto-fixes
aislop fix -d # detailed fix progress
aislop fix --safe # only reversible fixes (imports, comment removal, safe formatters)
aislop fix -f # aggressive: deps, unused files
aislop fix -p # print an agent handoff prompt
--safe restricts the run to fixes that cannot change behaviour — unused-import removal, import merging, narrative-comment removal, and formatter runs that do not execute project-controlled configuration. Anything that deletes code, rewrites behaviour/attributes, or can load executable formatter configuration (console/dead-code removal, lint autofixes, Ruby/PHP formatter config, unused-declaration and dependency pruning) is skipped, so a --safe run is genuinely "apply and commit".
aislop agent keeps the deterministic scanner in charge while using the coding agent you already have installed. It creates a local git worktree, runs safe fixes, streams a headless Codex / Claude Code / OpenCode repair session, verifies the result with aislop scan --json, writes a local session transcript, and leaves the diff for review.
aislop agent providers # see installed providers and setup hints
aislop agent connect codex # run the provider's own local login flow
aislop agent use codex # save a repo-local default provider
aislop agent use auto # clear the default and auto-detect
aislop agent plan # preview provider, worktree, findings, PR/apply behavior
aislop agent monitor # stream scans when local git changes settle
aislop agent monitor --background
aislop agent monitor list # list background monitors
aislop agent monitor stop # stop the latest background monitor
aislop agent monitor --repair --in-place
aislop agent # auto-pick an installed provider
aislop agent --provider codex # switch provider
aislop agent --background # run locally in the background
aislop agent --apply # apply verified diff back to this repo
aislop agent --pr # commit, push, and open a draft PR
aislop agent sessions # list recent local repair sessions
aislop agent show # show the latest session timeline and summary
aislop agent apply # apply a reviewed worktree session later
aislop agent watch # stream the latest session transcript
aislop agent stop # stop the latest running background session
No OpenAI or Anthropic API key is requested by aislop; provider CLIs use their own existing local auth. A saved provider default lives in .aislop/agent/provider.json and is kept out of commits through the repo's local Git exclude. Session transcripts live under .aislop/agent/sessions/, and agent sessions/worktrees are also excluded locally. Provider JSONL is normalized in the terminal stream while raw lines stay in the transcript.
When auto-fix can't solve it, pass the remaining issues to your coding agent with full context:
aislop fix --claude # Claude Code
aislop fix --codex # Codex CLI
aislop fix --cursor # Cursor (copies to clipboard)
aislop fix --gemini # Gemini CLI
aislop fix --prompt # print prompt (agent-agnostic)
Other fix handoff flags: --windsurf, --vscode, --amp, --antigravity, --deep-agents, --kimi, --opencode, --warp, --aider, --goose, --pi, --crush.
Runs after every agent edit. Feedback flows back immediately.
aislop hook install --claude # Claude Code
aislop hook install --cursor # Cursor
aislop hook install --gemini # Gemini CLI
aislop hook install --pi # pi
aislop hook install # pick agents interactively
aislop hook install claude cursor # specific agents
aislop hook install --agent claude,pi # comma-separated agents
aislop install claude cursor # alias for hook install
aislop install hooks --claude # natural alias for hook install
Runtime adapters (scan + feedback): claude, cursor, gemini, pi.
Rules-only (agent reads rules): codex, windsurf, cline, kilocode, antigravity, copilot.
Hook install flags: --agent <names>, -g, --global, --project, --dry-run, --yes, --quality-gate, plus per-agent shortcuts --claude, --cursor, --gemini, --pi, --codex, --windsurf, `--cline