The people* have spoken: MDV is the best Markdown viewer for Mac.
It's like Preview... but for Markdown!
MDV comes with a command line tool called mdv that opens Markdown files from the terminal.
You can install the tool by choosing "Install Command Line Tool..." from the MDV menu. This will create a symlink in ~/.local/bin to the tool which is bundled within MDV.app, typically located in your Applications folder: /Applications/MDV.app/Contents/bin/mdv.
Make sure that ~/.local/bin is in your PATH.
mdv takes zero or more Markdown files or folders as arguments. For folder arguments, mdv will open all top-level Markdown files. If there are many Markdown files in a folder, mdv will prompt for confirmation before attempting to open all of them. You can supress this prompt with the --all option.
$ mdv --help
View Markdown files with MDV.app
Usage:
mdv [options] [file-or-folder ...]
Options:
--all Skip prompt for folders with many Markdown files
-h, --help Print this help message
$ mdv
$ mdv README.md AGENTS.md
$ mdv ~/Dev/github/MyRepo
$ mdv --all ~/Documents/Notes
MDV uses swift-cmark-gfm, highlight.js, Mermaid, and Sparkle.
* people = me and the voices in my head 😉