Skip to main content

Review and update living documents using LLMs

Project description

doc-updater

Review and update living documents using LLMs. Designed to run via GitHub Actions to periodically check if your documentation is outdated and create PRs with updates.

Features

  • Front-matter driven: Documents opt-in to review via auto_review: true
  • Custom prompts: Each document can specify what to focus on
  • Obsidian compatible: Standard YAML front-matter works everywhere
  • GitHub Actions ready: Includes workflow for automated PR creation
  • Pluggable providers: Start with Claude, add others as needed

Installation

# Using uv
uv pip install doc-updater

# Or from source
git clone https://github.com/your-org/doc-updater
cd doc-updater
uv pip install -e .

Quick Start

1. Add front-matter to your documents

---
auto_review: true
review_prompt: |
  Review this document for outdated information.
  Focus on the "Alternatives" section.
review_context: |
  This is a technical comparison for our engineering team.
last_reviewed: 2024-06-15
review_interval_days: 30
---

# Your Document Title

Your content here...

2. Run the review

# Set your API key
export ANTHROPIC_API_KEY=sk-ant-...

# Review all documents in a directory
doc-updater review ./docs

# Dry run (no changes)
doc-updater review ./docs --dry-run

# Review a single file
doc-updater review ./docs/platform-comparison.md

3. List documents due for review

doc-updater list ./docs

Front-Matter Schema

Field Type Required Description
auto_review boolean Yes Enable automatic review
review_prompt string No Custom prompt for this document
review_context string No Additional context for the LLM
last_reviewed date No Updated automatically after review
review_interval_days integer No Days between reviews (default: 30)

GitHub Actions Setup

1. Add the workflow

Copy .github/workflows/doc-review.yml to your repository.

2. Set up secrets

Add ANTHROPIC_API_KEY to your repository secrets.

3. Configure the schedule

Edit the cron expression in the workflow to set your review frequency:

on:
  schedule:
    - cron: "0 0 1 * *"  # Monthly on the 1st

4. Manual trigger

You can also trigger reviews manually from the Actions tab.

CLI Reference

Usage: doc-updater [OPTIONS] COMMAND [ARGS]...

Commands:
  review   Review and update documents marked with auto_review: true
  list     List all documents marked for auto-review
  version  Show version information

Options:
  --help  Show this message and exit

review

Usage: doc-updater review [OPTIONS] PATH

Arguments:
  PATH  Directory or file to review  [required]

Options:
  -p, --provider [claude]   LLM provider to use  [default: claude]
  -m, --model TEXT          Model to use (provider-specific)
  -n, --dry-run             Show what would be changed without modifying files
  -r, --recursive           Search for documents recursively  [default: True]
  -v, --verbose             Show detailed output
  -d, --debug               Enable debug logging
  --help                    Show this message and exit

Development

# Clone and install dev dependencies
git clone https://github.com/your-org/doc-updater
cd doc-updater
uv sync --group dev

# Run tests
uv run pytest

# Format code
uv run black src tests
uv run ruff check --fix src tests

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

doc_updater-0.2.0.tar.gz (39.7 kB view details)

Uploaded Source

Built Distribution

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

doc_updater-0.2.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file doc_updater-0.2.0.tar.gz.

File metadata

  • Download URL: doc_updater-0.2.0.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for doc_updater-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e6d6229d0750c8495de7292488f4bcb081d3c1e856d5ba0357b753ac99ac004d
MD5 cfe835ecbc9909651c77940c22065329
BLAKE2b-256 da7714c5c43980d0892e663b2f0e33ca04af2e1f8d92ce16ed58bf7a4feb372e

See more details on using hashes here.

File details

Details for the file doc_updater-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: doc_updater-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for doc_updater-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c746aed204ea5ef0b842d2afd346d575a063bf3dd7d3b2dec15f7473140e40c2
MD5 6de3cf4a3c3c94fcd1f7fdba2609653d
BLAKE2b-256 59cf262e55017fbf503363f1ff75aa3192f9277ea039006123de4af96f1c1dfc

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