Installation
Linux / macOS / Android
The recommended way to install leaf:
curl -fsSL https://leaf.rivolink.mg/install.sh | sh
This downloads the latest binary for your platform and places it in a directory on your PATH.
Windows (PowerShell)
irm https://leaf.rivolink.mg/install.ps1 | iex
npm
If you have Node.js installed:
npm install -g @rivolink/leaf
Supported platforms: macOS (x64, ARM), Linux (x64, ARM), Windows (x64), Android (ARM64).
ArchLinux (AUR)
Use an AUR helper, such as yay:
yay -S leaf-markdown-viewer
Build from Source
Requires Rust toolchain:
git clone https://github.com/RivoLink/leaf.git
cd leaf
cargo build --release
The binary will be at target/release/leaf.
Updating
Update to the latest version:
leaf --update
leaf verifies downloads with SHA256 checksums for security.
Shell Completion
To install auto-completion scripts for your shell (Bash, Zsh, Fish, or PowerShell):
leaf --auto-complete
Restart your terminal or source your config file (e.g., source ~/.zshrc) to activate. See the Shell Completion guide for more details.