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)
TEST001TEST003 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_codexray-0.1.7.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_codexray-0.1.7-py3-none-any.whl (48.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_codexray-0.1.7.tar.gz
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for py_codexray-0.1.7.tar.gz
Algorithm Hash digest
SHA256 b00cd9652518b0e9595de768b36761fd147ef46d0876bdb6adcd69808531944e
MD5 459bab705b622a0bd5239e413f10290f
BLAKE2b-256 d17268170afdce5c43b8de652a71f2eb877162fe8219d29a6cbb2d682bf3c82c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_codexray-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for py_codexray-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 dd1c9e1f589868d429f82f494b399c8ae8d6215629377b1ae770b4bbdbaf0667
MD5 9d9f2711244a8b75a670155663fa2f6a
BLAKE2b-256 c5abab57266c57be214b344d78aae250fe504174e615b832c0d8984755b71aa0

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