Skip to content
AlessandroLiscioPublic

About

Lightweight, open-source Markdown viewer. Reading first: outline, live reload, vault search, wiki-links, Mermaid, KaTeX, PDF export. Fully offline, no paywall.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Marklet

An open-source Markdown viewer. Reading first.

Open a .md file and read it like a webpage — outline, live reload, vault search, wiki-links, diagrams, math, PDF export. Fully offline. No account, no telemetry, no paywall.

Ships in two editions: Marklet, which is allowed to be beautiful, and Marklet Lite, which is held to 2.8 MiB by CI.

MIT licensed · Windows 11 and Linux · every feature free


Why this exists

Markdown editors are heavy because editing is heavy. But most of the time you are not editing — you are reading a README, a spec, a set of notes. mdview proved that a reading-first viewer can be 2 MB and start in under a second, and then put its best features behind a licence key.

Marklet drops the paywall and splits the difference the honest way, into two products. Lite keeps the constraint, enforced by CI rather than by good intentions: a pull request that pushes it over 2.8 MiB fails. The full edition is free of that constraint on purpose, and spends the room on the things a budget cannot justify.

Every feature is free in both. The source is here.

Status

Feature-complete for v1, not released. Everything described below is written, tested and building on Windows and Linux in CI. There is no tagged release yet, so there is nothing to download.

Three things are worth knowing before you build it yourself:

  • Nobody has looked at it. CI proves the app starts and creates its window; it does not prove anything is laid out correctly. There are no screenshots and no UI test suite — see docs/ci-cd.md, "What is not tested".
  • PDF export has never run. Both platform paths compile and are type-checked; neither has produced a file in CI, because that needs a printer backend and a display.
  • Not signed. SmartScreen will warn on first run until a certificate exists.

What it does

Reading — outline panel with scroll sync, live reload when an external editor saves, each open tab remembering the source line you left it at (for the session only — nothing is written to disk, so it is gone when the window closes), light and dark themes with an accent generator, adjustable font, density and column width with real reflow, aligned tables, footnotes with backlinks, local images, task lists, YAML frontmatter, syntax-highlighted code.

Vault — folder tree, full-text search across thousands of notes, [[wiki-links]] and a Links panel listing what the open note points at, notes and web links together, with a Linked from section for the notes pointing back. This is the part mdview does not have.

Rich content — KaTeX math in both editions; Mermaid diagrams with fullscreen zoom and pan in the full edition only, because Mermaid alone is 27% of Lite's entire ceiling. Both are bundled, both work with the network off, and both are fetched only when a document actually contains one — a plain note downloads neither.

Editing — F2 live preview in the Obsidian sense: the markdown syntax hides on lines your cursor is not on. F3 splits source and preview with two-way scroll sync. F4 opens your real editor at the cursor. Pasted images are written to disk and linked.

Export — PDF with proper pagination, standalone single-file HTML that opens anywhere with zero network requests, and PNG or SVG of any diagram. All three are produced from the page you are looking at, so what is exported is what you saw.

Two editions

Marklet ships as two products from one codebase, not one product with a stripped variant. Lite is the constrained one and carries the size promise; the full edition is deliberately not bound by it and is allowed to spend bytes on being good.

