thlorenz/doctoc - OSS Alternative - Discover Top Open Source Alternatives to Popular Software
CLI Utility
4.4k 2026-04-19

thlorenz/doctoc

A command-line utility that automatically generates and updates GitHub-compatible tables of contents for Markdown files within local Git repositories.

Core Features

Automatic generation of GitHub-compatible tables of contents for Markdown files.
Configurable TOC title, header, footer, and heading levels (min/max).
Supports processing individual files, directories, and updating existing TOCs.
Integration options including Git hooks and Docker image.
Option to generate links compatible with other sites.

Quick Start

npm install -g doctoc

Detailed Introduction

doctoc is a powerful command-line utility specifically engineered to automate the creation and maintenance of tables of contents (TOCs) within Markdown files. It's particularly valuable for projects managed in Git repositories, as it ensures that all generated anchor links are fully compatible with GitHub's rendering, significantly improving documentation navigability. Offering extensive customization for TOC appearance, content, and heading levels, doctoc streamlines documentation workflows, making READMEs and other Markdown documents more organized, professional, and user-friendly. Its flexible usage patterns include batch processing, individual file updates, and seamless integration into development pipelines via Git hooks or a Docker image.

OSS Alternative

Explore the best open source alternatives to commercial software.

© 2026 OSS Alternative. hotgithub.com - All rights reserved.