A terminal markdown reader built with Rust, ratatui, and crossterm. Renders markdown with syntax highlighting, word wrapping, and live file watching — all without leaving the terminal.

Run meld with no arguments to get a file browser that lists .md and .markdown files in the current directory. Select a file to open it in reader mode. Run meld <file.md> to jump straight to reading.

Features

  • File browser — directories first, then markdown files, hidden files excluded. Navigate with arrow keys or j/k
  • Markdown rendering — headings, bold, italic, code blocks with syntax highlighting, blockquotes, ordered/unordered lists, task lists, horizontal rules
  • Word wrapping — proper continuation indentation for nested lists
  • Live reload — file watcher detects changes and re-renders automatically
  • Search — press / to search, n/N to jump between matches
  • 6 themes — synthwave, monochrome, ocean, sunset, matrix, tokyo night moon — cycle with t or open the theme picker
  • External editor — press e to open the file in $EDITOR
  • Help modal — press ? for a keybinding reference

Key bindings

KeyAction
j / k / arrowsScroll up/down
g / GJump to top/bottom
Ctrl-d / Ctrl-uHalf-page scroll
/Search
n / NNext/previous match
tCycle theme
eOpen in $EDITOR
?Help
EscBack to browser
qQuit

Architecture

Single-threaded event loop. Input is polled via crossterm, and an AtomicBool flag set by the notify file watcher triggers reloads. The rendering pipeline parses the full markdown source into styled lines using pulldown-cmark on each draw, slices by scroll offset, and hands it to ratatui. Only redraws when state actually changes.

Code