@rivolink/leaf-darwin-arm64 1.10.1 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +215 -0
  2. package/leaf +0 -0
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,215 @@
1
+ <p align="center">
2
+ <img src="images/logo-wordmark.svg" alt="leaf" width="360" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ Terminal Markdown <a href="https://github.com/RivoLink/leaf/blob/main/images/preview.png" alt="Previewer">Previewer</a> — GUI-like experience.
7
+ </p>
8
+
9
+ ## Install
10
+
11
+ Install the latest published binary.
12
+
13
+ macOS / Linux / Android / Termux:
14
+
15
+ ```bash
16
+ curl -fsSL https://raw.githubusercontent.com/RivoLink/leaf/main/scripts/install.sh | sh
17
+ ```
18
+
19
+ Windows:
20
+
21
+ ```powershell
22
+ irm https://raw.githubusercontent.com/RivoLink/leaf/main/scripts/install.ps1 | iex
23
+ ```
24
+
25
+ npm:
26
+
27
+ ```bash
28
+ npm install -g @rivolink/leaf
29
+ ```
30
+
31
+ Verify the installation:
32
+
33
+ ```bash
34
+ leaf --version
35
+ ```
36
+
37
+ ## Update
38
+
39
+ Update an existing installation to the latest published release.
40
+
41
+ Self:
42
+
43
+ ```bash
44
+ leaf --update
45
+ ```
46
+
47
+ `leaf --update` downloads the matching published asset, verifies it against the published `checksums.txt` SHA256, and then installs it.
48
+
49
+ On Windows, if replacing the running `.exe` is blocked by the OS, rerun the PowerShell installer from the install section.
50
+
51
+ npm:
52
+
53
+ ```bash
54
+ npm update -g @rivolink/leaf
55
+ ```
56
+
57
+ ## Build
58
+
59
+ Clone the repository:
60
+
61
+ ```bash
62
+ git clone https://github.com/RivoLink/leaf.git
63
+ cd leaf
64
+ ```
65
+
66
+ Build the release binary locally:
67
+
68
+ ```bash
69
+ cargo build --release
70
+ ```
71
+
72
+ Create a local bin directory if needed and symlink `leaf` into it:
73
+
74
+ ```bash
75
+ mkdir -p ~/.local/bin
76
+ ln -sf "$(pwd)/target/release/leaf" ~/.local/bin/leaf
77
+ ```
78
+
79
+ If `~/.local/bin` is not already on your `PATH`, add it to `~/.bashrc` or `~/.zshrc`:
80
+
81
+ ```bash
82
+ export PATH="$HOME/.local/bin:$PATH"
83
+ ```
84
+
85
+ ## Usage
86
+
87
+ ```bash
88
+ # Open a Markdown file
89
+ leaf TESTING.md
90
+
91
+ # Watch mode — reloads automatically on save
92
+ leaf --watch TESTING.md
93
+ leaf -w TESTING.md
94
+
95
+ # Open the fuzzy Markdown picker
96
+ leaf
97
+
98
+ # Open the classic directory browser picker
99
+ leaf --picker
100
+
101
+ # Open the fuzzy Markdown picker, then watch the selected file
102
+ leaf -w
103
+
104
+ # Open the classic directory browser picker, then watch the selected file
105
+ leaf -w --picker
106
+
107
+ # Open a dash-prefixed filename
108
+ leaf -- -notes.md
109
+
110
+ # Stream Markdown from another CLI tool
111
+ claude "explain Rust lifetimes" | leaf
112
+
113
+ # Preview a local file through stdin
114
+ cat TESTING.md | leaf
115
+
116
+ ```
117
+
118
+ ## Keybindings
119
+
120
+ | Key | Action |
121
+ |---|---|
122
+ | `j` / `↓` | Scroll down |
123
+ | `k` / `↑` | Scroll up |
124
+ | `d` / PgDn | Page down (20 lines) |
125
+ | `u` / PgUp | Page up (20 lines) |
126
+ | `g` / Home | Top |
127
+ | `G` / End | Bottom |
128
+ | `t` | Toggle TOC sidebar |
129
+ | `Shift+T` | Open theme picker |
130
+ | `Shift+E` | Open editor picker |
131
+ | `Ctrl+E` | Open in editor |
132
+ | `Ctrl+F` / `/` | Find |
133
+ | `n` / `N` | Next / prev match |
134
+ | `?` | Show help popup |
135
+ | `r` | Force reload (watch mode) |
136
+ | `q` | Quit |
137
+
138
+ ## Features
139
+
140
+ - ✅ **Watch mode** `--watch` / `-w` — reloads every 250ms, with `⟳ reloaded` flash feedback
141
+ - ✅ `leaf --watch` can start from the picker and begin watching after file selection
142
+ - ✅ Syntax highlighting with common language aliases like `py`, `cpp`, `json`, `toml`, `ps1`, and `dockerfile`
143
+ - ✅ Unicode box-drawing tables with left / center / right alignment
144
+ - ✅ TOC sidebar with active section tracking and two-level navigation
145
+ - ✅ Search with match highlighting, `/`, `Ctrl+F`, and `n` / `N`
146
+ - ✅ Code blocks `┌─ lang ───┐`
147
+ - ✅ Bold, italic, strikethrough, blockquotes, lists, and horizontal rules
148
+ - ✅ YAML frontmatter is ignored in both preview and TOC
149
+ - ✅ Native stdin input with bounded size
150
+ - ✅ `leaf --update` to fetch, verify via published SHA256, and install the latest release on supported platforms
151
+ - ✅ Fuzzy Markdown picker when launched without a file
152
+ - ✅ Classic directory browser picker with `leaf --picker`
153
+ - ✅ Theme picker with runtime preview
154
+ - ✅ Help modal with in-app shortcuts
155
+
156
+ ## Typical AI Workflow
157
+
158
+ ```bash
159
+ # Terminal 1: generate the file
160
+ aichat "..." > notes.md
161
+
162
+ # Terminal 2: live watch
163
+ leaf --watch notes.md
164
+ ```
165
+
166
+ ## Roadmap
167
+
168
+ - [x] Themes (light / custom)
169
+ - [ ] Copy code block `y`
170
+ - [ ] Code block horizontal scroll
171
+ - [ ] Improve search performance on large files
172
+
173
+ ## Troubleshooting
174
+
175
+ ### Windows: missing Visual C++ runtime
176
+
177
+ 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:
178
+
179
+ - https://learn.microsoft.com/fr-fr/cpp/windows/latest-supported-vc-redist?view=msvc-170
180
+
181
+ Direct download for the latest supported **X64** Microsoft Visual C++ Redistributable:
182
+
183
+ - https://aka.ms/vc14/vc_redist.x64.exe
184
+
185
+ For `leaf-windows-x86_64.exe`, the relevant package is the latest supported **X64** Visual C++ v14 Redistributable.
186
+
187
+ ### Windows: update or file replacement error
188
+
189
+ 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.
190
+
191
+ Close any terminal session still running `leaf`, then rerun the PowerShell installer from the install section:
192
+
193
+ ```powershell
194
+ irm https://raw.githubusercontent.com/RivoLink/leaf/main/scripts/install.ps1 | iex
195
+ ```
196
+
197
+ ## Uninstall
198
+
199
+ macOS / Linux / Android / Termux:
200
+
201
+ ```bash
202
+ rm -f ~/.local/bin/leaf
203
+ ```
204
+
205
+ Windows:
206
+
207
+ ```powershell
208
+ Remove-Item "$env:LOCALAPPDATA\Programs\leaf\leaf.exe" -Force
209
+ ```
210
+
211
+ npm:
212
+
213
+ ```bash
214
+ npm uninstall -g @rivolink/leaf
215
+ ```
package/leaf CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivolink/leaf-darwin-arm64",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "description": "leaf binary for darwin arm64",
5
5
  "os": [
6
6
  "darwin"