Generate and insert table of contents into markdown files
markmv toc [options] <files...>
| Argument | Description |
|---|---|
<files...> |
Markdown files to process (supports globs like .md, **/.md) |
| Option | Description | Default |
|---|---|---|
--min-depth <number> |
Minimum heading level to include (1-6) | 1 |
--max-depth <number> |
Maximum heading level to include (1-6) | 6 |
--include-line-numbers |
Include line numbers in TOC entries | |
--position <position> |
TOC position: top|after-title|before-content|replace | after-title |
--title <title> |
TOC title | Table of Contents |
--heading-level <level> |
TOC heading level (1-6) | 2 |
--marker <marker> |
Custom marker for TOC replacement (requires --position replace) | |
--skip-empty |
Skip files that don't have any headings | true |
-d, --dry-run |
Show what would be changed without making changes | |
-v, --verbose |
Show detailed output | |
--json |
Output results in JSON format |