Metadata-Version: 2.3
Name: py-codexray
Version: 0.1.0
Summary: The ultimate Python code health analyzer - unified static analysis, architecture insights, and engineering recommendations.
Project-URL: Homepage, https://github.com/santhoshse7en/codexray
Project-URL: Documentation, https://github.com/santhoshse7en/codexray#readme
Project-URL: Repository, https://github.com/santhoshse7en/codexray
Project-URL: Issues, https://github.com/santhoshse7en/codexray/issues
Author-email: M SANTHOSH KUMAR <santhoshse7en@gmail.com>
License: MIT License
        
        Copyright (c) 2026 M SANTHOSH KUMAR <santhoshse7en@gmail.com>
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Keywords: architecture,ci,code-quality,lint,python,sarif,security,static-analysis
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: bandit>=1.7
Requires-Dist: pydantic>=2.6
Requires-Dist: radon>=6.0
Requires-Dist: rich>=13.7
Requires-Dist: tomli>=2.0; python_version < '3.11'
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: full
Requires-Dist: basedpyright>=1.10; extra == 'full'
Requires-Dist: deptry>=0.16; extra == 'full'
Requires-Dist: interrogate>=1.5; extra == 'full'
Requires-Dist: pip-audit>=2.7; extra == 'full'
Requires-Dist: ruff>=0.6; extra == 'full'
Requires-Dist: vulture>=2.11; extra == 'full'
Description-Content-Type: text/markdown

# 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.

```bash
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

```bash
pip install py-codexray

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

Requires **Python 3.10+**.

## CLI

```bash
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 | Default CI |
| `deep` | + type checkers | Release audits |

### Exit codes

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

## Configuration

`pyproject.toml`:

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

Or `codexray.toml`:

```toml
[codexray]
profile = "fast"
fail_under = 80
```

## Reports

```bash
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/architecture.md), [docs/ecosystem-analysis.md](docs/ecosystem-analysis.md), and [docs/feature-matrix.md](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`

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

    def is_available(self) -> bool:
        return True

    def analyze(self, ctx):
        return []  # list[Finding]
```

```toml
[project.entry-points."codexray.analyzers"]
mine = "mypkg:MyAnalyzer"
```

## Development

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

## License

MIT — © 2026 [M SANTHOSH KUMAR](https://github.com/santhoshse7en)

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