PCTUTU.comBack to PCTUTU.com
GitHub projects
mdviewerUtilities
Category
Utilities
Publisher
mmmikael
Repository
Open repository
Release
Open release
Current version
v0.3.2
Release date
2026-10-24
Package size
macOS 5.6 MB
Utilities · mmmikael

mdviewer

A fast, native Markdown viewer for macOS, made for the long docs coding agents write: live reload, one key AI summaries, Quick Look previews, diagrams and math. Free and open source.

Version v0.3.2
Available for macOS

README

MDViewer

A fast, native Markdown viewer for macOS, made for the long docs coding agents write:
live reload, one-key AI summaries, Quick Look previews, diagrams and math. Free and open source.

Latest release macOS 13 or later Signed and notarized MIT license

Download for macOS · Website · or brew install --cask mmmikael/tap/mdviewer

MDViewer showing a document with a table of contents, a note, highlighted code, a math formula and a diagram

Why MDViewer

  • Feels like a Mac app. Native windows, tabs and menus, a translucent sidebar with the table of contents, light and dark mode. A 6 MB download that opens instantly.
  • Live reload. Keep it next to your editor, or next to the AI tool writing your docs: every save shows up right away, and you keep your place.
  • Quick Look. Press space on a .md file in Finder for a rendered preview, diagrams and math included.
  • Renders what GitHub renders. Tables, task lists, footnotes, alerts, front matter, syntax highlighting for 200+ languages, Mermaid diagrams, KaTeX math, and local images.
  • TL;DR for long docs. One click summarizes a document, with links to the sections it draws from, as a list or as a Mermaid diagram of the whole document, using the AI provider and model you choose: OpenRouter, OpenAI, Anthropic, Gemini, Grok and more with your own key, or a model running on your Mac with Ollama or LM Studio. The instructions are yours to edit.
  • Share it. Export as PDF or as a single self-contained HTML file, or copy as rich text to paste into Mail, Google Docs or Slack.
  • Private and safe. No accounts, no tracking. Documents can't run scripts, and the app only reads the files you open and the images they show.

Made for reading what coding agents write

Claude Code, Cursor, Codex and friends produce long plans, reports and design docs. Keep MDViewer open next to the agent: every save shows up right away, and ⇧⌘S gives you the TL;DR, as a list or a diagram, before you dive in.

To have your agent open its documents for you, add a line like this to your AGENTS.md or CLAUDE.md:

When you write or update a plan, report or other long Markdown document, open it for review with `open -a MDViewer <file>`.

Live reload

A checklist document updating in MDViewer as the file is saved: text appears, items get ticked, a table row, a diagram node and a new section are added

TL;DR for long documents

Coding agents write long plans and reports. Press ⇧⌘S for a short summary at the top, with links to the sections each point comes from. Here, a 14 KB plan written by an agent summarized by DeepSeek V4.1 Flash through OpenRouter, at real speed (about $0.001):

MDViewer scrolls through a long agent-written migration plan, then the Summarize button is clicked: a TL;DR card streams in at the top with bullet points linking to sections, and clicking one jumps to the Options considered section

Quick Look

Select a Markdown file in Finder and press the space bar:

Quick Look preview of a Markdown document rendered by MDViewer

How it compares

MDViewer Marked 2 Typora MacDown 3000
What it is Viewer Previewer Editor Editor with preview
Price Free Paid Paid Free
Open source Yes No No Yes

MDViewer is for reading: you write Markdown in your own editor (or let your tools write it) and read it here. If you'd rather edit in the same app, Typora or MacDown 3000 (the maintained continuation of MacDown) are good choices.

Where MDViewer differs from MacDown 3000:

MDViewer MacDown 3000
Quick Look preview Diagrams, math and highlighted code Math as plain text; diagrams and code as plain code blocks
GitHub alert boxes (> [!NOTE]) Yes No
Copying for Mail, Docs or Slack Formatted text, of the whole document or just the selection HTML source of the whole document
Opening a file Straight to the rendered page Editor with a preview pane

All features

  • Opens .md files from Finder, the Dock, drag and drop, ⌘O, Open Recent and open -a MDViewer file.md; can be made the default app for Markdown from Settings
  • Find in page, zoom, back and forward between linked documents; hovering a link shows where it goes, like Safari
  • Print, Export as PDF, Export as HTML, Copy as Rich Text
  • AI summaries (View ▸ Summarize, ⇧⌘S): keys stay in the macOS keychain, documents are only sent when you ask (and the app asks first for each provider), long documents are read in parts (notes are merged until they fit the model), summaries are kept with each file, and the List / Diagram switch draws a Mermaid diagram whose nodes link to their sections
  • Links to other Markdown files open in the app; links to websites open in your browser

Install

Requires macOS 13 or later.

With Homebrew:

brew install --cask mmmikael/tap/mdviewer

brew upgrade keeps it up to date.