Marklet Lite Marklet
Installer ceiling 2.8 MiB — a promise 12 MiB — a tripwire for accidents
Cold start ceiling 1200 ms median 1800 ms median
Reading core, outline, live reload, per-tab position, reflow ✅ ✅
Tables, footnotes, task lists, frontmatter, local images ✅ ✅
Syntax highlighting, KaTeX math ✅ ✅
Editing — F2 live preview, F3 dual column, F4 external editor ✅ ✅
Export — PDF, standalone HTML, diagram SVG and PNG ✅ ✅
Vault — tree, [[wiki-links]], Links panel (outgoing links and linked-from) ✅ ✅
Mermaid diagrams ✗ ✅ with fullscreen zoom and pan
Vault search literal, multi-term ✅ plus full regex
Encoding BOM, UTF-8, UTF-16, cp1252 ✅ plus CJK auto-detection
Typography system fonts only ✅ curated bundled pairings, multiple palettes
Motion CSS state changes only ✅ considered transitions
Tabs ✅ ✅ several documents at once
Settings panel in the main window ⏳ dedicated window (#36)
Auto-update ✗ ⏳ (#38)

Where a row is ✅ on both sides, the two editions run the same code. Lite is never a worse implementation — it is the absence of a feature, or a narrower one that says so.

⏳ means planned and budgeted for, not written. The full edition's ceiling was set with room for these; they are listed so a later release adding one is not a surprise, and each one has an issue. Everything marked ✅ is in the tree.

Marklet is the default download. Choose Lite deliberately: when you want something small and fast, or your Markdown never contains a diagram.

docs/editions.md has the full table, the reasoning, and how the split is built.

On the numbers

Measured, not guessed. The ceilings were set from a 904 KiB empty shell produced by the first CI build, leaving about 1.9 MiB for the features; with the feature set above complete, the installers CI builds today are:

Installer Ceiling Cold start Ceiling
Marklet Lite 1.55 MiB 2.81 MiB ~0.6 s 1200 ms
Marklet 3.00 MiB 12.00 MiB ~0.6 s 1800 ms

A pull request that spends past an installer ceiling fails, and the gate comments the delta.

Cold start is the fastest of nine launches on a windows-latest runner, opening a 478 KB document, measured from process start to the window being created.

The fastest, not the average, and that choice is the whole story. Three release runs of identical bytes measured medians of 625 ms, 617 ms and 2153 ms; the third read 5802, 4391, 2153, 1723, 1222 — every launch faster than the one before, because the sequence was still warming. Both sources of error, filesystem warming and a shared runner's scheduling, can only make a launch slower. When the noise has a sign, the minimum is what the work actually costs and the average is a measurement of the machine's mood.

The first launch after an install is far slower — 3.3 s to 9.8 s. WebView2 creates its user data directory once, and how long that takes is the machine's business rather than ours. It is measured and reported on its own, never folded into the figure above, which is what every launch afterwards costs.

Rendering that same document with no window involved is 15–19 ms. These are runner numbers, not a promise about your machine.

Two caveats on the comparison with mdview. Its 2 MB is a number from its own README, not one we have measured; and these are download sizes, not what lands on disk — Marklet Lite unpacks to roughly 5 MiB. The honest claim is narrow: Marklet Lite downloads smaller than mdview says it does, with a vault, wiki-links, editing and export that it does not have.

Install

Download from Releases:

  • Windows 11 — marklet-setup.exe for the full edition, or marklet-lite-setup.exe for the small one. Per-user install, no administrator rights. marklet-offline-setup.exe embeds the WebView2 runtime for air-gapped machines.
  • Linux — .AppImage or .deb, full edition.

Marklet adds itself to the "Open with" list for .md rather than silently taking over the association. Making it the default is your call.

Known limitation. The Explorer context-menu entry appears under "Show more options", not at the top level. Windows 11's modern menu requires a packaged COM extension with MSIX identity, which is deferred to v2.

Every registry key Marklet writes is listed in docs/windows-integration.md, along with the one command that removes all of them. All of it is HKEY_CURRENT_USER; none of it needs administrator rights.

Command line

marklet <file.md>     Open a file
marklet --install     Register the file association and context menu (HKCU only)
marklet --unbind      Remove them, leaving no residual registry keys
marklet --uninstall   Unbind and remove the context-menu verbs
marklet --settings    Open with the settings panel showing
marklet --help
Variable Effect
MD_HTML=1 Render to standalone HTML on stdout and exit, without opening a window
MD_HTML_OUTPUT Write that HTML to a path instead of stdout
MD_EDITOR Command run by F4. Unset, Marklet tries code, subl, notepad++, gedit, notepad in that order and uses the first that starts. Set, it is the only one tried — a chosen editor that fails to start is a failure worth seeing, not a reason to open a different one. Line and column are placed from a table of known editors; %f, %l and %c in the value override it

Keyboard

Key What it does
F2 Live preview — edit the markdown with its syntax hidden on lines your cursor is not on
F3 Split — plain source on the left, rendered preview on the right, scroll-synced both ways
F4 Open the file in your own editor at the cursor — works from anywhere, including with the editor focused
Ctrl+E The same, but not while a text field or the editor has focus
Esc Back to reading
Ctrl+O / Ctrl+Shift+O Open a file / a folder, at any time
Ctrl+W Close the current tab
Ctrl+Shift+T Reopen the last closed tab
Ctrl+Tab / Ctrl+Shift+Tab Next / previous tab
Ctrl+P Export a PDF — not while a text field or the editor has focus
Ctrl+Shift+S Export a standalone HTML file — same restriction

Ctrl+E, Ctrl+P and Ctrl+Shift+S step aside whenever a text field has focus, so that a shortcut never eats keystrokes in a form. The editing surface of F2 and F3 is a text field too, which is why only F4 reaches your editor while you are typing.

Both exports are also on the activity bar, under the Export button at the bottom, which asks for the format and then opens your system's save dialog pre-filled with the document's own name — so the file is yours to name and to place, and it works with the editor focused. Both formats are produced from what is on screen, so diagrams and maths are in them; MD_HTML=1 renders the same document without a webview and therefore without either.

A Mermaid diagram opens fullscreen on click, with wheel-zoom and drag-pan; Save SVG and Save PNG write it into assets/ beside the note.

Build from source

git clone https://github.com/AlessandroLiscio/Marklet
cd Marklet
./scripts/setup-linux.sh   # once per machine; needs sudo for system packages
./scripts/dev.sh           # dev loop

Windows installers come from GitHub Actions windows-latest. Tauri's own documentation calls Linux-to-Windows cross-compilation a last resort, so we do not rely on it — push a branch and take the artifact.

Architecture

Tauri 2 with a Rust core and a Svelte 5 chrome. Markdown is parsed in Rust by pulldown-cmark, whose offset iterator gives the byte range of every block — one primitive that scroll sync, scroll restore, the outline and byte-exact block editing all read.

The rendered document is deliberately outside the Svelte tree: a 3 MB markdown file must not go through a reactive renderer. The frontend holds no filesystem, shell or http permission; every privileged action is a validated Rust command.

docs/architecture.md has the reasoning, including what was rejected and why.

Contributing

Read CLAUDE.md first — it states the invariants, and most of them exist because breaking them costs the project its reason to exist. In particular: any new dependency arrives with its measured compressed size.

Licence

MIT. See LICENSE.

About

Lightweight, open-source Markdown viewer. Reading first: outline, live reload, vault search, wiki-links, Mermaid, KaTeX, PDF export. Fully offline, no paywall.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages