Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Usage — CLI

The mdka command-line tool is provided by the mdka-cli crate.

Quick Reference

mdka [OPTIONS] [FILE...]

Run mdka --help to see the full option list with descriptions.

Common Patterns

Convert from stdin:

echo '<h1>Hello</h1>' | mdka
curl https://example.com | mdka

Convert a single file (output goes to the same directory):

mdka page.html          # → page.md

Convert to a specific directory:

mdka -o out/ page.html  # → out/page.md

Bulk conversion (-o is required for multiple files):

mdka -o out/ docs/*.html

Choose a conversion mode:

mdka --mode minimal --drop-shell page.html   # extract body text
mdka --mode preserve -o archive/ *.html      # maximum fidelity

All Options

FlagDescription
-o, --output <DIR>Output directory (default: same as input)
-m, --mode <MODE>balanced · strict · minimal · semantic · preserve
--preserve-idsKeep id attributes
--preserve-classesKeep class attributes
--preserve-dataKeep data-* attributes
--preserve-ariaKeep aria-* attributes
--drop-shellRemove nav, header, footer, aside
-h, --helpShow help

For full mode descriptions see Conversion Modes.