– recursive TOC updates across all Markdown files within a folder hierarchy
– a --check mode for CI use, which only passes if all TOCs in all Markdown files are up-to-date with respect to the section headers in their respective files
Single-file operation is still supported, but the primary motivation for this tool was repository-wide correctness in CI and build-system workflows.
Behavior is intentionally conservative: – explicit start/end markers (no heuristic detection) – deterministic output – idempotent writes – strict single-file mode vs lenient recursive traversal
Posting in case this is useful to others with similar workflows.
Repo + docs: https://github.com/datalackey/build-tools/tree/main/javascri...
npm: https://www.npmjs.com/package/@datalackey/update-markdown-to...