Claude, Copilot, Cursor, ChatGPT — they all invent functions, leak API keys, and use deprecated APIs. aiverify catches it in 3 seconds. pip install aiverify-cli
15 tree-sitter-powered rules that catch what traditional linters miss. Built specifically for AI-generated code.
Catches invented function names, phantom imports, and API calls that don't exist. AI models hallucinate 15-30% of code — aiverify proves it.
Detects hardcoded API keys (sk-...), passwords, AWS secrets, database URLs, and tokens before they ship to production.
Not regex. Full Abstract Syntax Tree parsing — the same engine used by VS Code. Accurate, false-positive-free analysis.
Zero configuration. Point at any Python, JavaScript, or TypeScript file and get results instantly. Perfect for pre-commit hooks.
JSON output with --json, exit code 0/1, and GitHub Actions integration. Block AI-hallucinated code from shipping automatically.
MIT licensed. Zero cost. Zero API keys. Built by a solo founder who got tired of debugging AI-generated code in production.
Every rule uses tree-sitter AST queries — not fragile regex — for accurate, reliable detection with minimal false positives.
Tree-sitter parses your code into an AST. Rules inspect the AST for patterns unique to AI-generated code.
aiverify reads your file and builds a full Abstract Syntax Tree using tree-sitter — the same parser used by VS Code, GitHub, and modern IDEs.
15 rules run against the AST, each looking for specific patterns: invented functions, deprecated APIs, type mismatches, hardcoded credentials, and more.
Color-coded results with file paths and line numbers. JSON output for CI/CD. Exit code 1 blocks bad code from shipping.
Existing linters find style issues. aiverify finds the issues that prove your code was written by an AI.
| Feature | aiverify | pylint | flake8 | eslint | semgrep |
|---|---|---|---|---|---|
| AI hallucination rules | ✅ 15 rules | ❌ | ❌ | ❌ | ❌ |
| Invented function detection | ✅ | ❌ | ❌ | ❌ | ❌ |
| Hardcoded credentials | ✅ | ❌ | ❌ | ❌ | ✅ |
| Infinite loop detection | ✅ | ❌ | ❌ | ❌ | ❌ |
| Commented dead code | ✅ | ❌ | ❌ | ❌ | ❌ |
| Magic number detection | ✅ | ❌ | ❌ | ❌ | ❌ |
| Tree-sitter AST (not regex) | ✅ | ❌ | ❌ | ❌ | ✅ |
| Zero config, 3s scans | ✅ | ❌ | ❌ | ❌ | ❌ |
| Python + JS + TS | ✅ | 🐍 only | 🐍 only | 🌐 only | ✅ |
Everything you need to know about aiverify.
pip install aiverify-cli (PyPI package name, requires Python 3.11+). The CLI command is aiverify. Then run: aiverify your-code.py. To scan a directory: aiverify src/. For CI/CD: aiverify src/ --json. To filter specific rules: aiverify app.py --rules PY002 GEN001.--json flag for machine-readable output and returns exit code 0 (clean) or 1 (issues found). It integrates natively with GitHub Actions, GitLab CI, pre-commit hooks, and any CI/CD system. See the GitHub README for CI configuration examples.One command. No dependencies beyond Python 3.11+. Works on Linux, macOS, and Windows.
pip install aiverify-cli
Then run: aiverify your-code.py
or scan a whole project: aiverify src/
aiverify is free, open source, and maintained by one person. If it saves you from one
production incident, please consider supporting the project.
Designed for both local development and automated CI/CD pipelines.