{"library":"markdown-toc-gen","title":"markdown-toc-gen","description":"A CLI tool to generate, update, check, and test table of contents in Markdown files, with focus on conformity with Prettier formatting (hyphens as bullet list). Current stable version 1.2.0. It handles duplicate headings, ignores code blocks, and supports multiple files via glob patterns. Differs from similar tools by being Prettier-compliant, excluding h1 headings by default, and offering a dry-run mode. The tool requires '<!-- toc -->' and '<!-- tocstop -->' markers in Markdown files.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install markdown-toc-gen"],"cli":{"name":"markdown-toc-gen","version":null}},"imports":["npx markdown-toc-gen insert README.md"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# Install globally or use npx\nnpm install -g markdown-toc-gen\n\n# Add markers to your README.md\n# <!-- toc -->\n# <!-- tocstop -->\n\n# Generate TOC\nmarkdown-toc-gen insert README.md\n\n# Check if TOC is up-to-date (useful in CI)\nmarkdown-toc-gen check README.md","lang":"bash","description":"Shows basic usage: install, add TOC markers, insert TOC, and check TOC freshness.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}