Skip to main content

CodexRay

The ultimate Python code health analyzer.

One command to understand the complete health of a Python repository — quality, security, types, architecture, complexity, dependencies, tests, and documentation — with prioritization that feels like a staff engineer review.

pip install py-codexray
codexray analyze .

Why CodexRay?

The Python ecosystem already has excellent specialized tools (Ruff, Bandit, Radon, Vulture, pip-audit, BasedPyright). Developers still have to run them separately, reconcile duplicate noise, and decide what matters.

CodexRay is the unified intelligence layer:

  • Orchestrates best-in-class analyzers
  • Adds native architecture, duplicate, and documentation analysis
  • Deduplicates and clusters findings
  • Computes a transparent repository health score
  • Estimates cleanup effort and recommends what to fix first
  • Emits terminal, Markdown, HTML, JSON, and SARIF reports

"Run CodexRay before you merge."

Install

pip install py-codexray

# Recommended full toolchain
pip install 'py-codexray[full]'

Requires Python 3.10+ to run CodexRay. You can still analyze projects on Python 3.6–3.14.

# Legacy company codebase on 3.6
codexray analyze . --python-version 3.6

# Untyped apps: keep type noise low (default)
codexray analyze . --type-mode basic

# Stricter typing audit
codexray analyze . --type-mode strict

Or in config:

[tool.codexray]
python_version = "3.6"

CodexRay also auto-detects from .python-version, runtime.txt, requires-python, and Ruff's target-version.

CLI

codexray analyze .                 # full health analysis
codexray report . -f html -o out.html
codexray fix .                     # safe autofixes via Ruff
codexray doctor .                  # environment & analyzer diagnosis
codexray graph .                   # import graph + cycles
codexray diff . --save             # save / compare baseline
codexray watch . --profile fast    # re-analyze on changes

Profiles

Profile Engines Use
fast Native + Ruff + complexity Pre-commit
standard + Bandit + Vulture + pip-audit + docs/tests + types (if installed) Default CI
deep Same, forces type-checker emphasis / release audits Release audits

Exit codes

analyze exits 1 when the score is below --fail-under (default 70, configurable).

Missing tests

CodexRay reports:

Rule Meaning
TEST004 No test file for a source module
TEST005 Public function/class/method never referenced in tests
TEST006 File has 0% coverage (when coverage.xml exists)
TEST001–TEST003 Suite ratio / overall coverage health

Configuration

pyproject.toml:

[tool.codexray]
profile = "standard"
fail_under = 70
exclude = [".venv", "dist", "build"]
complexity_threshold = 10
ignore_rules = ["DOC001"]

Or codexray.toml:

[codexray]
profile = "fast"
fail_under = 80

Reports

codexray analyze . -f json -o report.json
codexray analyze . -f sarif -o results.sarif
codexray report . -f md -o HEALTH.md
codexray report . -f html -o health.html

Architecture (short)

See docs/architecture.md, docs/ecosystem-analysis.md, and docs/feature-matrix.md.

discover → parallel analyzers → normalize → intelligence → report / fix

Integrate, don't reinvent: Ruff, Bandit, Radon, Vulture, pip-audit, BasedPyright.

Native where tools fall short: import graphs, cycles, duplicates, health scoring, clustering.

Plugin API

Entry point group: codexray.analyzers

class MyAnalyzer:
    name = "mine"
    profiles = {"standard", "deep"}

    def is_available(self) -> bool:
        return True

    def analyze(self, ctx):
        return []  # list[Finding]
[project.entry-points."codexray.analyzers"]
mine = "mypkg:MyAnalyzer"

Development

python -m pip install -e '.[dev,full]'
pytest
codexray analyze src

License

MIT — © 2026 M SANTHOSH KUMAR

Repository: https://github.com/santhoshse7en/codexray

Metadata

Release files for py-codexray 0.1.7

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

Source distribution (sdist)

Source distribution for py-codexray 0.1.7
File Size Uploaded Provenance
py_codexray-0.1.7.tar.gz 41.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for py-codexray 0.1.7
File Interpreter ABI Platform
py_codexray-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 90.4 kB

Release files / py_codexray-0.1.7.tar.gz

Download URL py_codexray-0.1.7.tar.gz
Size 41.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b00cd9652518b0e9595de768b36761fd147ef46d0876bdb6adcd69808531944e
BLAKE2b-256 checksum
How to use checksums
d17268170afdce5c43b8de652a71f2eb877162fe8219d29a6cbb2d682bf3c82c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / py_codexray-0.1.7-py3-none-any.whl

Download URL py_codexray-0.1.7-py3-none-any.whl
Size 48.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd1c9e1f589868d429f82f494b399c8ae8d6215629377b1ae770b4bbdbaf0667
BLAKE2b-256 checksum
How to use checksums
c5abab57266c57be214b344d78aae250fe504174e615b832c0d8984755b71aa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for py-codexray 0.1.7

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.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files No provenance

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