Skip to main content

menard logo

CI codecov PyPI Python 3.10+ License Ruff

menard is a pre-commit hook and CLI tool that deterministically flags when code changes should trigger documentation updates. It outputs agent-friendly JSON with targeted information about what changed and which doc sections need review.

When working fast with tools like Claude, docs drift quickly. Agents excel at changing code but struggle to understand how code changes should trigger doc updates. menard addresses this with deterministic checks.

📚 Full docs | Getting Started | CLI Reference

Core Use Cases

1. Track Doc Drift

Define code → doc relationships in .menard/links.toml. menard uses git diffs to detect stale docs. Section-level tracking means changes to one part of a file won't trigger full doc rewrites.

git commit -m "refactor auth"
# ❌ Blocked: docs/api.md#Authentication unchanged since src/auth.py changed

2. Flag Protected Content Changes

Use .menard/donttouch to define sections that shouldn't be edited. Avoid accidental changes by over-eager agents with automatic warnings.

git commit -m "update requirements"
# ⚠️  Warning: Protected literal changed
#   "Python 3.10+" → "Python 3.9+"
#   This is protected in .menard/donttouch

3. Audit for Deterministic Maintainability

Use the audit skill to analyze how easily your docs can be maintained with deterministic checks. Get concrete suggestions for links.toml additions, donttouch protections, and restructuring.

> Audit my documentation

4. Find Duplicate Content

Use menard brevity to find semantically similar sections across your docs using local embeddings. No API keys needed—runs entirely on your machine.

menard brevity --threshold 0.95
# README.md#License ↔ docs/index.md#License (1.00)
# README.md#Quick Start ↔ docs/getting-started.md#Quick Start (0.96)

Quick Start

# Install
uv add menard

# Initialize
menard init

# Audit docs for trackability (in Claude Code)
> Audit my documentation and apply the suggestions

# Auto-generate convention-based links
menard bootstrap --apply

# Validate and check coverage
menard validate-links
menard coverage

# Set up pre-commit hook
# See: https://nlebovits.github.io/menard/getting-started/#pre-commit-setup
pre-commit install

# Optional: Find duplicate content with embeddings
uv add menard[brevity]
menard brevity --threshold 0.95

License

Apache-2.0

Contributing

Contributing Guide

Metadata

Release files for menard 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for menard 0.4.0
File Size Uploaded Provenance
menard-0.4.0.tar.gz 428.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for menard 0.4.0
File Interpreter ABI Platform
menard-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 491.3 kB

Release files / menard-0.4.0.tar.gz

Download URL menard-0.4.0.tar.gz
Size 428.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a556e615189c3fbd41abcd1fc3772fb3fc77ed82534a3f96d1644b7afcfec358
BLAKE2b-256 checksum
How to use checksums
ef718aad44096c0e25ab0e7762d909351d7478e474d557d24434a67173b12a37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2026.

Transparency log

Release files / menard-0.4.0-py3-none-any.whl

Download URL menard-0.4.0-py3-none-any.whl
Size 62.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4c4d23b6092870277762a390e2ea4fa1d0a0012076a872d09d321c36c462101
BLAKE2b-256 checksum
How to use checksums
55d7570ca032d366546160aa551ab372ee16436f71befa4c354f1541050ec543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2026.

Transparency log

Security for menard 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for menard-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page