Skip to main content

The README freshness guarantee for vibe coders. Auto-syncs README.md with live data before every push.

Project description

README status Version npm Homebrew MIT PRs welcome

๐Ÿ›ก๏ธ readme-guardian

The README freshness guarantee for vibe coders.

One command. Zero config. Every push.
Auto-syncs your README with live test counts, API routes, and modules.
Works with every AI agent, every language, every project.

Quick Start โ€ข Install โ€ข How It Works โ€ข The Badge โ€ข For AI Agents โ€ข CI โ€ข Comparison


npm install -g readme-guardian โ€ข brew install readme-guardian โ€ข pipx install readme-guardian

Metric Value
Language python
Version 1.0.0
Tests โ€”
Lint โ€”
Docker no
Monorepo no
Latest commit 205361a cleanup: remove VS Code extension, update Homebrew install cmd

๐Ÿ… The Freshness Badge

This is the status symbol of the vibe coding era.

Once you install readme-guardian, your repo gets a readme-badge.svg that updates on every push:

![readme-guardian](./readme-badge.svg)

README status badge

What it tells the world:

Badge color Meaning Trust level
#4c1 Green README is fresh, tests pass โœ… High
#dfb317 Yellow README synced but no tests โš ๏ธ Medium
#e05d44 Red README is stale โŒ Low

Why this matters: When a developer visits your repo and sees a green badge, they know instantly:

  • The docs are accurate
  • Tests were run recently
  • This project is actively maintained

When they see a red badge, they know to be cautious. The badge doesn't lie because it's generated from live data on every push.

It's also self-promoting. Every repo with the badge advertises readme-guardian. The more repos use it, the more it becomes the standard for README freshness.


๐Ÿค” The Problem

You're vibe coding with an AI agent. You ship fast. PRs land. Push to GitHub.

The code is perfect. The README still says "hello world" from day one.

Your project looks abandoned. Contributors bounce. Users leave. Nobody trusts a project with a stale README.

"The README is the first thing people see. If it's wrong, they assume the code is too."


๐Ÿ›ก๏ธ The Solution

npx readme-guardian --install

That's it. One command. Now before every git push, readme-guardian:

  1. ๐Ÿ” Detects your stack (Node, Python, Go, Rust โ€” monorepos too)
  2. ๐Ÿงช Runs your tests and live-counts passes
  3. ๐Ÿ—บ๏ธ Scans for API routes
  4. ๐Ÿ“ฆ Lists source modules and frontend components
  5. ๐Ÿ“ Updates the README with verified data
  6. โœ… Only if something actually changed

Your README is always accurate. You never think about it.


๐Ÿš€ Quick Start

# Try it right now โ€” no install needed
npx readme-guardian

# Then install for every push
npx readme-guardian --install-hook

๐Ÿ“ฆ Install

Pick your poison:

npm / npx (recommended for JS/TS projects)

# Run without installing (auto-installs Python CLI)
npx readme-guardian

# Install globally
npm install -g readme-guardian
readme-guardian --install-hook

pipx (recommended for Python projects)

pipx install readme-guardian
readme-guardian --install-hook

Homebrew (macOS)

brew install jeevesh2515/homebrew-tap/readme-guardian
readme-guardian --install-hook

Commands

Command What it does
readme-guardian Interactive preview โ€” see what would change
readme-guardian --apply Apply changes immediately
readme-guardian --check CI mode โ€” exit 1 if README is stale
readme-guardian --install-hook Install pre-push hook (runs automatically)
readme-guardian --uninstall-hook Remove the pre-push hook
readme-guardian --version Show version

๐Ÿง  How It Works

Zero-config detection

readme-guardian auto-detects your project by looking at your config files:

File What we learn
package.json Name, version, scripts, frontend deps, workspaces
pyproject.toml Name, version, test/lint tooling
go.mod Module name, test command
Cargo.toml Name, version, test command

No configuration files. No API keys. No setup.

What we collect

๐Ÿ“ Project root
 โ”œโ”€โ”€ Stack type       โ†’ Node / Python / Go / Rust
 โ”œโ”€โ”€ Test count       โ†’ Live from pytest / npm test / go test / cargo test
 โ”œโ”€โ”€ API routes       โ†’ FastAPI, Express, Next.js App Router, Go Chi/Gin
 โ”œโ”€โ”€ Source modules   โ†’ Python packages, Node modules, Go packages
 โ”œโ”€โ”€ UI components    โ†’ React, Vue, Svelte files
 โ”œโ”€โ”€ Lint status      โ†’ ruff, ESLint
 โ””โ”€โ”€ Git state        โ†’ Last commit hash and message

What we generate

