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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aicheck-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 f144f4608c3799cb76fc2fe9ddd5d9e73301c4fd557ced7191ca3ecdaaf95e0b
MD5 f9ec9e87bfa6c814595ebaf2adf04c44
BLAKE2b-256 64beb2a40a9690674c424726bfa1045265b27e2a4978ea9a6499a59250a5efa7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aicheck-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e0578f7b01f79b9d80dafdb700e258aa320e42f2b6e9ca972715e9e81135256f
MD5 5230a487f3c7f8f1271b5fdd5426ac32
BLAKE2b-256 7e4f8530ed3034701af931d3c004f6133fed843075ef86beee2273f75539bdc1

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