macOS · Swift · open source

MDViewer

A fast, offline, read-only Markdown viewer for macOS.
Edit in any editor and the preview follows, without losing your place.

View on GitHub Build & install

Version 0.1.0 · macOS 13+ · MIT licensed

What it does

Live refresh

Watches the file and its folder, so saves from any editor usually show up in well under a second. That includes editors that save by replacing the file, and documents in /tmp.

Keeps your place

A refresh keeps the block you were reading in view, even when text above it changes. Turn on Follow Changes (⇧⌘F) to jump to each edit and briefly highlight it.

Images refresh too

Overwrite, replace, delete or add a referenced PNG, JPEG, GIF or WebP and the preview updates without touching the Markdown.

Readable output

Tables, task lists, strikethrough and code highlighting for JavaScript, TypeScript, JSON, CSS, HTML/XML, Bash, Python and Swift. Follows light and dark mode.

Native and quick

Swift/AppKit with WebKit rendering. Find (⌘F), zoom (⌘+ / ⌘− / ⌘0), one window per file, and links to other Markdown files open in MDViewer.

Works with your tools

Set it as the default app for .md, and open notes.md, Finder and other apps route to it. Your editor stays your editor.

Private by design

The app isn't App Sandbox-enabled; containment is enforced by the app itself. Details are in the README.

Build & install

MDViewer is distributed as source. You need macOS 13 or later, the Xcode Command Line Tools (xcode-select --install; full Xcode isn't required) and Python 3.

git clone https://github.com/guneriu/mdviewer.git && cd mdviewer
CONFIGURATION=release bash scripts/package.sh   # build and sign locally
bash scripts/install.sh --dry-run               # see what will happen
bash scripts/install.sh --install               # copy to ~/Applications/MDViewer.app
open -a ~/Applications/MDViewer.app README.md

To make it the default viewer, select a .md file in Finder, choose Get Info → Open with → MDViewer → Change All. Check the installed version under MDViewer → About MDViewer. To update, quit the app and run bash scripts/install.sh --install --replace.

To view in MDViewer while another app stays the default:

alias mdv='open -b de.local.mdviewer'   # then: mdv README.md