惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
The GitHub Blog
The GitHub Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园_首页
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
T
The Blog of Author Tim Ferriss
The Cloudflare Blog

Hacker News

GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line
GitHub - RivoLink/leaf: Terminal Markdown previewer — GUI...
RivoLink · 2026-04-24 · via Hacker News

leaf

Terminal Markdown Previewer — GUI-like experience.

Install

Install the latest published binary.

macOS / Linux / Android / Termux:

curl -fsSL https://raw.githubusercontent.com/RivoLink/leaf/main/scripts/install.sh | sh

Windows:

irm https://raw.githubusercontent.com/RivoLink/leaf/main/scripts/install.ps1 | iex

npm:

npm install -g @rivolink/leaf

Verify the installation:

leaf --version

Update

Update an existing installation to the latest published release.

Self:

leaf --update

leaf --update downloads the matching published asset, verifies it against the published checksums.txt SHA256, and then installs it.

On Windows, if replacing the running .exe is blocked by the OS, rerun the PowerShell installer from the install section.

npm:

npm update -g @rivolink/leaf

Build

Clone the repository:

git clone https://github.com/RivoLink/leaf.git
cd leaf

Build the release binary locally:

cargo build --release

Create a local bin directory if needed and symlink leaf into it:

mkdir -p ~/.local/bin
ln -sf "$(pwd)/target/release/leaf" ~/.local/bin/leaf

If ~/.local/bin is not already on your PATH, add it to ~/.bashrc or ~/.zshrc:

export PATH="$HOME/.local/bin:$PATH"

Usage

# Open a Markdown file
leaf TESTING.md

# Watch mode — reloads automatically on save
leaf --watch TESTING.md
leaf -w TESTING.md

# Open the fuzzy Markdown picker
leaf

# Open the classic directory browser picker
leaf --picker

# Open the fuzzy Markdown picker, then watch the selected file
leaf -w

# Open the classic directory browser picker, then watch the selected file
leaf -w --picker

# Open a dash-prefixed filename
leaf -- -notes.md

# Stream Markdown from another CLI tool
claude "explain Rust lifetimes" | leaf

# Preview a local file through stdin
cat TESTING.md | leaf

Keybindings

Key Action
j / Scroll down
k / Scroll up
d / PgDn Page down (20 lines)
u / PgUp Page up (20 lines)
g / Home Top
G / End Bottom
t Toggle TOC sidebar
Shift+Sel Select text
Shift+T Open theme picker
Shift+E Open editor picker
Shift+P Open file browser
Ctrl+E Open in editor
Ctrl+P Open fuzzy picker
Ctrl+F / / Find
n / N Next / prev match
? Show help popup
r Force reload (watch mode)
q Quit

Features

  • Watch mode --watch / -w — reloads every 250ms, with ⟳ reloaded flash feedback
  • leaf --watch can start from the picker and begin watching after file selection
  • ✅ Syntax highlighting with common language aliases like py, cpp, json, toml, ps1, and dockerfile
  • ✅ Unicode box-drawing tables with left / center / right alignment
  • ✅ TOC sidebar with active section tracking and two-level navigation
  • ✅ Search with match highlighting, /, Ctrl+F, and n / N
  • ✅ Code blocks ┌─ lang ───┐
  • ✅ LaTeX math rendering — inline $...$ and display $$...$$ with Unicode conversion via unicodeit
  • ✅ LaTeX code blocks ```latex / ```tex rendered as formula blocks
  • ✅ Bold, italic, strikethrough, blockquotes, lists, and horizontal rules
  • ✅ YAML frontmatter is ignored in both preview and TOC
  • ✅ Native stdin input with bounded size
  • leaf --update to fetch, verify via published SHA256, and install the latest release on supported platforms
  • ✅ Fuzzy Markdown picker when launched without a file, or anytime with Ctrl+P
  • ✅ Classic directory browser picker with leaf --picker, or anytime with Shift+P
  • ✅ Theme picker with runtime preview
  • ✅ Help popup with in-app shortcuts

Typical AI Workflow

# Terminal 1: generate the file
aichat "..." > notes.md

# Terminal 2: live watch
leaf --watch notes.md

Roadmap

  • Themes (light / custom)
  • Copy code block y
  • Code block horizontal scroll
  • Improve search performance on large files

Troubleshooting

Windows: missing Visual C++ runtime

If leaf.exe does not start on Windows and reports a missing MSVC runtime, install the latest supported Microsoft Visual C++ Redistributable from Microsoft Learn:

Direct download for the latest supported X64 Microsoft Visual C++ Redistributable:

For leaf-windows-x86_64.exe, the relevant package is the latest supported X64 Visual C++ v14 Redistributable.

Windows: update or file replacement error

If leaf --update fails on Windows with an error about replacing, renaming, or writing leaf.exe, the running executable was likely locked by the OS.

Close any terminal session still running leaf, then rerun the PowerShell installer from the install section:

irm https://raw.githubusercontent.com/RivoLink/leaf/main/scripts/install.ps1 | iex

Uninstall

macOS / Linux / Android / Termux:

rm -f ~/.local/bin/leaf

Windows:

Remove-Item "$env:LOCALAPPDATA\Programs\leaf\leaf.exe" -Force

npm:

npm uninstall -g @rivolink/leaf