CLI tool that scans a Git repository and produces a health score (0-100) based on 20+ signals
Project description
CLI tool that scans a Git repository and produces a health score (0-100) based on 20+ signals.
No single CLI tool gives a holistic repo health score with actionable recommendations. repo-health fills that gap — run it locally, in CI, or as a GitHub Action.
Install
pip install repo-health
Usage
# Scan current directory
repo-health
# Scan specific path
repo-health scan /path/to/repo
# JSON output for CI
repo-health scan --format json --output report.json
# Markdown report
repo-health scan --format markdown --output HEALTH.md
# Generate badge SVG
repo-health badge --output health-badge.svg
# Fail CI if below threshold
repo-health scan --min-score 70
# CI mode (JSON output, non-zero exit on failure)
repo-health scan --ci --min-score 60
Output Example
╭─────────────────────────────────────────────╮
│ 🏥 Repository Health Report │
│ my-project · Score: 78/100 B+ │
╰─────────────────────────────────────────────╯
┌────────────┬───────┬────────────────────────────────┐
│ Category │ Score │ Details │
├────────────┼───────┼────────────────────────────────┤
│ CI/CD │ 90 │ ✅ CI config, ✅ tests in CI │
│ Testing │ 70 │ ✅ Tests exist, ⚠️ No coverage │
│ Docs │ 85 │ ✅ README, ✅ LICENSE, ❌ CHANGELOG│
│ Security │ 60 │ ✅ .gitignore, ❌ SECURITY.md │
│ Deps │ 75 │ ✅ Lock file, ⚠️ 3 outdated │
│ Community │ 80 │ ✅ Issue template, ❌ COC │
│ Release │ 70 │ ✅ Tags, ❌ No release notes │
│ Git │ 90 │ ✅ Clean history │
└────────────┴───────┴────────────────────────────────┘
💡 Top Recommendations:
1. Add CHANGELOG.md to track version history
2. Create SECURITY.md with vulnerability reporting process
3. Add coverage reporting to CI pipeline
Health Signals (20+)
| Category | Signals |
|---|---|
| CI/CD | CI config exists, tests run in CI, build step, deploy step |
| Testing | Test files exist, coverage config, coverage threshold |
| Documentation | README quality (sections, badges), CONTRIBUTING, CHANGELOG, LICENSE |
| Security | .gitignore completeness, no secrets in repo, SECURITY.md, dependency audit |
| Dependencies | Manifest exists, lock file, version pinning, audit tool |
| Community | Issue templates, PR templates, CODE_OF_CONDUCT, CONTRIBUTING |
| Release | Tagged releases, semantic versioning, release notes |
| Git Hygiene | Git repo, commit message quality, default branch |
Configuration
Create .repo-health.toml in your repo root:
[weights]
ci = 15
testing = 20
documentation = 10
security = 15
dependencies = 10
community = 10
release = 10
git_hygiene = 10
[thresholds]
min_score = 70
[ignore]
scanners = []
files = ["vendor/"]
Or add to pyproject.toml:
[tool.repo-health.weights]
testing = 20
[tool.repo-health.thresholds]
min_score = 70
GitHub Action
- uses: repo-health/repo-health@v1
with:
min-score: 60
format: json
Contributing
- Fork the repository
- Create a feature branch
- Run tests:
pytest --cov - Submit a pull request
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo_health-1.0.0.tar.gz.
File metadata
- Download URL: repo_health-1.0.0.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22e3b7317f67e1037ba78284a115706733a0506b8943f1818bf544d3ed8f0d78
|
|
| MD5 |
d40813df34d3ead7fa2da094104ed275
|
|
| BLAKE2b-256 |
774f9779b46fd0fdbafef5b9a3906ed5cc1440f8f0d66297581b2a76c8c42e4c
|
Provenance
The following attestation bundles were made for repo_health-1.0.0.tar.gz:
Publisher:
release.yml on bhayanak/repo-health
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repo_health-1.0.0.tar.gz -
Subject digest:
22e3b7317f67e1037ba78284a115706733a0506b8943f1818bf544d3ed8f0d78 - Sigstore transparency entry: 1412440848
- Sigstore integration time:
-
Permalink:
bhayanak/repo-health@c26621d1cf5d89e480c1d68af7f2ad425e40d48e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bhayanak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c26621d1cf5d89e480c1d68af7f2ad425e40d48e -
Trigger Event:
push
-
Statement type:
File details
Details for the file repo_health-1.0.0-py3-none-any.whl.
File metadata
- Download URL: repo_health-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bf28acd6040bc3b3839d545a02d153333b872c7a74ab4f6cd9acc03a97af0ab
|
|
| MD5 |
07e6a75506b5ecaa66e73b15074b305a
|
|
| BLAKE2b-256 |
f463e3eadae86b7efe8be697d5b8b14329011dfa98725787612059a4f6ad7717
|
Provenance
The following attestation bundles were made for repo_health-1.0.0-py3-none-any.whl:
Publisher:
release.yml on bhayanak/repo-health
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repo_health-1.0.0-py3-none-any.whl -
Subject digest:
5bf28acd6040bc3b3839d545a02d153333b872c7a74ab4f6cd9acc03a97af0ab - Sigstore transparency entry: 1412440957
- Sigstore integration time:
-
Permalink:
bhayanak/repo-health@c26621d1cf5d89e480c1d68af7f2ad425e40d48e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bhayanak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c26621d1cf5d89e480c1d68af7f2ad425e40d48e -
Trigger Event:
push
-
Statement type: