Skip to main content

Install aislop with Python tooling and scan your code for AI slop

Project description

aislop for Python

Catch the slop AI coding agents leave in your code.

PyPI version npm downloads PyPI downloads Homebrew tap GitHub stars CI aislop score License: MIT Python 3.9+

The patterns Claude Code, Cursor, Codex, and OpenCode leave behind: narrative comments above self-explanatory code, swallowed exceptions, 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.

This package is the Python-tooling distribution of aislop. The CLI is identical across every channel. Prefer npm or Homebrew? See other ways to install.

Install

Use pipx for a global, isolated, Python-managed CLI install:

pipx install aislop

Then scan any project:

aislop scan

pipx keeps aislop in its own virtual environment, so it never collides with your project dependencies. Plain pip install --user aislop also works if you prefer.

First run

From the root of a repo:

aislop scan

You get a single 0–100 score and a list of findings. Common next steps:

aislop fix                   # auto-fix safe issues
aislop fix -f                # aggressive fixes (deps, unused files)
aislop ci                    # CI-friendly JSON output and exit code
aislop hook install --claude # install a per-edit agent hook
aislop rules                 # see every rule
aislop doctor                # check local tool availability

What gets installed

This package exposes two commands:

Requirements

  • Python 3.9+
  • pipx (or pip)
  • Node.js available on PATHaislop runs Node-based engines under the hood

On macOS:

brew install pipx node
pipx ensurepath

On Debian/Ubuntu:

sudo apt install pipx
pipx ensurepath
# install Node.js from https://nodejs.org or your distro's nodesource setup

Run aislop doctor to confirm every engine can run on your machine.

Hand off to your agent

When auto-fix can't solve an issue, pass the remaining findings 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 an agent-agnostic prompt

Install a hook so feedback flows back after every edit:

aislop hook install --claude # Claude Code
aislop hook install          # pick agents interactively

MCP server

Expose aislop as MCP tools (aislop_scan, aislop_fix, aislop_why, aislop_baseline) for Claude Desktop, Cursor, or Codex:

{
  "mcpServers": {
    "aislop": {
      "command": "aislop-mcp"
    }
  }
}

CI

aislop scan --staged              # staged files before commit
aislop ci                         # JSON output, exits 1 if score < threshold
aislop scan --sarif > aislop.sarif # SARIF 2.1.0 for GitHub code scanning

Set a minimum score in .aislop/config.yml:

ci:
  failBelow: 70

More: CI/CD docs.

Configure

Tune rules, severities, and excluded paths in .aislop/config.yml:

exclude:
  - "**/*_test.py"
  - src/generated
rules:
  ai-slop/narrative-comment: warning   # error | warning | off

Run aislop init to scaffold one. Full reference: configuration docs.

Upgrade

Upgrade the Python package:

pipx upgrade aislop

Check whether a newer release is available:

aislop upgrade

Examples

aislop scan --changes         # only changed files from HEAD
aislop scan --staged          # staged files before commit
aislop scan --sarif > aislop.sarif  # SARIF for GitHub code scanning
aislop badge                  # generate a public score badge

Troubleshooting

aislop: command not found after install — run pipx ensurepath and reopen your shell so the pipx bin directory is on PATH.

Node.js not foundaislop needs Node on PATH. Install it (brew install node, or from nodejs.org) and re-run aislop doctor.

Command already exists — if another install (npm or Homebrew) already owns aislop, pick one source. To replace it with the pipx copy: pipx install --force aislop.

Other ways to install

The same CLI is also available on npm, Yarn, Bun, and Homebrew:

pipx install aislop                  # Python (this package)
npm install -g aislop                # npm
yarn dlx aislop scan                 # Yarn (no install)
bun add -g aislop                    # Bun
brew install scanaislop/tap/aislop   # Homebrew

See the Homebrew tap and the main project README for the npm-family options.

For teams

scanaislop is the hosted platform for teams: PR gates with score thresholds, an org → team → project standards hierarchy, dashboards, and agent attribution. Same engines, same scores. The CLI is MIT-licensed and free.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aislop-0.12.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aislop-0.12.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file aislop-0.12.1.tar.gz.

File metadata

  • Download URL: aislop-0.12.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aislop-0.12.1.tar.gz
Algorithm Hash digest
SHA256 59c3ac9f03ffd0e2da70fd5f0b4d3737ab2eb904184f771bb73b401c5b1cdf90
MD5 49dc9c6b27c95aeffed8b80579138e10
BLAKE2b-256 f96d80d9d4d6179f7c99d552f522ff40cc6c85fdb7b91442893b320296a741a7

See more details on using hashes here.

File details

Details for the file aislop-0.12.1-py3-none-any.whl.

File metadata

  • Download URL: aislop-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aislop-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62158c015da00cc5a1061958e3cabb9eed770a19720dbd6fdcec8688af5f2fe4
MD5 520a0c46686d0d8d0865b57aff6eb6ae
BLAKE2b-256 06b2c50cb2ec5655662a4214fafb9c8daeb7a1207b73dec8b3fe055b62323cd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page