























A terminal-based Markdown previewer with a GUI-like experience. Rich rendering, interactive navigation, and editor integration — all without leaving your terminal.
leaf
════
Terminal Markdown previewer — GUI-like experience.
leaf lets you read Markdown files directly in the terminal with a clean, focused interface. Designed for developers, CLI users, and AI-assisted workflows.
Usage
─────
bash
12345
leaf README.md# Open a file
leaf -w README.md# Watch mode
leaf# Fuzzy picker
leaf --picker# Directory browser
cat file.md | leaf# Stdin
leaf leaf-summary.md ⟳ watch ctrl+e edit · ctrl+f find · t toc · ? help · q quit
Previewing Markdown shouldn't mean switching to a browser or a heavy GUI app.
For a quick preview, you don't need a full web application with login and setup.
Existing terminal tools dump Markdown as plain text — no navigation, no search, no style.
Beautiful code blocks with syntax coloring for 40+ languages. Line numbers, decorative frames, and language labels included.

Markdown tables rendered with Unicode box-drawing borders, column alignment, and inline code support.

Inline and block math formulas converted to Unicode symbols — no external renderer needed.

Flowcharts, sequence diagrams, and pie charts rendered as ASCII art directly in the terminal.

Auto-reload when the file changes on disk. Scroll position is preserved. Toggle with -w flag or press w.

Press Ctrl+E to open in your editor. leaf detects vim, nano, VS Code, and more — reloads preview on return.

Fuzzy finder with Ctrl+P or directory browser with --picker. Scan and open any Markdown file instantly.

Sidebar TOC with heading hierarchy and active section tracking. Toggle with t, jump with 1-9.

Press / to search. Matches are highlighted with a counter. Navigate with n/N.

Vim-like keybindings — j/k, d/u, g/G. Mouse scroll and scrollbar click supported too.

4 built-in themes — Arctic, Forest, Ocean, Solarized-Dark. Live preview with Shift+T.

40+ languages with beautiful color themes.
Arctic, Forest, Ocean, Solarized-Dark with live preview.
Find anything with highlighted matches and keyboard navigation.
Interactive table of contents with active section tracking.
Pipe output from any tool — claude, aichat, cat — directly into leaf.
One-command update with SHA256 verification.
Pipe output from Claude, ChatGPT, or any AI tool directly into a beautiful preview.
$ claude "explain Rust" | leaf
Preview your README, CHANGELOG, or any docs with live reload as you edit.
$ leaf --watch README.md
Open fuzzy finder, navigate directories, and preview any Markdown file instantly.
$ leaf
leaf runs on macOS (Intel & Apple Silicon), Linux (x64 & ARM), Windows, and Android via Termux.
Run `leaf --update` — it downloads the latest release and verifies it with SHA256.
Yes! leaf ships with 4 themes (Arctic, Forest, Ocean, Solarized-Dark). Switch with Shift+T or set a default in config.toml.
Absolutely. Pipe any Markdown content: `cat notes.md | leaf` or `claude "explain X" | leaf`.
Yes, leaf is MIT licensed and hosted on GitHub.
Install in one command and start previewing Markdown in your terminal.
$ curl -fsSL https://leaf.rivolink.mg/install.sh | sh
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。