Or download it:

  1. Download the .dmg for your Mac from the latest release:
    • Apple silicon (M1 and later): MDViewer_<version>_aarch64.dmg
    • Intel: MDViewer_<version>_x64.dmg
    • Not sure? MDViewer_<version>_universal.dmg works on both, but is bigger. Apple menu ▸ About This Mac shows which chip you have.
  2. Open it and drag MDViewer to Applications.
  3. Open MDViewer. Releases are signed and notarised by Apple, so it opens like any other app. (Versions before 0.3.1 weren't: macOS asked you to click Open Anyway in System Settings ▸ Privacy & Security.)
  4. To open Markdown files with MDViewer when you double-click them, choose MDViewer ▸ Settings… and click Make Default.

Development

MDViewer is built with Tauri 2 (Rust) and Svelte 5. See PLAN.md for the design and the reasoning behind it.

Requirements: Rust (1.89+), Node 22+, pnpm, Xcode command line tools.

pnpm install
pnpm tauri dev

Open a file at startup: pnpm tauri dev -- -- "$PWD/tests/fixtures/rich.md". Frontend changes hot-reload; Rust changes rebuild and restart the app.

UI in a browser: while pnpm dev (or tauri dev) runs, open http://127.0.0.1:1420/?file=rich.md in any browser. Tauri's IPC is mocked by src/dev/mockTauri.ts (dev builds only). Use ?window=settings for the Settings window, and mdv.menu("find") / mdv.edit("# new content") in the console to simulate menu actions and file changes.

Script What it does
pnpm test Vitest: Markdown pipeline, sanitising, links, images, TOC, find, summary prompts
cargo test --manifest-path src-tauri/Cargo.toml Rust: document registry, file reading, settings, watcher matching, AI requests and streams
pnpm lint svelte-check, cargo fmt --check, cargo clippy -D warnings
pnpm tauri:build Release .app and .dmg for this Mac's architecture
pnpm tauri:build:universal Universal (Apple silicon + Intel) build; needs rustup target add x86_64-apple-darwin

Build output: src-tauri/target/release/bundle/ (about 8 MB app, 6 MB DMG).

Quick Look extension

quicklook/ holds a small Quick Look preview extension (Swift, no Xcode project). quicklook/build.sh builds the preview page from src/quicklook/ (the app's Markdown pipeline with a bundled subset of languages; Mermaid's single-file build is shipped next to it and loaded only for documents with diagrams; the app loads that same file through its mdvres:// scheme (src-tauri/src/resources.rs), so the bundle carries Mermaid once), compiles the extension and signs it; tauri build runs it before bundling and copies the result into MDViewer.app/Contents/PlugIns. To try a build's extension without installing it:

qlmanage -p tests/fixtures/rich.md

Project layout

src/                       Web UI (Svelte 5 + TypeScript)
  DocumentWindow.svelte    Document window: rendering, links, find, zoom, history
  SettingsWindow.svelte    Settings window
  lib/markdown/            markdown-it setup, Shiki, Mermaid, sanitising + DOM post-processing
  lib/export.ts            Standalone HTML export and rich-text clipboard HTML
  lib/tldr.ts              AI summary prompts, splitting long documents, saved summaries
  components/Tldr.svelte   The summary card above the document
  lib/ipc.ts               Typed wrappers for Rust commands and events
  quicklook/               Quick Look preview page (main.ts, bundled language subset)
  dev/mockTauri.ts         IPC mocks for running the UI in a browser
src-tauri/src/
  lib.rs                   App setup and lifecycle (Finder opens, Dock reopen, window events)
  documents.rs             Window ↔ file registry, window creation, Open dialog, asset scope
  watcher.rs               File watching (watches the folder, so atomic saves work)
  menu.rs                  Menu bar, Open Recent, menu actions
  settings.rs              Settings and recent files (store plugin)
  export.rs                Export as PDF (WebKit print to file), save panel, rich-text clipboard
  platform.rs              AppKit bits: Dock recents, clipboard, traffic light position
  ai/                      AI providers, streaming over NSURLSession, API keys in the keychain
quicklook/                 Quick Look extension: Swift controller, Info.plist, build script
tests/                     Vitest tests and Markdown fixtures

Notes

  • Versions are pinned to Tauri 2.11 / plugin 2.4–2.7 because newer plugin crates need Rust 1.90. Keep the JS packages (@tauri-apps/*) on the same minor versions as their Rust crates when upgrading.
  • Title bar: document windows get an empty unified NSToolbar (platform.rs), so macOS itself lays out a tall title bar and places the window buttons, as in Mail or Notes. The page asks for their position (window_chrome) and lines up its toolbar and sidebar button with them. (Moving the buttons by hand made them jump while resizing.)
  • AI summaries: the page builds the prompts, Rust adds the key and sends them through NSURLSession (no HTTP library in the app), streaming the reply back over a Tauri channel. Most providers speak the OpenAI chat-completions format; Anthropic gets its Messages format. Keys never reach the web view.
  • Security: documents are sanitised with DOMPurify, scripts never run, the web view can't navigate away from the app, and
Publisher informationSoftware details and release files are provided by the publisher.

Release notes

MDViewer v0.3.2