Documentation automation

Keep your docs index in sync by default.

A zero-dependency CLI that updates your docs index table from staged Markdown changes. Works in pre-commit, scales in CI, and removes one more recurring review comment.

Install

npm install -D docs-index-keeper
npx docs-index-keeper init

The init command wires a pre-commit hook that runs docs-index-keeper update and stages the changed index file in the same commit.

What it solves

Missed index rows

New docs under docs/ are auto-added to the table in docs/README.md.

Review churn

Contributors stop forgetting manual index edits because hook + staging does it for them.

CI guarantees

docs-index-keeper check exits with code 1 if the index would change.

Core commands

Command Purpose
init Add hook integration for update + staging
update Update index from staged Markdown files
check Fail if index is out of sync (CI guardrail)
add <path> Add one Markdown file to the index directly