Skip to main content

Instant code quality reports for your Python projects — style, complexity, and an overall health score in one command

Project description

CodeMRI

Instant code quality reports for your Python projects.

CodeMRI scans your codebase and gives you a single, easy-to-read health score — combining style violations and code complexity into one number, so you know exactly how healthy your code is and where to focus first.

Why CodeMRI?

Most linters dump a wall of warnings and leave you to figure out what matters. CodeMRI instead gives you:

  • One overall health score (0–100) with a letter grade — like an MRI scan for your code
  • A "Worst Offenders" leaderboard — the exact functions and files causing the most pain, ranked by severity
  • A clean, shareable HTML report — perfect for pasting into a PR or sharing with your team
  • Score history tracking — see whether your codebase is improving or rotting over time, right from the CLI

Installation

pip install codemri

Usage

Scan the current directory:

codemri scan .

Scan a specific file or folder:

codemri scan path/to/project

Generate a shareable HTML report:

codemri scan . --html

View your score history over time:

codemri history .

Check the installed version:

codemri --version

Example output

────────────────── Overall Code Health ──────────────────╮ │ 69/100 Grade: C │ ╰────────────────────────────────────────────────────────╯ Style score: 39/100 (9 issues across 59 lines) Complexity score: 98/100 (1 files analyzed)

How scoring works

  • Style score — based on the density of style/lint issues (via ruff) relative to lines of code
  • Complexity score — based on cyclomatic complexity rankings (via radon) across all functions
  • Overall score — a 50/50 weighted average of the two, mapped to a letter grade (A–F)

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

codemri-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

codemri-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codemri-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for codemri-0.1.0.tar.gz
Algorithm Hash digest
SHA256 34a96316a6a46ff52017097cae53a59d4601a0588789c482e33b9f81b228df94
MD5 0d823eb5638224eb5adebbbd01d9316e
BLAKE2b-256 1e2911836d0b1d4d0ca743d538f637ff49abd56e2be5800e12e32cee19e2d3b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codemri-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for codemri-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b727c459024cb585c28d580f8887cb840aeac53d0f567c5bce4bea007c7a8159
MD5 a2aba0b4686efedc8a91a00e879b4ab0
BLAKE2b-256 e693bf97e968aa13d7cd18ca60cee85033ffaa0c24b5ea1f2f8d5124b6d9cd33

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