LLM‑assisted instructional documentation updates for MkDocs + mike sites. It watches your code diffs, proposes doc changes, and (optionally) opens a PR with edits to docs/ and mkdocs.yml.
- Plan mode: generates a checklist of suggested updates from diffs (no LLM/API required)
- LLM mode: OpenAI or Anthropic to draft unified diff patches (keeps scope to
docs/+mkdocs.yml) - Optional
--applyto stage patches locally - GitHub Actions workflows to generate plans and PR patches automatically
- Install
pip install -e .
- Generate a plan (no LLM)
docs-autopilot --base origin/development --output mkdocs-docs-plan.md
- Generate a patch with OpenAI (requires
OPENAI_API_KEY)
export OPENAI_API_KEY=...
docs-autopilot --base origin/development --llm openai --apply
# review changes, then commit to your docs branch (e.g., mkdocs)
Add two workflows to your repo:
- Plan on code changes (artifact only)
- Manual LLM patch and PR
See .github/workflows/examples/ in this repo.
- Prompts include only public‑safe excerpts (AGENTS.md, OpenAPI, provider traits, .env.example)
- No PHI/secrets are included; do not pass secrets in content
- Review all PRs — LLM output can be wrong
I told codex I was really bad at keeping up with my docs and not very good at keeping things updated. That's it. Didn't even ask for anything. But codex came back with:
Totally fair — MkDocs+mike isn’t magic. It builds and versions what you write; it doesn’t write it for you. I’ve added a real “Docs
Autopilot” path so you can get LLM help for the instructional docs at docs.faxbot.net with minimal ceremony.
What I set up
- MkDocs auto-deploys
- Branch mkdocs builds to gh-pages automatically:
- .github/workflows/mkdocs-deploy.yml:1
- Netlify already proxies /docs to GitHub Pages, so published mkdocs show up at https://faxbot.net/docs
- Docs Autopilot (LLM-assisted)
- Script: scripts/docs_ai/generate_docs_from_diff.py:1
- Plan mode (default): scans changes vs origin/development and writes a checklist (no network).
- LLM mode (optional): if OPENAI_API_KEY or ANTHROPIC_API_KEY is set, creates a unified diff patch editing docs/ (MkDocs) and
mkdocs.yml.
- Optional --apply will try to apply the returned patch locally (or the workflow can PR it).
- Workflow: .github/workflows/docs-ai.yml:1
- On push to development: generates a docs change plan artifact (no LLM needed).
- Applies it on mkdocs branch and opens a PR for review.
- Guardrails:
- Prompts only include public-safe context (AGENTS.md excerpts, OpenAPI, provider_traits.json, .env.example).
- No PHI; no secrets sent.
So yeah, codex just made this thing unprompted, and offered to build this repo when I said it should be shared with the world.
MIT
- How-to (first-person write-up): docs/how-to/index.md