Metadata-Version: 2.4
Name: repository-metrics-cli
Version: 0.2.3
Summary: Deterministic repository health metrics for Python projects.
Author: repometrics contributors
License: MIT License
        
        Copyright (c) 2026 Thomas Yeoh
        
        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.
        
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: networkx>=3.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# repometrics

[![PyPI](https://img.shields.io/pypi/v/repository-metrics-cli?logo=pypi)](https://pypi.org/project/repository-metrics-cli/)
[![Python](https://img.shields.io/badge/python-3.10%2B-3776AB?logo=python)](https://www.python.org/)
[![CI](https://img.shields.io/github/actions/workflow/status/tyeoh9/repometrics/ci.yml?branch=main&logo=githubactions)](https://github.com/tyeoh9/repometrics/actions/workflows/ci.yml)
[![License](https://img.shields.io/github/license/tyeoh9/repometrics)](LICENSE)

A deterministic CLI for measuring Python repository health.

```bash
pip install repository-metrics-cli
repometrics check
```

## Quickstart

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

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

## CLI Reference

Primary command:

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

```bash
repometrics check --json --min-score 75
```

## Development

```bash
python3 -m pytest -q
```

## License

MIT
