Skip to main content

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

Metadata

Release files for aicheck 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aicheck 0.1.8
File Size Uploaded Provenance Actions
aicheck-0.1.8.tar.gz 11.1 kB Without provenance Details for aicheck-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aicheck 0.1.8
File Interpreter ABI Platform Actions
aicheck-0.1.8-py3-none-any.whl Python 3 none any Details for aicheck-0.1.8-py3-none-any.whl

Total release size: 22.4 kB

Release files / aicheck-0.1.8.tar.gz

Download URL aicheck-0.1.8.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8fc25d464a0a901c62e4fc870fa276478cf38fe1e04ceeef5e33335b0639c82b
BLAKE2b-256 checksum
How to use checksums
978b87dba0a0e461729370742759bab44d7f2365457d05ac688a49c9281aff4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / aicheck-0.1.8-py3-none-any.whl

Download URL aicheck-0.1.8-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14e5ad5fd7f1b3e15fb88f341e7b7b9d11bf2d990a869c1b5dd6a7167f65f5e7
BLAKE2b-256 checksum
How to use checksums
cee8e076de7ff3e8b39aa7df4060a71ea400a80435ce078d783c11f3fca168c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for aicheck 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page