Skip to main content

Deterministic repository health metrics for Python projects.

Project description

repometrics

PyPI Python CI License

A deterministic CLI for measuring Python repository health.

pip install repository-metrics-cli
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.3.tar.gz (18.3 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.3-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repository_metrics_cli-0.2.3.tar.gz
  • Upload date:
  • Size: 18.3 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.3.tar.gz
Algorithm Hash digest
SHA256 bb73760914ce6a086eb7fc81a98b7047e43b1c4dd22a53084e8363632ad5876c
MD5 f75e4a820bfa86ef3da6620cd160366b
BLAKE2b-256 d5f6375424c867d30a25f6074d86e0c1bc3d0384b0f8f6576abd2822fd79d1fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for repository_metrics_cli-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c4803787c6f1e231c22c58d76763d8393ffe100089f65b038feb9490c8eb2e2a
MD5 2d503f02b80bbf566d47eda3809b7a89
BLAKE2b-256 1b6ccb9b6964f6ed3c8c304547467a6e69620c6aa898c39b43f19a097d8ab28c

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