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/Nto jump between matches - 6 themes — synthwave, monochrome, ocean, sunset, matrix, tokyo night moon — cycle with
tor open the theme picker - External editor — press
eto open the file in$EDITOR - Help modal — press
?for a keybinding reference
Key bindings
| Key | Action |
|---|---|
j / k / arrows | Scroll up/down |
g / G | Jump to top/bottom |
Ctrl-d / Ctrl-u | Half-page scroll |
/ | Search |
n / N | Next/previous match |
t | Cycle theme |
e | Open in $EDITOR |
? | Help |
Esc | Back to browser |
q | Quit |
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.