
π Leaf: Markdown Preview in the Terminal, Like a GUI App
If you work in the terminal and want to see your Markdown files rendered with formatting β without leaving the terminal β leaf is the tool you’ve been looking for.
β¨ What makes leaf special:
- ποΈ Watch mode (
--watch): auto-reloads on file save every 250ms - π¨ Syntax highlighting in code blocks with support for Python, JSON, TOML, Docker, etc.
- π TOC sidebar with active section tracking and two-level navigation
- π’ LaTeX rendering β math formulas in the terminal with Unicode conversion
- π Fuzzy file picker (
Ctrl+P) to quickly open any Markdown file - π¨ Theme picker with runtime preview
- π€ AI integration: perfect for use with tools like
aichat
# Quick install on macOS/Linux
curl -fsSL https://raw.githubusercontent.com/RivoLink/leaf/main/scripts/install.sh | sh
# Basic usage
leaf notes.md
# Watch mode
leaf --watch notes.md
# Pipe from Claude/AI
claude "explain Rust lifetimes" | leafWritten in Rust, available on macOS, Linux, Windows, Android/Termux, and via npm.
π‘ Explanation in a nutshell#
Leaf is like having VS Code or an editor with Markdown preview, but running entirely inside your command-line terminal. Instead of opening a browser or graphical editor to see how a .md file looks, leaf renders it with headings, tables, colors, and math formulas directly in the console. Ideal for developers who live in the terminal.
More information at the link π
Also published on LinkedIn.
