Native Rust markdown viewer — Mermaid, Graphviz DOT, LaTeX math, mind maps. No Electron, no browser. ~150ms cold start. Agent-controllable via IPC. MIT.
翻译准备中
正在加载完整 README。
查看完整 README ↗A native Rust markdown viewer, scriptable over an IPC socket.
Built with AI (Claude Code and Codex). A human sets direction, tests, and reviews. How this was built.
rmdv.mclee.dev · Download · MIT
rmdv (Rust Markdown Viewer) is a fast, read-focused desktop app for browsing folders of .md files. It renders Markdown, Mermaid diagrams, Graphviz DOT graphs, block LaTeX math, and JSON/YAML mind maps without Electron, an embedded browser, or a JavaScript runtime. On macOS and Linux, it can also open text PDFs as locally extracted Markdown via PDFium.
It also exposes a scriptable IPC socket. Any program or agent (Claude Code, Codex, Cursor, a shell script) can drive the running window through the rmdv CLI: open files, scroll to a section, switch view mode, dump state.
rmdv is for reading a folder of Markdown files without starting a vault, an editor-first workflow, or a static-site build. It is a pure-Rust GUI built with Iced, with native Mermaid/DOT/LaTeX rendering and a machine-readable IPC control interface.
$$…$$) via a pure-Rust layout engine (iced_math); no MathJax, no KaTeX⌘M): any Markdown, JSON, or YAML document as a collapsible tree⌘⇧M): navigate folders and files as a bounded, keyboard-first graph= / − / 0, mouse wheel, touch pinch, and macOS trackpad pinch.pdf and read it as rendered Markdown; text extracted locally via liteparse (PDFium), no cloud, no LLM (macOS + Linux; view-only)⌘⇧F): Zed-style full-page results across every file in the workspace⌘F)⌘⇧P) and quick file finder (⌘P)⌘E)j/k/g/G and Home/End scroll the reader; ⌥⌘1–9 assigns
the current file to a Quick Slot (it asks before replacing another file) and
⌘↑/⌘↓ cycles slots outside
Zen, while Zen keeps Command arrows for native document motion; heading fold
is ⌘K 0–6| Native Mermaid / DOT / LaTeX | Full Mindmap workspace (⌘⇧M) |
Document Mindmap (⌘M) | Tree-sitter highlighting |
Vault-wide search (⌘⇧F) | 10 built-in theme presets |
| Live reload |
More on rmdv.mclee.dev.
Download the latest build from Releases:
rmdv_*_aarch64.dmgrmdv_*_x86_64.dmgrmdv-*-x86_64.AppImage (chmod +x then run)After opening the macOS app for the first time, use the CLI installation toast
or run Install CLI from the command palette. This creates
/usr/local/bin/rmdv, pointing to the binary inside the app bundle.
On Linux, launch the AppImage once and use the same toast or command-palette
action. This creates ~/.local/bin/rmdv, pointing to the AppImage. Keep
~/.local/bin on your PATH if your shell does not already include it.
git clone https://github.com/minchenlee/rmdv && cd rmdv
cargo build --release
./target/release/rmdv path/to/file.md
Requires Rust 1.95+. On Windows, build with cargo build --release --no-default-features; PDF text extraction is currently available on macOS and
Linux only.
rmdv is single-instance. The first invocation opens a window and an IPC listener; subsequent invocations talk to it and return one-line JSON.
# open a file at a specific line
rmdv path/to/foo.md --line 42
# drive the running instance
rmdv goto --section "Install/Setup"
rmdv mode mindmap
rmdv current # prints JSON state
# stateless — no running instance needed
rmdv list-sections path/to/foo.md # JSON array of headings
rmdv --pretty list-sections foo.md
Designed for coding agents (Claude Code, Codex, Cursor) to pull rmdv to the relevant section of a file without manual navigation. rmdv list-sections spec.md | jq works as a pure stateless command even when rmdv isn't running.
Full Mindmap Mode (⌘⇧M) is an opt-in workspace navigator for seeing folders,
files, and their structure as one graph. It is separate from document Mindmap
(⌘M), so switching surfaces does not replace the document you are reading.
| Key | Action | Key | Action | |
|---|---|---|---|---|
⌘P | File finder | ⌘M | Document Mindmap | |
⌘⇧M | Full Mindmap workspace | ⌘⌥W | Cycle Mindmap panel width | |
⌘R | Refresh current file / folder | ⌘⌥R | Reveal file in Finder | |
⌘⌥C | Copy focused file path | ⌘E | Toggle edit mode | |
⌘⇧P | Command palette | ⌘S | Save | |
⌘O | Open folder | ⌘T | Toggle theme | |
⌘B | Toggle sidebar | ⌘K 0–6 | Fold headings to level | |
⌘F | Search in document | ⌘/ | Shortcut cheatsheet | |
= / − | Mindmap zoom in / out | 0 | Reset mindmap zoom | |
⌘⇧F | Search whole vault | j / k | Scroll down / up | |
g / G | Top / bottom | Space / ⇧Space | Page down / up | |
⌘1–9 | Activate Quick Slot 1–9 | ⌥⌘1–9 | Assign file to Quick Slot 1–9 | |
⌘↑ / ⌘↓ | Previous / next slot (outside Zen) | ⌘W | Close active slot | |
⌘⇧W | Close window | Esc | Exit Full Mindmap / close overlay |
The following v0.2.0 measurements were taken on an Apple M2 MacBook Pro, median of five runs. Current builds may differ.
| Metric | Value |
|---|---|
| Cold start to first paint | ~150 ms |
| Parse a 10,000-line (~1 MB) document | 8.1 ms |
The renderer is viewport-aware: only blocks intersecting the visible viewport become widgets. Hot reload re-highlights only changed code blocks.
See docs/benchmarks.md for the full table and how to reproduce.
The demo/ folder is a sample vault exercising every feature: Mermaid, DOT, LaTeX, mind maps, nested folders, vault search. Open it with rmdv demo/.
rmdv is written by AI: Claude (Anthropic) via Claude Code, with OpenAI Codex for some changes and for code review. The repository is open; read the code and judge it on its merits.
My role was direction, not authorship:
docs/benchmarks.mdI'm disclosing this because it's true and because the code should stand on its own. If something is wrong, open an issue.
Rust, with Iced for the GUI (pure native widgets, no webview), pulldown-cmark for Markdown parsing, and tree-sitter for syntax highlighting.
| Area | Crate |
|---|---|
| GUI | iced |
| Markdown | pulldown-cmark |
| Syntax highlighting | tree-sitter + per-language grammars (rust, python, js, ts, go, c, cpp, java, sql, bash, json, html, md, yaml, toml) |
| Mermaid diagrams | merman + layout-rs |
| LaTeX math | iced_math (pure-Rust layout engine) |
| SVG rasterization | resvg |
| PDF text extraction | liteparse (PDFium) |
| Images | image |
| File watching | notify |
| HTTP (update + remote images) | reqwest |
| Async runtime | tokio |
| IPC | interprocess |
| CLI | clap |
MIT — see LICENSE.
| Serialization | serde (+ json/yaml/toml) |
| Clipboard | arboard |