Skip to main content

Deterministic repository health metrics for Python projects.

Project description

repometrics

A deterministic CLI for measuring Python repository health.

pip install repometrics
repometrics check

Quickstart

repometrics check --path /path/to/repo
repometrics check --json

scan is kept as a backward-compatible alias for check.

CLI Reference

Primary command:

repometrics check [--path DIR] [--days N] [--json] [--verbose] [--min-score N] [--confirm-test-matches] [--no-color]

Important flags:

  • --json: machine-readable output
  • --verbose: full category metrics and warnings/errors
  • --min-score: health threshold (default 70)
  • --no-color: disable ANSI colors in terminal output
  • --confirm-test-matches: interactive confirmation for ambiguous non-test_* matches

Text modes:

  • default: compact summary + small score table
  • --verbose: full stats view
  • --json: programmatic full detail

Exit Codes

  • 0: healthy (final_score >= min_score)
  • 1: unhealthy (final_score < min_score)
  • 2: runtime/validation error

Agent-Friendly Usage

  • Stable JSON payload (schema_version, category metrics, scoring, warnings/errors)
  • Additive health fields: healthy, min_score, exit_code
  • Exit codes enable CI/agent decisions without parsing human-formatted text

Minimal JSON example:

repometrics check --json --min-score 75

Development

python3 -m pytest -q

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

repository_metrics_cli-0.2.2.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

repository_metrics_cli-0.2.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file repository_metrics_cli-0.2.2.tar.gz.

File metadata

  • Download URL: repository_metrics_cli-0.2.2.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for repository_metrics_cli-0.2.2.tar.gz
Algorithm Hash digest
SHA256 aed1598a11698ee005cf5142e09297136f1afa412596f03ad5cc349d7e822e5a
MD5 c3694111aefcbe275b86618d068415f5
BLAKE2b-256 af4e4db658befe88bfe9780ca43546cfc0ee98eca96b771bbaeea8b12ee1f5ae

See more details on using hashes here.

File details

Details for the file repository_metrics_cli-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for repository_metrics_cli-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4614d2572e972aacf5d9bf8d02cf4ae9bfa920ea6daa2678cda0ecac9481c0
MD5 053782392770a8a5ba3df38759379dda
BLAKE2b-256 5f89a0a5c6583449c734d96f684765205d4913ff893b3d23975e7796ad00c8fe

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