A clean, beautiful README with:

  • Live badges โ€” test count, version, lint status, Docker support
  • The freshness badge โ€” ![README](https://img.shields.io/badge/README-fresh-brightgreen) โ€” a status symbol that tells the world your docs are accurate
  • Quick start โ€” framework-aware install instructions
  • API route table โ€” all detected endpoints with methods
  • Module list โ€” source code directory structure
  • Component inventory โ€” frontend UI components
  • Test suite status โ€” live count, not a hardcoded number

Non-destructive by design

If your README has <!-- readme-guardian:stats --> markers, only content between markers is replaced. Everything else โ€” your narrative, architecture docs, contribution guidelines โ€” stays intact.

If no markers exist, readme-guardian generates a complete README and asks first.


๐Ÿค– For AI Agents

This repo ships a companion skill file (SKILL.md) that turns any AI coding agent into a documentation partner.

Installation

# Claude Code, OpenCode
cp SKILL.md ~/.agents/skills/readme-guardian/SKILL.md

# Codex CLI
cp SKILL.md ~/.codex/skills/readme-guardian/SKILL.md

# Cursor
# Add SKILL.md to .cursor/skills/

How agents use it

You: "Update the README"
Agent: [runs readme-guardian, reviews diff, adds context about
       the architecture decisions made during this session,
       verifies the freshness badge matches test count]

The CLI handles facts (test counts, routes, versions). The agent handles context (why decisions were made, architectural rationale). Together they produce documentation that's both accurate and insightful.

Compatible with

Claude Code โ€ข Codex CLI โ€ข OpenCode โ€ข Cursor โ€ข GitHub Copilot โ€ข Continue.dev โ€ข Antigravity โ€ข Windsurf


๐Ÿ” CI Enforcement

Add to any GitHub Actions workflow:

# .github/workflows/readme-check.yml
on: pull_request
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
      - run: pip install readme-guardian
      - run: readme-guardian --check

Any PR with a stale README fails automatically. No more merging docs that don't match reality.


๐Ÿ“Š Comparison

Feature Manual CI-only readme-guardian
Auto-detect project type โŒ โŒ โœ…
Live test count on push โŒ โŒ โœ…
Scan for API routes โŒ โŒ โœ…
List UI components โŒ โŒ โœ…
Pre-push hook (zero effort) โŒ โŒ โœ…
CI enforcement โŒ โœ… โœ…
AI agent companion โŒ โŒ โœ…
Freshness badge โŒ โŒ โœ…
Works offline โœ… โŒ โœ…
Zero config โŒ โŒ โœ…

๐Ÿ” Security

  • Zero network calls. No telemetry, no API keys, no phone home.
  • No credential access. Does not read .env, secrets, or config files.
  • Reads only source structure. Scans for patterns, not content.
  • Suppressed build output. All commands redirect stdout to logs.
  • Git-local. Only modifies README.md. Never touches source code.
  • Ask-first mode. Interactive mode shows diff before applying.

๐ŸŒŸ Why You'll Love It

If you use AI agents, you know the pain: agents ship code at machine speed but documentation stays human-slow. readme-guardian closes the gap. Your README becomes a build artifact โ€” verified at push time, not remembered at documentation time.

If you maintain open source, the freshness badge is a trust signal. Projects with README: fresh attract contributors. Projects with stale READMEs repel them.

If you're a team lead, enforce README freshness in CI. Block PRs with stale docs. Make documentation a first-class citizen.


๐Ÿงฐ For Maintainers

.
โ”œโ”€โ”€ README.md                  # This file โ€” hand-crafted with markers
โ”œโ”€โ”€ SKILL.md                   # AI agent companion skill
โ”œโ”€โ”€ pyproject.toml             # Python package (pipx installable)
โ”œโ”€โ”€ readme_sync/
โ”‚   โ”œโ”€โ”€ __init__.py            # CLI implementation
โ”‚   โ””โ”€โ”€ __main__.py            # python -m entry point
โ”œโ”€โ”€ .github/workflows/         # CI enforcement (copy to your repo)
โ”‚   โ””โ”€โ”€ readme-check.yml
โ”œโ”€โ”€ LICENSE                    # MIT
โ””โ”€โ”€ .gitignore

๐Ÿ“œ License

MIT โ€” do whatever you want. Fork it, modify it, use it in proprietary projects, include it in your own AI agent toolchains. Attribution appreciated but not required.


Star on GitHub

Built for the vibe coding era.
Documentation shouldn't be an afterthought โ€” it should be a build artifact.
Star this repo. Your future self will thank you.

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.0.0.tar.gz (14.0 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.0.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: readme_guardian-1.0.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for readme_guardian-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6306290c62cf6fe818d9ffdd5ffcc27b9a7756c488f4cb8f0627f25254403b1f
MD5 f48439f6f9c1a3cc791e21ed9948131e
BLAKE2b-256 8569b7bc1eb27c5f6ff62eb82bf7f67a9e28b3bacc819b927ddfd92260c89a65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for readme_guardian-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50657248149cfc56d7ce9600da91a188acd2e8496eaa003d6e07cbe211bb609f
MD5 7c152fd849c9cf37cd6a4d90e347a367
BLAKE2b-256 25914114a65494a5329efd9e3bc814b22d632ce56f6a04e8885e79fe8c764a49

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