Skip to main content

Catch AI-generated code issues before they catch you

Project description

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aicheck-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 d82113d2d34229745cbd8ff5625e174c36f17ddb2989d2f3a7f91d9e05421042
MD5 ac99d2affc05fe9c49ef11fc070b774e
BLAKE2b-256 cbbf0b7300e2a7a61e2c7d8b62e9a0d50bf23555b2766ac9efa5d5bbff87897f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aicheck-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e50ffd731c0ea89dae931386e1bace68638735a25b4d1f5594ef9bca1d81da9
MD5 2b877fa323dbe2010e4c7a295fb4496d
BLAKE2b-256 2bc1dcc9c569ccce9ecfbc92a884141a1d76fbea1a506d045f331afc0448aac2

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