CLI Reference
All medmark commands and flags.
Commands
medmark (default)
Runs the interactive conversion wizard.
npx medmark [options]You can bypass the interactive prompts by passing flags directly:
npx medmark \
--input medmark/medium-export/posts \
--output medmark/output \
--template medmark/templates/sample-medmark-template.jsmedmark init
Initialises the medmark/ workspace in the current directory.
npx medmark initCreates:
medmark/medium-export/— place your Medium archive'sposts/folder heremedmark/templates/sample-medmark-template.js— starter custom template.medmark/logs/— debug log output
The output folder is created by the conversion run, not by init.
Running medmark without init first triggers the same setup automatically.
Flags
| Flag | Short | Description |
|---|---|---|
--input <path> | -i | Path to the posts/ folder of the Medium export |
--output <path> | -o | Destination folder for converted files (default: medmark/output) |
--template <file> | -t | Path to a custom template file |
--drafts | -d | Include draft posts in the output |
--skip <files> | -s | Comma-separated list of HTML filenames to skip |
--debug | -D | Enable debug mode (saves logs to .medmark/logs/) |
--version | -V | Print the installed version |
--help | -h | Show help text |
Any flag you omit is prompted for interactively, so a partially-flagged run still works — only the missing answers are asked for.
Advanced options prompt
When you answer yes to "Configure advanced options?" in the wizard, you get:
- Template file — path to a custom
.jstemplate (leave empty to use the built-in default) - Export drafts — include
draft_*.htmlfiles - Files to skip — comma-separated filenames to ignore
- Debug mode — write verbose logs under
.medmark/logs/
Registry options are template-only
The content registry is configured in your template's getOptions(), not via
flags. See Content Registry.