Skip to main content

Safely keep managed README facts current for fast-moving AI-assisted projects.

Project description

readme-guardian

Version License

Keep the facts in a fast-moving project's README current without letting an AI agent rewrite its story. readme-guardian detects a supported project's routes, modules, components, version, and optional test/lint result; it updates only explicitly managed README sections and a local status badge.

It is built for AI-assisted development, where code changes quickly and README drift is easy to miss.

Metric Value
Language python
Version 1.1.0
Tests not configured
Lint
Docker no
Monorepo no

Start here

Run from the root of a Node, Python, Go, or Rust repository:

# Inspect only: no README changes and no project commands are run.
readme-guardian --status

# One-time setup: append managed sections without replacing your existing README.
readme-guardian --init

# Preview the exact README.md and badge changes.
readme-guardian

# Update managed sections after reviewing the preview.
readme-guardian --apply

# Verify in CI or before a PR.
readme-guardian --check

Use --run-checks only when you trust the project and want the README to record a fresh test and lint result:

readme-guardian --apply --run-checks
readme-guardian --check --run-checks

--run-checks may execute the repository's own npm test, pytest, go test, cargo test, or lint command. A normal status, preview, apply, or check never runs those commands.

Install

GitHub release wheel

The published release assets are the canonical way to install 1.1.0 until the package registries carry the same version:

pipx install "https://github.com/jeevesh2515/readme-guardian/releases/download/v1.1.0/readme_guardian-1.1.0-py3-none-any.whl"
readme-guardian --version

Install pipx first if it is not available. Each GitHub release publishes SHA-256 digests alongside its assets.

npm / npx

The npm tarball includes the matching Python wheel, so it does not silently download a second package from PyPI. It runs that wheel with pipx in an isolated environment.

npm install -g "https://github.com/jeevesh2515/readme-guardian/releases/download/v1.1.0/readme-guardian-1.1.0.tgz"
readme-guardian --status

The public npm and PyPI registries currently serve 1.0.0; publish credentials are required to release 1.1.0 there. Do not treat a registry version as this release until its version is 1.1.0.

What it manages

readme-guardian --init adds a ## Project facts area with marker-delimited sections such as:

<!-- readme-guardian:stats -->
| Metric | Value |
|--------|-------|
| Language | python |
| Version | 1.1.0 |
| Tests | not configured |
| Lint | — |
| Docker | no |
| Monorepo | no |

<!-- /readme-guardian -->

Later runs replace only content between those markers. Your introduction, architecture notes, screenshots, examples, contribution guide, and all other prose stay yours.

Fact Detection
Project name and version package.json, pyproject.toml, Cargo.toml, go.mod
API routes FastAPI/Flask, Express/Fastify, Next.js App Router, common Go patterns
Modules and components Conventional Python, Node, Go, Rust, React, Vue, and Svelte layouts
Test and lint result Optional, only with --run-checks
Docker and monorepo hints Conventional project files

The detector is intentionally conservative. A current status means the managed facts match what this tool can detect; it is not a claim that every sentence in a README is correct.

Status badge

--init creates readme-badge.svg, which can be displayed from the repository itself:

![README status](./readme-badge.svg)
Color Meaning
Green Managed facts were generated with passing tests.
Yellow Managed facts are synced, but checks were skipped or no test command was configured.
Red The last explicitly requested test run failed or timed out.

Run readme-guardian --check in CI to catch source changes that make the managed facts stale.

Git and CI

Install a pre-push hook after initialization:

readme-guardian --install-hook

The hook runs checks only because you explicitly installed it. It never rewrites history or amends commits. It refuses to replace an existing hook, refuses to run over uncommitted README or badge changes, and blocks a push when it produces updates so those updates can be reviewed and committed.

For CI, use the same two-stage pattern in a trusted repository:

- run: pipx install readme-guardian==1.1.0
- run: readme-guardian --check --run-checks

Use the GitHub release wheel URL above until 1.1.0 is published to PyPI.

AI agent skill

The repository includes a concise SKILL.md with a safe workflow for agents: inspect, initialize once, preview, apply managed facts, add human context, and verify.

OpenCode discovers project skills at .opencode/skills/<name>/SKILL.md and global skills at ~/.config/opencode/skills/<name>/SKILL.md. For a project-local setup:

mkdir -p .opencode/skills/readme-guardian
cp /path/to/readme-guardian/SKILL.md .opencode/skills/readme-guardian/SKILL.md

Codex users can use the same file in ~/.codex/skills/readme-guardian/SKILL.md.

Security model

  • The Python CLI has no telemetry and makes no network requests.
  • It never replaces an unmarked README. --init appends managed sections.
  • It writes only managed content in README.md and readme-badge.svg.
  • It refuses to follow symlinks for README, badge, or hook writes.
  • Source scanning skips symlinks, common generated directories, files over 1 MB, and stops after 2,500 files.
  • It does not execute project commands unless --run-checks is explicitly passed.
  • The npm wrapper uses argument arrays and the wheel bundled inside its verified npm tarball; it does not globally install Python packages.
  • The tool cannot make an untrusted repository safe to execute. Run --run-checks only in codebases you trust.

See SECURITY.md for the complete policy and private disclosure path.

Contributing

Contributions that improve detection accuracy, guardrails, tests, or agent interoperability are welcome. Read CONTRIBUTING.md, follow the Code of Conduct, and open an issue with a small reproducible project shape.

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

readme_guardian-1.1.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

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

readme_guardian-1.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file readme_guardian-1.1.0.tar.gz.

File metadata

  • Download URL: readme_guardian-1.1.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for readme_guardian-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c4d34d3a0f73e5f39c192f0d7e252da9d1480255a906128b7f1c447e917f085f
MD5 bbc0752f9282d278ea6a17067a0aff4e
BLAKE2b-256 3e1a4c1262421ec7aae3a9b0f99f4fa85f6bd6a83169c81a57e5061f8bc572a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for readme_guardian-1.1.0.tar.gz:

Publisher: publish.yml on jeevesh2515/readme-guardian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file readme_guardian-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: readme_guardian-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for readme_guardian-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad7d361606389f940bd01fe084899f368ffcb438470058fa5232ec2e752d10b9
MD5 e85b07a1c13a5abb51c8f8aee81ab2b7
BLAKE2b-256 03f4309231d57cdd6b4cd7349aa54e6ddf13bb14ae16921855556df401fd6070

See more details on using hashes here.

Provenance

The following attestation bundles were made for readme_guardian-1.1.0-py3-none-any.whl:

Publisher: publish.yml on jeevesh2515/readme-guardian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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