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.js

medmark init

Initialises the medmark/ workspace in the current directory.

npx medmark init

Creates:

  • medmark/medium-export/ — place your Medium archive's posts/ folder here
  • medmark/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

FlagShortDescription
--input <path>-iPath to the posts/ folder of the Medium export
--output <path>-oDestination folder for converted files (default: medmark/output)
--template <file>-tPath to a custom template file
--drafts-dInclude draft posts in the output
--skip <files>-sComma-separated list of HTML filenames to skip
--debug-DEnable debug mode (saves logs to .medmark/logs/)
--version-VPrint the installed version
--help-hShow 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 .js template (leave empty to use the built-in default)
  • Export drafts — include draft_*.html files
  • 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.

On this page