Skip to content

Repository files navigation

Leaf

A free, local-first, read-only Markdown desktop app built with Tauri 2, Vue 3, TypeScript, and Rust/Comrak.

Leaf's reading surface

Run the desktop app

Prerequisites: Node.js 22+, npm, stable Rust (tested with 1.93), and the Tauri platform prerequisites. macOS builds require Xcode Command Line Tools.

npm ci
npm run desktop

Open a Markdown file with ⌘/Ctrl O, drag it into Leaf, or select Open sample. Open folder is optional. Nothing is imported or written into your document folders.

Build an installer

npm run package

Native artifacts are written to src-tauri/target/release/bundle/. On macOS, build only the app and disk image with npm run package -- --bundles app,dmg. Build on the target operating system for Windows/Linux packages. This repository does not include signing credentials.

Browser development preview

The preview uses the same Rust Comrak parser, through a loopback Vite adapter. It does not introduce a JavaScript Markdown parser. The native application does not run a web server.

npm run core:build
npm run dev

Open http://127.0.0.1:1420. Browser file selection, folder browsing, text rendering, tabs, search, themes, and downloads work. Native file watching, local asset grants, recent native files, OS file opening, and native dialogs require the desktop app. Production browser preview: npm run build && npm run preview (also needs core:build).

What is implemented

  • Native file/folder pickers, concurrent batch opening, CLI/OS open events, drag-and-drop, tabs and local navigation.
  • Concurrent Rust folder indexing with progress/cancellation, native search and paging, and a virtualized file list for large folders. Nonblocking loading indicators keep work visible.
  • A selectable, script-disabled reading frame, automatically following heading outline, case-aware literal search including collapsed details, and read-only source view.
  • System, Light, Dark, and Warm themes; serif/sans fonts; text size, reading width, line spacing, code wrapping.
  • CommonMark/GFM tables, task lists, alerts, footnotes, front matter, syntax highlighting, KaTeX, and bounded Mermaid flowchart/sequence support.
  • Capability-relative local file reads, image decoding and SVG rasterization, explicit external link confirmation, no unsolicited remote media requests.
  • Debounced file watching, atomic-save reconciliation, deferred refresh during selection, recent files, reading anchors, and private opening.
  • Script-free HTML export and explicitly labeled browser-assisted printing.
  • Searchable command palette, native menus, keyboard shortcuts, and automated Rust/browser tests.

Release status

0.1.0 development preview — not the completed v1 release contract. The original specification remains authoritative. Requirements status distinguishes implemented behavior, tested evidence, and remaining release gates. In particular, remote-image consent/fetching, visual math/diagram export, fully bounded caches and enhancement workers, signed updates, and signed/verified installers across all specified platforms remain release work. Large/complex files currently use an explicitly labeled complete source view.

Verify

npm run check
npm run test:e2e
cargo fmt --manifest-path src-tauri/Cargo.toml --check
cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings

Playwright requires Chromium and WebKit: npx playwright install chromium webkit. Tests use temporary files and never modify the original requirements document. Screenshots in docs/screenshots/ are browser evidence unless explicitly named native-*.

User guide · Architecture · Privacy and security · Compatibility · Release runbook · Measurements

MIT licensed. See LICENSE and third-party notices.

About

A Simple Markdown Reader

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages