Pre-commit verification proxy that catches hallucinated code in AI-generated output before it reaches your codebase.
| Issue | Example |
|---|---|
| Hallucinated functions | Calling str.to_camel() (doesn't exist) |
| Invalid imports | from os import quantum_sort |
| Wrong signatures | json.dumps(data, compress=True) |
| Deprecated APIs | Using removed stdlib functions |
| Nonexistent packages | pip install fast-quantum-ml |
- Python
- JavaScript
- TypeScript
pip install ai-hallucination-firewall# .pre-commit-config.yaml
repos:
- repo: https://github.com/tranhoangtu-it/ai-hallucination-firewall
hooks:
- id: ai-hallucination-check# Scan a file
ai-firewall check path/to/file.py
# Scan a directory
ai-firewall check src/A companion VS Code extension provides real-time detection as you code. See vscode-extension/ for details.
- Parser: tree-sitter (AST analysis)
- Validation: PyPI/npm registry checks
- Integration: pre-commit hooks, CLI, API server
See LICENSE for details.