11 releases (breaking)

0.9.0 Jul 20, 2023
0.8.0 Mar 23, 2023
0.7.0 Feb 28, 2023

#2100 in Parser implementations

Download history 2/week @ 2024-02-20 7/week @ 2024-02-27 5/week @ 2024-03-12 12/week @ 2024-03-26 58/week @ 2024-04-02

70 downloads per month

MIT license

928 lines


Markdown Magician 🧙


  • Hot reload previewing 🔥
  • Conversion to HTML 🏭
  • Themes! ✨
  • Extensions - Math, diagrams, syntax-highlighting 🧩
  • Download base64 encoded images (png, jpg, svg)


Convert doc.md to doc.html

marky doc.md

Start a local preview server with hot-reload

marky doc.md --live

Enable extensions

# Or use --all to enable all
marky doc.md --math --diagrams --highlight

Include local images as base64 encoded and compress them (beta)

# possible values: local, remote, all
marky doc.md --include-images "local" --optimize-images
# or short
marky doc.md -zI local

Select and use a different theme with fzf

marky doc.md --theme $(marky --themes | fzf)

Pipe from stdout and open compiled file

cat doc.md | marky --out doc.html --open

See --help for more info


Install using cargo

cargo install marky


Markdown Magician 🧙

Usage: marky [OPTIONS] [PATH]

  [PATH]  Read input from file

      --completion <GENERATOR>
          [possible values: bash, elvish, fish, powershell, zsh]
  -t, --theme <THEME>
          Theme to use
      --string <STRING>
          Read input from string
          List available themes
          Print config path
  -o, --out <OUT>
          Output file
          Output to stdout
  -H, --highlight
          Enable syntax highligting with highlight.js
  -M, --math
          Enable math rendering with KaTeX
  -D, --diagrams
          Enable UML diagrams rendering with Mermaid
  -I, --include-images <INCLUDE_IMAGES>
          Include images into file as base64 encoded [possible values: local, remote, all]
  -z, --optimize-images
          Optimize included images to make them smaller
  -A, --all
          Enable all extra renderers
  -w, --watch
          Recompile file on save
  -l, --live
          Live preview in the browser
      --port <PORT>
          Port of the live server [default: 8080]
  -O, --open
          Open output file in the default app
  -h, --help
          Print help
  -V, --version
          Print version


git clone https://github.com/metafates/marky.git
cd marky
cargo install --path .


Some examples...

marky README.md --theme sakura # default theme


marky README.md --theme air


marky README.md --theme retro


See marky --themes to show all available themes.

You can also add your own themes, but it's not documented yet... 😴


~846K SLoC