Linux command
aislop 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
aislop scan
Example
aislop scan --changes --json
Example
aislop fix
Example
aislop hook install --claude
Example
aislop ci
Example
aislop scan --staged
Example
aislop ci --fail-below 80
Example
aislop fix --prompt
说明
aislop is a fast, deterministic CLI that detects the characteristic patterns left behind by AI coding agents (Claude Code, Cursor, Codex, etc.). It scores code on a 0–100 scale and can automatically fix many mechanical issues. Instead of relying on LLMs at runtime, aislop uses a combination of formatters, linters, AST analysis, and a large set of hand-written rules targeting narrative comments, trivial comments, `as any` casts, hallucinated imports, swallowed exceptions, dead code, oversized functions, and other "slop" patterns that compile and pass tests but degrade long-term maintainability. The tool supports TypeScript/JavaScript, Python, Go, Rust, Ruby, PHP, and Java. It is designed to run in editors, pre-commit hooks, CI pipelines, and as a quality gate before accepting agent-generated changes.
参数
- scan
- Analyze code and report issues (default command when no subcommand given)
- fix
- Automatically fix issues that can be fixed mechanically
- ci
- Run in CI mode (JSON output, exits non-zero below threshold)
- hook
- Manage per-edit hooks for Claude, Cursor, and other agents
- rules
- List all active rules
- init
- Create a .aislop/config.yml file
- --json
- Output machine-readable JSON
- --sarif
- Output SARIF 2.1.0 for GitHub Code Scanning
- -f, --force (with fix)
- Apply aggressive fixes (unused dependencies, files, etc.)
FAQ
What is the aislop command used for?
aislop is a fast, deterministic CLI that detects the characteristic patterns left behind by AI coding agents (Claude Code, Cursor, Codex, etc.). It scores code on a 0–100 scale and can automatically fix many mechanical issues. Instead of relying on LLMs at runtime, aislop uses a combination of formatters, linters, AST analysis, and a large set of hand-written rules targeting narrative comments, trivial comments, `as any` casts, hallucinated imports, swallowed exceptions, dead code, oversized functions, and other "slop" patterns that compile and pass tests but degrade long-term maintainability. The tool supports TypeScript/JavaScript, Python, Go, Rust, Ruby, PHP, and Java. It is designed to run in editors, pre-commit hooks, CI pipelines, and as a quality gate before accepting agent-generated changes.
How do I run a basic aislop example?
Run `aislop scan` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does scan do in aislop?
Analyze code and report issues (default command when no subcommand given)