Metadata-Version: 2.4
Name: kryptorious-metaguard
Version: 1.0.0
Summary: Repo metadata hygiene scanner — catch version drift, stale changelogs, missing PEP 621 fields, broken README links, and leaked secret files before they ship.
Author: Kryptorious Quantum Biosciences, Inc.
License: MIT
Project-URL: Homepage, https://kryptorious.gumroad.com/l/jbvet
Keywords: metadata,ci,lint,version,changelog,secrets,hygiene
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: rich>=13.0
Requires-Dist: tomli>=2.0; python_version < "3.11"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# MetaGuard

**Repo metadata hygiene scanner** for Python packages. Catches the boring,
shippable-but-broken mistakes that slip past `pytest` and `build`:

- **Version drift** — `pyproject.toml` version vs `src/<pkg>/__init__.__version__`
  vs the latest **git tag**. Mismatches are flagged as errors.
- **Stale CHANGELOG** — top entry doesn't match the declared version.
- **Missing PEP 621 fields** — `description`, `authors`, `license`, `requires-python`, `readme`…
- **License declared, file missing** — `[project].license` but no `LICENSE` at root.
- **Committed secret files** — `.env`, `*.pem`, `*.key`, `credentials*`, `.pypirc`, `*.tfstate`…
  (respects `.gitignore` so intentional secrets don't false-positive).
- **Dead README links** — optional network probe (`--check-links`).

## Install

```bash
pip install kryptorious-metaguard
```

## Usage

```bash
# Scan current dir
metaguard check

# Scan a path, emit JSON for CI
metaguard check ./my-package --json

# Also probe README URLs
metaguard check . --check-links
```

Exit code is **1 if any error-severity issue is found** (CI gate), **0 otherwise**.

## Example output

```
Metadata Health: 75/100
  Checks run: 6
  Errors: 1   Warnings: 1

ERROR  VERSION_DRIFT   pyproject='1.2.3' but init:demo='9.9.9'
                     /repo
WARN   NO_CHANGELOG   No CHANGELOG file found
```

## CI integration

```yaml
- name: Metadata hygiene
  run: metaguard check . --check-links
```

Part of the [Kryptorious](https://kryptorious.gumroad.com/l/jbvet) developer
toolkit. Built for the 32-package fleet and shipped so you can use it too.
