Skip to main content

Libraryan: keep your Markdown docs true to your code

tests PyPI Python 3.10+ zero dependencies MIT

Docs drift. A flag gets renamed, a file moves, a default changes, and the README keeps saying the old thing. AI agents make it worse: they write a lot of Markdown and rarely go back to fix it.

Libraryan finds and fixes that drift, when you ask, and never commits anything:

  • libraryan check lists broken links and file paths that no longer exist. Free, no AI, changes nothing. Good in CI.
  • libraryan fix lets an AI agent read your code and fix the docs that are wrong. The changes land in your folder uncommitted, so you read them with git diff and keep what you like.

It installs nothing into your project: no hooks, no config files, no background jobs.

Quick start

pipx install libraryan
cd your-project
libraryan check                  # free: what is broken?
libraryan fix                    # AI: fix the docs (needs Claude Code)
git diff                         # read the changes, then commit or undo

Working on a branch? Fix only the docs your changes affect:

libraryan fix --since main

What fix does

On a small test project with a README that had drifted from its code:

$ libraryan fix
Changed
- README.md: the default port was given as 8000, but src/server.py uses 9000.
- README.md: it described a --verbose flag that doesn't exist. The real option is --log-level.
- README.md: it pointed to src/config.py, which doesn't exist. Removed.
- README.md: it linked to docs/deploy.md, which doesn't exist. Removed the link.
Deleted
- docs/notes-old.md: an old scratch note. Its one true fact is already in docs/setup.md.

Libraryan changed 2 doc(s). Nothing is committed. Cost: $0.19.
  changed  README.md
  deleted  docs/notes-old.md

Review: git diff  (new files: git status)
Keep:   commit them as usual
Undo:   git restore -- README.md docs/notes-old.md

That run took 22 seconds. The agent:

  • checks docs against the code: commands, flags, paths, config keys, defaults, setup steps. It fixes what the code proves wrong.
  • fixes broken links and references to files that are gone.
  • removes junk docs: empty stubs, duplicates, old scratch notes. Before deleting one, it must quote where each fact went. Libraryan checks those quotes, and puts back any deletion that fails.
  • reports, never touches, code: if the code looks wrong and the doc looks right, it tells you.
  • leaves correct text alone. It does not restyle or reorganise.

Why you can trust it

Worry What happens
It commits or pushes something It never runs git commit, add or push. You decide what to keep.
It changes my code It works in a throwaway copy of your repo. Only .md changes come back; anything else is dropped and listed.
It deletes a fact A deletion stays only if the agent quotes where each fact went, and the quotes match both files.
It overwrites my edits fix refuses to start while you have uncommitted doc changes.
It costs too much Each run stops at a dollar limit (--budget, default $5) and after 60 minutes. The cost is printed at the end.
It follows instructions hidden in a file Docs and code are treated as data, never as instructions.

Commands

Command Does
libraryan check List broken links and missing paths. Exit code 1 if any.
libraryan fix Fix the docs with an AI agent; leave the changes uncommitted
libraryan fix --since REF Only docs affected by code changes since REF
libraryan fix --budget 10 Raise the dollar limit (default 5)
libraryan fix --model sonnet Pick the Claude model

What counts as a doc: every .md file git tracks, except in node_modules, vendor, third_party, fixtures, testdata, templates, venv and folders that start with a dot (other than .github). check skips changelogs (they record history) and paths your .gitignore covers, so build output is not reported as missing.

Use check in CI

- run: pipx install libraryan && libraryan check

Requirements

  • Linux or macOS, Python 3.10+, git.
  • For fix: Claude Code, logged in. You pay for your own usage.

Upgrading from 0.3

0.3 installed itself into each project (hooks, a scheduled job, .libraryan/). 0.4 drops all of that. In each project that has it, before you upgrade, run:

python3 .libraryan/bin/libraryan uninstall

Then pipx upgrade libraryan. Your docs stay as they are.

Contributing

Issues and PRs are welcome; see CONTRIBUTING.md. Report security issues privately (SECURITY.md).

MIT © narek-mn · Changelog

Metadata

Release files for libraryan 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 libraryan 0.4.0
File Size Uploaded Provenance Actions
libraryan-0.4.0.tar.gz 20.9 kB With provenance Details for libraryan-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 37.6 kB

Release files / libraryan-0.4.0.tar.gz

Download URL libraryan-0.4.0.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c55401c1c1c7839d157b8454f56eaea45b0363d09abb5daa339c48dd045a1b7f
BLAKE2b-256 checksum
How to use checksums
be0e28ec8098a0e6a0cb5e0676bbde6d63557a08d81167e426074af110282b80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL libraryan-0.4.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f15912a310675bfcfec4b7c546fe0e690fc09b56d4e106e80044af19238610e7
BLAKE2b-256 checksum
How to use checksums
5b8e49f6d5b8090e98dce479fff65af0675a268e85defa0b2f6ae799aae6a604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Security for libraryan 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for libraryan-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 Oct 21, 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