[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74689":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},74689,"leaf","RivoLink\u002Fleaf","RivoLink","Terminal Markdown previewer — GUI-like experience.","https:\u002F\u002Fleaf.rivolink.mg",null,"Rust",1434,60,4,1,0,8,49,303,24,99.36,"MIT License",false,"main",[26,27,28,29,30,31],"markdown","markdown-viewer","preview","terminal","termux","tui","2026-06-12 04:01:15","\u003Cp align=\"center\">\n  \u003Cimg src=\"images\u002Flogo-wordmark.svg\" alt=\"leaf\" width=\"360\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  Terminal Markdown previewer — GUI-like experience.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"images\u002Fpreview.png\" alt=\"leaf\" width=\"710px\" \u002F>\u003Cbr>\n  \u003Csub>See more screenshots in the \u003Ca href=\"demo\u002FREADME.md\">features\u003C\u002Fa> demo\u003C\u002Fsub>\n\u003C\u002Fp>\n\n## Install\n\nInstall the latest published binary.\n\n**macOS \u002F Linux \u002F Android \u002F Termux:**\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FRivoLink\u002Fleaf\u002Fmain\u002Fscripts\u002Finstall.sh | sh\n```\n\n**Windows:**\n\n```powershell\nirm https:\u002F\u002Fraw.githubusercontent.com\u002FRivoLink\u002Fleaf\u002Fmain\u002Fscripts\u002Finstall.ps1 | iex\n```\n\n**npm:**\n\n```bash\nnpm install -g @rivolink\u002Fleaf\n```\n\n**ArchLinux (AUR):**\n\nUse an [AUR helper](https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FAUR_helpers), such as `yay`:\n\n```bash\nyay -S leaf-markdown-viewer\n```\n\n**Verify the installation:**\n\n```bash\nleaf --version\n```\n\n## Update\n\nUpdate an existing installation to the latest published release.\n\n**Self:**\n\n```bash\nleaf --update\n```\n\n`leaf --update` downloads the matching published asset, verifies it against the published `checksums.txt` SHA256, and then installs it.\n\nOn Windows, if replacing the running `.exe` is blocked by the OS, rerun the PowerShell installer from the install section.\n\n**npm:**\n\n```bash\nnpm update -g @rivolink\u002Fleaf\n```\n\n## Usage\n\n```bash\n# Open a Markdown file\nleaf TESTING.md\n\n# Watch mode — reloads automatically on save\nleaf --watch TESTING.md\nleaf -w TESTING.md\n\n# Open the fuzzy Markdown picker\nleaf\n\n# Open the classic directory browser picker\nleaf --picker\n\n# Open the fuzzy Markdown picker, then watch the selected file\nleaf -w\n\n# Open the classic directory browser picker, then watch the selected file\nleaf -w --picker\n\n# Open a dash-prefixed filename\nleaf -- -notes.md\n\n# Stream Markdown from another CLI tool\nclaude \"explain Rust lifetimes\" | leaf\n\n# Preview a local file through stdin\ncat TESTING.md | leaf\n```\n\n## Inline Mode\n\nRender Markdown directly to **stdout** without the interactive TUI:\n\n```bash\n# Render to terminal with colors\nleaf --inline README.md\n\n# Force plain text, no ANSI codes (no colors)\nleaf --inline plain README.md\n\n# Force ANSI colors even when piping\nleaf --inline ansi README.md\n\n# Set a specific width\nleaf --inline 60 README.md\nleaf --inline ansi:60 README.md\n\n# Pipe from stdin\ncat README.md | leaf --inline\n\n# Use as a fzf preview\nfind . -name '*.md' | fzf --preview 'leaf --inline ansi {}'\nfind . -name '*.md' | fzf --preview 'leaf --inline ansi:$FZF_PREVIEW_COLUMNS {}'\n```\n\n## Shell Completions\n\nEnable Tab completion for all arguments:\n\n```bash\nleaf --auto-complete\n```\n\nSupports **bash**, **zsh**, **fish**, and **PowerShell**. Restart your shell to activate.\n\n## Vim Integration\nAdd the following to your `~\u002F.vimrc` to preview the current Markdown file in a vertical split:\n\n```vim\n\" Preview the current Markdown file in a vertical split using leaf\nnnoremap \u003CLeader>md :vertical botright terminal leaf -w %\u003CCR>\n```\n\nOnce added, use `\\md` to open a live preview. To switch focus back to the Markdown buffer, press `Ctrl+w,h`.\n\n## Configuration\n\nSet default values for **theme**, **editor**, **watch** mode and **extra** file types via `config.toml`:\n\n```bash\nleaf --config\n```\n\nThis opens the configuration file in your editor. If the file does not exist yet, **leaf** creates it with documented defaults.\n\n```toml\ntheme = \"ocean\"          # arctic, forest, ocean, solarized-dark, or a custom theme file\neditor = \"nano\"          # any editor in PATH\nwatch = false            # auto-reload when opening a file\nextras = [\"txt\", \"rs\"]   # extra file types shown in the picker\n```\n\nAll settings are optional. CLI arguments always take priority. See [`config.toml`](config.toml) for details.\n\n## Extra Files\n\nNon-Markdown files can be listed in the file picker by adding their extensions to `config.toml`:\n\n```toml\nextras = [\"txt\", \"csv\", \"rs\", \"java\", \"json\", \"yaml\"]\n```\n\nCode files get syntax highlighting; text files are rendered as plain Markdown.\n\nAny file can also be opened directly from the command line, regardless of the `extras` setting:\n\n```bash\nleaf main.rs\n```\n\nBrowse and preview code files with fzf:\n\n```bash\nfind . -name '*.rs' | fzf --preview 'leaf --inline ansi {}'\n```\n\n## Custom Themes\n\nCreate a `.toml` file that inherits from a built-in theme and overrides specific colors:\n\n```toml\ntheme = \"\u002Fpath\u002Fto\u002Fcustom-theme.toml\"\n```\n\nRelative paths are resolved from the config file directory.\n\n```toml\n# custom-theme.toml\nbase = \"ocean\"\nsyntax = \"base16-ocean.dark\"\n\n[ui]\ncontent_bg = \"#282828\"\ntoc_accent = \"#fe8019\"\n\n[markdown]\ntext = \"#ebdbb2\"\nheading_1 = \"#fabd2f\"\n```\n\nSee [`gruvbox.toml`](gruvbox.toml) for a complete example with all available color keys.\n\n## Keybindings\n\n| Key | Action |\n|---|---|\n| `j` \u002F `↓` | Scroll down |\n| `k` \u002F `↑` | Scroll up |\n| `d` \u002F PgDn | Page down (20 lines) |\n| `u` \u002F PgUp | Page up (20 lines) |\n| `g` \u002F Home | Top |\n| `G` \u002F End | Bottom |\n| `t` | Toggle TOC sidebar |\n| `Shift+Sel` | Select text |\n| `Shift+T` | Open theme picker |\n| `Shift+E` | Open editor picker |\n| `Shift+P` | Open file browser |\n| `Ctrl+E` | Open in editor |\n| `Ctrl+P` | Open fuzzy picker |\n| `Ctrl+F` \u002F `\u002F` | Find |\n| `Ctrl+Click` | Open link |\n| `Dbl-Click` | Copy link |\n| `n` \u002F `N` | Next \u002F prev match |\n| `?` | Show help popup |\n| `r` | Force reload (watch mode) |\n| `q` | Quit |\n\n## Features\n\n- **Live preview** — Watch mode with automatic reload and visual feedback.\n- **File picker** — Fuzzy Markdown picker, directory browser, and watch after selection.\n- **Editor integration** — Open the current file in your preferred editor.\n- **Frontmatter support** — YAML frontmatter rendered as a table (horizontal or vertical based on key count).\n- **Rich Markdown rendering** — Tables, lists, blockquotes, rules, bold, italic, and strikethrough.\n- **Extra file types** — Open any file; code files get syntax highlighting, text files render as Markdown.\n- **Syntax highlighting** — Common aliases like `py`, `cpp`, `json`, `toml`, `ps1`, `dockerfile`.\n- **LaTeX support** — Inline, block, and `latex` \u002F `tex` code blocks rendered as formulas.\n- **Navigation** — TOC sidebar, active section tracking, heading jumps, and search.\n- **Terminal UX** — Theme picker, help popup, file path popup, mouse and keyboard support.\n- **Shell completions** — Tab completion for bash, zsh, fish, and PowerShell via `leaf --auto-complete`.\n- **CLI friendly** — stdin support and `leaf --update` with SHA256 verification.\n\n## Typical AI Workflow\n\n```bash\n# Terminal 1: generate the file\naichat \"...\" > notes.md\n\n# Terminal 2: live watch\nleaf --watch notes.md\n```\n\n## Troubleshooting\n\n### Windows: missing Visual C++ runtime\n\nIf `leaf.exe` does not start on Windows or reports a missing MSVC runtime, install the latest supported Microsoft Visual C++ Redistributable from Microsoft Learn:\n\n- https:\u002F\u002Flearn.microsoft.com\u002Ffr-fr\u002Fcpp\u002Fwindows\u002Flatest-supported-vc-redist?view=msvc-170\n\nDirect download for the latest supported **X64** Microsoft Visual C++ Redistributable:\n\n- https:\u002F\u002Faka.ms\u002Fvc14\u002Fvc_redist.x64.exe\n\nFor `leaf-windows-x86_64.exe`, the relevant package is the latest supported **X64** Visual C++ v14 Redistributable.\n\n### Windows: update or file replacement error\n\nIf `leaf --update` fails on Windows with an error about replacing, renaming, or writing `leaf.exe`, the running executable was likely locked by the OS.\n\nClose any terminal session still running `leaf`, then rerun the PowerShell installer from the install section:\n\n```powershell\nirm https:\u002F\u002Fraw.githubusercontent.com\u002FRivoLink\u002Fleaf\u002Fmain\u002Fscripts\u002Finstall.ps1 | iex\n```\n\n## Uninstall\n\n**macOS \u002F Linux \u002F Android \u002F Termux:**\n\n```bash\nrm -f ~\u002F.local\u002Fbin\u002Fleaf\n```\n\n**Windows:**\n\n```powershell\nRemove-Item \"$env:LOCALAPPDATA\\Programs\\leaf\\leaf.exe\" -Force\n```\n\n**npm:**\n\n```bash\nnpm uninstall -g @rivolink\u002Fleaf\n```\n\n## Contributors\n\nThanks to all contributors.\n\n![Contributors](https:\u002F\u002Fstg.contrib.rocks\u002Fimage?repo=RivoLink\u002Fleaf&t=717807600)\n\n## Support\n\nContributions are welcome. Feel free to open an issue or submit a pull request.\n\nSee the [CONTRIBUTING.md](CONTRIBUTING.md) file for details.\n\nIf you like **leaf**, consider giving the project a star ⭐\n\n## License\n\nThis project is licensed under the MIT License.\n\nSee the [LICENSE](LICENSE) file for details.\n","Leaf 是一个终端 Markdown 预览器，提供类似图形界面的体验。它使用 Rust 语言开发，支持在 macOS、Linux、Windows、Android 和 Termux 等多种平台上运行，并且可以通过多种方式安装，包括脚本、npm 包和 AUR。Leaf 的核心功能包括实时预览、自动刷新、模糊文件选择器以及与 fzf 等工具集成的能力。此外，它还提供了内联模式，可以直接将 Markdown 渲染到标准输出。Leaf 适合需要在命令行环境中查看和编辑 Markdown 文件的开发者或用户，特别是在没有图形界面的情况下希望获得良好阅读体验的场景中非常有用。",2,"2026-06-11 03:50:25","high_star"]