Converts Markdown to HTML and prints it to stdout. Pipe it wherever you want — a file, your clipboard, or another tool.
Install globally from npm (works on any runtime — Bun, Node 18+, or Deno):
bun install -g @oliveryasuna/m2mOr run it once without installing:
bunx @oliveryasuna/m2m < article.mdcat article.md | m2mThe HTML is written to stdout. Redirect it to a file:
cat article.md | m2m > article.htmlOr pipe it to your clipboard to paste into Medium (or any rich text editor):
# macOS
cat article.md | m2m | pbcopy
# Linux (X11)
cat article.md | m2m | xclip -selection clipboard -t text/html
# Linux (Wayland)
cat article.md | m2m | wl-copy --type text/html
# Windows
Get-Content article.md -Raw | m2m | Set-ClipboardHTML output is not sanitized. Malicious Markdown (e.g., <script> tags) will be included in the output. Most rich text editors (including Medium) sanitize on paste, but be cautious when piping into contexts that render raw HTML.
This project is licensed under the MIT License.