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.4.tar.gz (11.0 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.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aicheck-0.1.4.tar.gz
  • Upload date:
  • Size: 11.0 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.4.tar.gz
Algorithm Hash digest
SHA256 6ea88d7af2106b67620a07d641a5ddb9fc88c10854105ff6d15464f97a3f2572
MD5 c8df5f8a23f82c91a1ad1c285d2772e7
BLAKE2b-256 9994e40585a590e9d0b852b0716a02190c77ad53219866b15a6f51c6d22cfd44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aicheck-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ef93cc608acd636ff915afb6eebf348cccc8a8d6ce975286bc655e431f8ba63b
MD5 94879cd3fe6c25aade1622485354c965
BLAKE2b-256 60cdfaf6c506c7458b5d6424293f50e54ae5a4630b23207eaab9bdebad32c67e

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