Skip to main content

Catch AI-generated code issues before they catch you

Project description

ai-check Banner

aicheck

Catch AI-generated code issues before they catch you.

aicheck is a static analysis toolkit that detects common failure patterns in AI-generated Python code:

  • Hallucinated imports — modules LLMs frequently invent (e.g. utils, helpers, misc)
  • Dead code — unused variables, unreachable branches, code after return/raise
  • Suspicious API usage — wrong method names for stdlib modules, open().read() patterns
  • Confidence scoring — each file gets a 0–100 score based on findings severity

Installation

pip install aicheck

Quick Start

# Check a single file
aicheck check my_file.py

# Check an entire project
aicheck check src/

# JSON output for CI integration
aicheck check src/ --format json

Sample Output

[FAIL] src/suspicious.py  (score: 62.0)
    high  L1:0  [hallucinated_import] Potentially hallucinated module: 'utils'
           ↳ Verify 'utils' exists; check PyPI or project dependencies
  medium  L14:4  [unreachable_code] Unreachable branch: condition is always False
     low  L11:4  [dead_code] Possibly unused variable: 'unused_var'

Files: 1  Passed: 0  Failed: 1
Average confidence score: 62.0/100

CLI Reference

Command Description
aicheck check <path> Analyze a file or directory
aicheck check <path> --format json Output as JSON
aicheck version Show version

Score Interpretation

Score Meaning
100–90 Clean
89–70 Minor issues
69–50 Moderate issues — review recommended
<50 Critical — do not commit without review

Development

git clone https://github.com/maheshmakvana/ai-check.git
cd ai-check
python -m venv venv && source venv/bin/activate
pip install -e ".[test]"
pytest tests/ -v
ruff check src/
mypy src/

License

MIT

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

aicheck-0.1.8.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

aicheck-0.1.8-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file aicheck-0.1.8.tar.gz.

File metadata

  • Download URL: aicheck-0.1.8.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for aicheck-0.1.8.tar.gz
Algorithm Hash digest
SHA256 8fc25d464a0a901c62e4fc870fa276478cf38fe1e04ceeef5e33335b0639c82b
MD5 abe9e862ac37632010b3d00ac7901919
BLAKE2b-256 978b87dba0a0e461729370742759bab44d7f2365457d05ac688a49c9281aff4f

See more details on using hashes here.

File details

Details for the file aicheck-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: aicheck-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for aicheck-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 14e5ad5fd7f1b3e15fb88f341e7b7b9d11bf2d990a869c1b5dd6a7167f65f5e7
MD5 c7a164e2be6f2e2a5484421bc184ae62
BLAKE2b-256 cee8e076de7ff3e8b39aa7df4060a71ea400a80435ce078d783c11f3fca168c4

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