Skip to content
jahalaPublic

About

A native macOS markdown viewer with Finder quick look and iTerm2/vscode theme support

Resources

Stars

14 stars

Watchers

0 watching

Forks

Repository files navigation

mrkd

A native macOS markdown viewer built with AppKit and TextKit 2. Fast, lightweight, and designed to feel like a first-party Mac app.

No Electron. No WebView. Markdown is parsed with cmark-gfm and rendered directly to NSAttributedString via TextKit 2 -- native text selection, native accessibility.

Built for reading markdown that something else is writing: open a file and it keeps up as an AI coding agent, or your editor, rewrites it underneath you.

Features

  • Native rendering -- GFM markdown via cmark-gfm, styled with NSAttributedString
  • Live reload -- edits on disk appear immediately, with your reading position kept and the blocks that changed briefly marked
  • Command line -- mrkd FILE, mrkd to reopen the last document, or cat plan.md | mrkd to pipe markdown in
  • Find in page -- Cmd F, themed to the document, in the app and in Quick Look
  • Math -- $inline$ and $$display$$ LaTeX rendered natively via SwaTex, no JavaScript
  • Mermaid -- flowcharts, sequence diagrams and the rest, rendered natively via merman and themed to match the document
  • Agent tags -- tag pairs that coding agents write, like <example> or <thinking>, show as labelled boxes with the markdown inside rendered. Reasoning such as <thinking> sits back on a grey fill in muted text. Real HTML tags such as <div> show as before.
  • Themes -- Built-in themes and import your own from iTerm2 or VS Code
  • Typography -- Variable font support with configurable body and code fonts (Geist, Inter, iA Writer Mono, JetBrains Mono, and more)
  • Reading width -- Narrow, Standard, Wide or Full Window text column, in every window and in Quick Look
  • Open in -- Send the current file to any app on your Mac with one click
  • Quick Look -- Preview markdown files in Finder with your selected theme, fonts, and an Open in button. The preview can only reach mrkd's fonts when the app is in /Applications. mrkd checks at launch that Quick Look uses this copy's preview, and offers to fix it when the preview is switched off, missing, or taken by another copy of mrkd.
  • Performance -- Tiered rendering pipeline for files of any size
  • Accessibility -- VoiceOver, Full Keyboard Access, Increase Contrast, Reduce Transparency

Requirements

  • macOS 15.0+ (Apple silicon)
  • Xcode 16+

Building

git clone https://github.com/jahala/mrkd.git
cd mrkd
open mrkd.xcodeproj

Mermaid rendering is a small Rust library over merman, so build it first:

./scripts/build-mermaid.sh

That needs a Rust toolchain (rustup.rs) and has to run before swift test or an Xcode build -- both link against it. Then build and run the mrkd scheme in Xcode. Code signing is set to Automatic -- Xcode will use your own developer identity.

Usage

Open any .md, .markdown, or .mdown file with mrkd. You can also drag files onto the Dock icon or use File > Open.

Keyboard shortcuts:

  • Cmd + / Cmd - / Cmd 0 -- Adjust font size
  • Cmd O -- Open file
  • Cmd F / Cmd G / Cmd Shift G -- Find, find next, find previous
  • Space / Shift-Space -- Page down / up

Command line: install the mrkd command from Settings, then:

mrkd README.md        # open a file
mrkd                  # reopen the last document
cat plan.md | mrkd    # render piped markdown

Settings (Cmd ,): Choose a theme, body font, font size, reading width, and code font. Import custom themes from iTerm2 .itermcolors or VS Code .json theme files. The Quick Look section shows whether Finder will use this copy of mrkd for previews, with a button to fix it, and turns the check at launch on or off.

License

MIT. See LICENSE.

Bundled fonts are distributed under their respective open-source licenses (SIL OFL 1.1 or Apache 2.0).

About

A native macOS markdown viewer with Finder quick look and iTerm2/vscode theme support

Resources

Stars

14 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages