github-search-cli 9.4.0 → 9.4.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.
package/README.md CHANGED
@@ -1,237 +1,263 @@
1
- # ghfind
2
-
3
- > Search GitHub repos from your terminal. No browser needed.
4
-
5
- <p align="center">
6
- <a href="https://x.com/frankli23709971">
7
- <img src="https://img.shields.io/badge/made%20by-%40frankli23709971-000000?logo=x&labelColor=000000&color=000000&link=https://x.com/frankli23709971" alt="Made by @frankli23709971">
8
- </a>
9
- </p>
10
-
11
- <p align="center">
12
- <img src="https://raw.githubusercontent.com/codersdfs/search-cli/main/demo.svg" alt="ghfind demo" width="100%">
13
- </p>
14
-
15
- [![MIT License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
16
-
17
- ---
18
-
19
- ## Install
20
-
21
- ```bash
22
- npm install -g github-search-cli
23
- ```
24
-
25
- > **No separate runtime needed!** Only requires Node.js 20+. The TUI needs Bun,
26
- > which is downloaded automatically at install time. Non-interactive modes work
27
- > with just Node.js.
28
- >
29
- > | Platform | TUI | CLI modes |
30
- > | --------------------- | ---------------- | --------- |
31
- > | Node 20+ | ⚠ Bun required | ✅ |
32
- > | Bun | ✅ | ✅ |
33
- > | Downloaded Bun | ✅ auto-installed| ✅ |
34
-
35
- ## Use
36
-
37
- ```bash
38
- # TUI
39
- ghfind
40
-
41
- # pipe
42
- ghfind "language:Rust stars:>1000" --json | jq '.[].fullName'
43
- ghfind "language:Zig" --count
44
- ghfind --trending --json --since weekly
45
- ```
46
-
47
- ### Non-interactive
48
-
49
- ```bash
50
- ghfind "query" --json # JSON
51
- ghfind "query" --csv # CSV
52
- ghfind "query" --markdown # Markdown
53
- ghfind "query" --count # count only
54
- ghfind "query" --format urls # one URL per line
55
- ghfind "query" --pipe open # open in browser
56
- ghfind "query" --pipe clone # clone commands
57
- ghfind --trending --json # trending as JSON
58
- ghfind --watch "query" # poll every 300s
59
- ```
60
-
61
- ### Completions
62
-
63
- ```bash
64
- source <(ghfind --completion bash)
65
- source <(ghfind --completion zsh)
66
- ghfind --completion fish | source
67
- ```
68
-
69
- ---
70
-
71
- ## Features
72
-
73
- <table>
74
- <tr><td><b>Search</b></td><td>Free-text + qualifiers (<code>language:</code>, <code>stars:</code>, <code>topic:</code>), sort by stars/updated/forks</td></tr>
75
- <tr><td><b>Trending</b></td><td>Today, week, month, year — filter by language</td></tr>
76
- <tr><td><b>Bookmarks</b></td><td>Space → Bookmark / Bookmarks panel — save repos, tag them</td></tr>
77
- <tr><td><b>Deep-dive</b></td><td>Space → Deep-dive — languages, contributors, README, activity chart</td></tr>
78
- <tr><td><b>Compare</b></td><td>Space → Compare select / Compare view — side-by-side, select 2+ repos</td></tr>
79
- <tr><td><b>Explore</b></td><td>Space → Topics — browse popular GitHub topics</td></tr>
80
- <tr><td><b>History</b></td><td>Space → History — recall past searches</td></tr>
81
- <tr><td><b>Saved</b></td><td>Space → Saved searches — load or save queries</td></tr>
82
- <tr><td><b>Export</b></td><td>Space → Export — JSON, CSV, Markdown to file</td></tr>
83
- <tr><td><b>Share</b></td><td>Space → Share repo — copy repo link to clipboard</td></tr>
84
- <tr><td><b>Notifications</b></td><td>Space → Notifications — view & dismiss alerts</td></tr>
85
- <tr><td><b>Graph</b></td><td>Space → Activity graph — commit chart, fullscreen toggle</td></tr>
86
- <tr><td><b>Help</b></td><td><code>?</code> / <code>Ctrl+H</code> — keybindings reference</td></tr>
87
- <tr><td><b>Watch</b></td><td><code>--watch</code> — poll for new results</td></tr>
88
- </table>
89
-
90
- <details>
91
- <summary>Keybindings</summary>
92
-
93
- **Global shortcuts** (main view, no overlay active)
94
-
95
- | Key | Action |
96
- | --------------------- | ---------------------------------------------- |
97
- | `/` | Focus search input |
98
- | `Enter` | Execute search / open selected repo in browser |
99
- | `↑` / `↓` — `j` / `k` | Navigate results & menus |
100
- | `Space` | Open leader menu (contextual actions) |
101
- | `Tab` | Auto-complete search qualifier |
102
- | `?` or `Ctrl+H` | Help overlay |
103
- | `1`–`5` | Switch trending tabs (Today → All) |
104
- | `←` / `→` — `h` / `l` | Switch trending tabs (left/right) |
105
- | `PageUp` | Jump to top of results |
106
- | `PageDown` | Load next page of results |
107
- | `Esc` | Close current overlay |
108
- | `q` | Quit ghfind |
109
-
110
- **Leader menu** — press `Space`, navigate with `↑`/`↓`, press `Enter` to dispatch
111
-
112
- Actions shown depend on current mode (search vs trending) and selection:
113
-
114
- | Menu item | Description |
115
- | --------------- | ------------------------------------------------------- |
116
- | Sort | Cycle sort strategy (best-match, stars, updated, forks) |
117
- | Limit | Cycle result limit (10, 25, 50, 100) |
118
- | Refresh | Re-run current search (or reload trending) |
119
- | Toggle trending | Switch between search and trending views |
120
- | Deep-dive | Show languages, contributors, README excerpt |
121
- | Readme | Full README viewer |
122
- | Activity graph | Toggle commit chart fullscreen |
123
- | Bookmark | Save / unsave selected repo |
124
- | Compare | Add/remove repo to comparison set |
125
- | Compare view | Show side-by-side comparison table |
126
- | Open in browser | Open selected repo URL |
127
- | History | Recall past searches |
128
- | Saved searches | Load a saved search |
129
- | Save search | Save current query |
130
- | Export | Export results to JSON / CSV / Markdown |
131
- | Share repo | Copy repo link to clipboard |
132
- | Notifications | View and dismiss alerts |
133
- | Topics | Browse popular GitHub topics |
134
- | Bookmarks panel | Browse saved bookmarks |
135
- | Help | Keybindings reference |
136
-
137
- **Overlay-specific shortcuts**
138
-
139
- | Key | Context | Action |
140
- | --------------- | ---------------------------------------------------- | ------------------------------------------- |
141
- | `Esc` / `q` | Any overlay | Close overlay |
142
- | `Enter` | Leader / History / Saved / Export / Topics / Share | Confirm selection |
143
- | `d` | History / Bookmarks / Saved searches / Notifications | Delete current entry |
144
- | `Ctrl+X` | History | Clear all history |
145
- | `Ctrl+C` | Notifications | Dismiss all notifications |
146
- | `Y` / `N` / `L` | Update modal | Yes (install) / No (skip) / Later (dismiss) |
147
-
148
- Trending tabs: `1`–`5` (Today → All) or `←`/`→` — `h`/`l`
149
-
150
- > Most actions are accessed via the **leader menu** (`Space`). This keeps the keymap minimal while providing a full command palette. The leader menu filters actions contextually — items that don't apply (e.g., Bookmark with no repo selected) are hidden.
151
-
152
- </details>
153
-
154
- ---
155
-
156
- ## Search syntax
157
-
158
- ```
159
- language:Rust stars:>1000 topic:cli
160
- "machine learning" language:Python stars:>5000
161
- topic:cli -language:JavaScript
162
- org:rust-lang language:Rust
163
- ```
164
-
165
- Prefix with `-` to exclude. Supported: `language`, `stars`, `fork`, `archived`, `topic`, `user`, `org`, `repo`, `updated`, `pushed`, `visibility`, `license`, `created`, `size`, `in`.
166
-
167
- ---
168
-
169
- ## Config
170
-
171
- `~/.config/ghfind/config.json` (auto-created, or run `ghfind init`):
172
-
173
- ```json
174
- {
175
- "defaultSort": "stars",
176
- "defaultLimit": 50,
177
- "theme": "tokyo-night",
178
- "githubToken": "ghp_..."
179
- }
180
- ```
181
-
182
- Env: `GITHUB_TOKEN`, `GHFIND_CONFIG`, `XDG_CONFIG_HOME`, `XDG_STATE_HOME`
183
-
184
- ---
185
-
186
- ## From source
187
-
188
- ```bash
189
- git clone https://github.com/codersdfs/search-cli.git
190
- cd ghfind
191
-
192
- # With Bun (recommended for TUI)
193
- bun install
194
- bun start # TUI
195
- bun test # 179 tests
196
- bun run build # build dist/
197
-
198
- # Or with npm
199
- npm install
200
- npm start # TUI (requires Node 20+)
201
- npm test # 179 tests
202
- npm run build # build dist/
203
- ```
204
-
205
- ---
206
-
207
- ## Changelog
208
-
209
- Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
210
-
211
- ### v9.3.0
212
- - Fixed `c` keybinding in TUI not adding repos to comparison — a missing closing brace in the space-key handler broke every later key handler (`c`, `t`, `?`)
213
- - README viewer renders full markdown (headings, code blocks, lists, tables, blockquotes, rules) instead of stripping formatting
214
- - Widened compare table columns (min 35 chars), added Description + URL rows, and raised the topic cap to 5 per repo
215
-
216
- ### v9.2.1
217
- - npm package search (beta) and a new landing screen
218
- - Removed the bundled Bun binary — downloaded at install time instead; package size 39.5 MB → 100 KB
219
- - Postinstall failures no longer break `npm install`; `bun` dropped from engines
220
- - Fixed TUI layout on small terminals, trending visibility from the landing screen, and independent trending-tab fetches
221
-
222
- ### v9.1.1
223
- - Bundle `vendor/` and `dist/` for offline install
224
- - Postinstall exits non-zero on Bun download failure; bundled Bun 1.3.12 → 1.3.14
225
-
226
- ### v9.1.0
227
- - Automatic update checking against the npm registry, with a Y/N/L modal
228
- - Leader menu (Space) consolidating all contextual actions
229
- - Topic explorer, notifications panel, saved searches, activity graph, README viewer
230
- - Tab qualifier auto-complete, PageUp/PageDown, `Ctrl+X` clear history, `Ctrl+C` clear notifications
231
- - TUI runs on Node.js 20+ via the downloaded Bun binary
232
-
233
- ---
234
-
235
- ## License
236
-
237
- MIT
1
+ # ghfind
2
+
3
+ > Search GitHub repos from your terminal. No browser needed.
4
+
5
+ <p align="center">
6
+ <a href="https://x.com/frankli23709971">
7
+ <img src="https://img.shields.io/badge/made%20by-%40frankli23709971-000000?logo=x&labelColor=000000&color=000000&link=https://x.com/frankli23709971" alt="Made by @frankli23709971">
8
+ </a>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/github-search-cli"><img src="https://img.shields.io/npm/v/github-search-cli.svg" alt="npm version"></a>
13
+ <a href="https://www.npmjs.com/package/github-search-cli"><img src="https://img.shields.io/npm/dw/github-search-cli.svg" alt="npm weekly downloads"></a>
14
+ <a href="https://github.com/codersdfs/search-cli/actions/workflows/release.yml"><img src="https://github.com/codersdfs/search-cli/actions/workflows/release.yml/badge.svg" alt="CI"></a>
15
+ <img src="https://img.shields.io/badge/TypeScript-strict-blue.svg" alt="TypeScript strict">
16
+ <a href="https://github.com/codersdfs/search-cli/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/github-search-cli.svg" alt="License"></a>
17
+ </p>
18
+
19
+ <p align="center">
20
+ <img src="https://raw.githubusercontent.com/codersdfs/search-cli/main/demo.svg" alt="ghfind demo" width="100%">
21
+ </p>
22
+
23
+ ## Install
24
+
25
+ ```bash
26
+ npm install -g github-search-cli
27
+ ```
28
+
29
+ Or grab a **standalone binary** (no Node.js needed) from [GitHub Releases](https://github.com/codersdfs/search-cli/releases) — `ghfind-<os>-<arch>` executables for Linux, macOS, and Windows.
30
+
31
+ ## Why ghfind?
32
+
33
+ | | `ghfind` | `gh search` (GitHub CLI) | `hub` |
34
+ | ------------------------------------------ | -------- | ------------------------ | ----- |
35
+ | Repo search + qualifiers | ✅ | ✅ | ❌ |
36
+ | Trending repos (day/week/month/year) | ✅ | ❌ | ❌ |
37
+ | Full-screen TUI, keyboard-driven | ✅ | ❌ | ❌ |
38
+ | Bookmarks, tags & release tracking | ✅ | ❌ | ❌ |
39
+ | Side-by-side repo compare | ✅ | ❌ | ❌ |
40
+ | Deep-dive (README, contributors, activity) | ✅ | ❌ | ❌ |
41
+ | npm package search | ✅ | ❌ | ❌ |
42
+ | Pipeable JSON / CSV / Markdown export | ✅ | JSON only | ❌ |
43
+ | No login required | ✅ | ❌ | ❌ |
44
+
45
+ > **No separate runtime needed!** Only requires Node.js 20+. The TUI needs Bun,
46
+ > which is downloaded automatically at install time. Non-interactive modes work
47
+ > with just Node.js.
48
+ >
49
+ > | Platform | TUI | CLI modes |
50
+ > | -------------- | ----------------- | --------- |
51
+ > | Node 20+ | ⚠ Bun required | ✅ |
52
+ > | Bun | ✅ | ✅ |
53
+ > | Downloaded Bun | ✅ auto-installed | ✅ |
54
+
55
+ ## Use
56
+
57
+ ```bash
58
+ # TUI
59
+ ghfind
60
+
61
+ # pipe
62
+ ghfind "language:Rust stars:>1000" --json | jq '.[].fullName'
63
+ ghfind "language:Zig" --count
64
+ ghfind --trending --json --since weekly
65
+ ```
66
+
67
+ ### Non-interactive
68
+
69
+ ```bash
70
+ ghfind "query" --json # JSON
71
+ ghfind "query" --csv # CSV
72
+ ghfind "query" --markdown # Markdown
73
+ ghfind "query" --count # count only
74
+ ghfind "query" --format urls # one URL per line
75
+ ghfind "query" --pipe open # open in browser
76
+ ghfind "query" --pipe clone # clone commands
77
+ ghfind --trending --json # trending as JSON
78
+ ghfind --watch "query" # poll every 300s
79
+ ```
80
+
81
+ ### Completions
82
+
83
+ ```bash
84
+ source <(ghfind --completion bash)
85
+ source <(ghfind --completion zsh)
86
+ ghfind --completion fish | source
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Features
92
+
93
+ <table>
94
+ <tr><td><b>Search</b></td><td>Free-text + qualifiers (<code>language:</code>, <code>stars:</code>, <code>topic:</code>), sort by stars/updated/forks</td></tr>
95
+ <tr><td><b>Trending</b></td><td>Today, week, month, year — filter by language</td></tr>
96
+ <tr><td><b>Bookmarks</b></td><td>Space → Bookmark / Bookmarks panel — save repos, tag them</td></tr>
97
+ <tr><td><b>Deep-dive</b></td><td>Space → Deep-dive — languages, contributors, README, activity chart</td></tr>
98
+ <tr><td><b>Compare</b></td><td>Space → Compare select / Compare view — side-by-side, select 2+ repos</td></tr>
99
+ <tr><td><b>Explore</b></td><td>Space → Topics — browse popular GitHub topics</td></tr>
100
+ <tr><td><b>History</b></td><td>Space → History — recall past searches</td></tr>
101
+ <tr><td><b>Saved</b></td><td>Space → Saved searches — load or save queries</td></tr>
102
+ <tr><td><b>Export</b></td><td>Space → Export — JSON, CSV, Markdown to file</td></tr>
103
+ <tr><td><b>Share</b></td><td>Space → Share repo — copy repo link to clipboard</td></tr>
104
+ <tr><td><b>Org profile</b></td><td>Space → Org profile — org summary: repos, stars, top languages (<code>ghfind org <name></code> in CLI)</td></tr>
105
+ <tr><td><b>Notifications</b></td><td>Space → Notifications — view & dismiss alerts</td></tr>
106
+ <tr><td><b>Graph</b></td><td>Space → Activity graph — commit chart, fullscreen toggle</td></tr>
107
+ <tr><td><b>Help</b></td><td><code>?</code> / <code>Ctrl+H</code> — keybindings reference</td></tr>
108
+ <tr><td><b>Watch</b></td><td><code>--watch</code> — poll for new results</td></tr>
109
+ </table>
110
+
111
+ <details>
112
+ <summary>Keybindings</summary>
113
+
114
+ **Global shortcuts** (main view, no overlay active)
115
+
116
+ | Key | Action |
117
+ | --------------------- | ---------------------------------------------- |
118
+ | `/` | Focus search input |
119
+ | `Enter` | Execute search / open selected repo in browser |
120
+ | `↑` / `↓` — `j` / `k` | Navigate results & menus |
121
+ | `Space` | Open leader menu (contextual actions) |
122
+ | `Tab` | Auto-complete search qualifier |
123
+ | `?` or `Ctrl+H` | Help overlay |
124
+ | `1`–`5` | Switch trending tabs (Today → All) |
125
+ | `←` / `→` — `h` / `l` | Switch trending tabs (left/right) |
126
+ | `PageUp` | Jump to top of results |
127
+ | `PageDown` | Load next page of results |
128
+ | `Esc` | Close current overlay |
129
+ | `q` | Quit ghfind |
130
+
131
+ **Leader menu** — press `Space`, navigate with `↑`/`↓`, press `Enter` to dispatch
132
+
133
+ Actions shown depend on current mode (search vs trending) and selection:
134
+
135
+ | Menu item | Description |
136
+ | --------------- | ------------------------------------------------------- |
137
+ | Sort | Cycle sort strategy (best-match, stars, updated, forks) |
138
+ | Limit | Cycle result limit (10, 25, 50, 100) |
139
+ | Refresh | Re-run current search (or reload trending) |
140
+ | Toggle trending | Switch between search and trending views |
141
+ | Deep-dive | Show languages, contributors, README excerpt |
142
+ | Readme | Full README viewer |
143
+ | Activity graph | Toggle commit chart fullscreen |
144
+ | Bookmark | Save / unsave selected repo |
145
+ | Compare | Add/remove repo to comparison set |
146
+ | Compare view | Show side-by-side comparison table |
147
+ | Open in browser | Open selected repo URL |
148
+ | History | Recall past searches |
149
+ | Saved searches | Load a saved search |
150
+ | Save search | Save current query |
151
+ | Export | Export results to JSON / CSV / Markdown |
152
+ | Share repo | Copy repo link to clipboard |
153
+ | Org profile | Org summary — repos, total stars, top languages |
154
+ | Notifications | View and dismiss alerts |
155
+ | Topics | Browse popular GitHub topics |
156
+ | Bookmarks panel | Browse saved bookmarks |
157
+ | Help | Keybindings reference |
158
+
159
+ **Overlay-specific shortcuts**
160
+
161
+ | Key | Context | Action |
162
+ | --------------- | ---------------------------------------------------- | ------------------------------------------- |
163
+ | `Esc` / `q` | Any overlay | Close overlay |
164
+ | `Enter` | Leader / History / Saved / Export / Topics / Share | Confirm selection |
165
+ | `d` | History / Bookmarks / Saved searches / Notifications | Delete current entry |
166
+ | `Ctrl+X` | History | Clear all history |
167
+ | `Ctrl+C` | Notifications | Dismiss all notifications |
168
+ | `Y` / `N` / `L` | Update modal | Yes (install) / No (skip) / Later (dismiss) |
169
+
170
+ Trending tabs: `1`–`5` (Today → All) or `←`/`→` — `h`/`l`
171
+
172
+ > Most actions are accessed via the **leader menu** (`Space`). This keeps the keymap minimal while providing a full command palette. The leader menu filters actions contextually — items that don't apply (e.g., Bookmark with no repo selected) are hidden.
173
+
174
+ </details>
175
+
176
+ ---
177
+
178
+ ## Search syntax
179
+
180
+ ```
181
+ language:Rust stars:>1000 topic:cli
182
+ "machine learning" language:Python stars:>5000
183
+ topic:cli -language:JavaScript
184
+ org:rust-lang language:Rust
185
+ ```
186
+
187
+ Prefix with `-` to exclude. Supported: `language`, `stars`, `fork`, `archived`, `topic`, `user`, `org`, `repo`, `updated`, `pushed`, `visibility`, `license`, `created`, `size`, `in`.
188
+
189
+ ---
190
+
191
+ ## Config
192
+
193
+ `~/.config/ghfind/config.json` (auto-created, or run `ghfind init`):
194
+
195
+ ```json
196
+ {
197
+ "defaultSort": "stars",
198
+ "defaultLimit": 50,
199
+ "theme": "tokyo-night",
200
+ "githubToken": "ghp_..."
201
+ }
202
+ ```
203
+
204
+ Env: `GITHUB_TOKEN`, `GHFIND_CONFIG`, `XDG_CONFIG_HOME`, `XDG_STATE_HOME`
205
+
206
+ ---
207
+
208
+ ## From source
209
+
210
+ ```bash
211
+ git clone https://github.com/codersdfs/search-cli.git
212
+ cd ghfind
213
+
214
+ # With Bun (recommended for TUI)
215
+ bun install
216
+ bun start # TUI
217
+ bun test # 179 tests
218
+ bun run build # build dist/
219
+
220
+ # Or with npm
221
+ npm install
222
+ npm start # TUI (requires Node 20+)
223
+ npm test # 179 tests
224
+ npm run build # build dist/
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Changelog
230
+
231
+ Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
232
+
233
+ ### v9.3.0
234
+
235
+ - Fixed `c` keybinding in TUI not adding repos to comparison — a missing closing brace in the space-key handler broke every later key handler (`c`, `t`, `?`)
236
+ - README viewer renders full markdown (headings, code blocks, lists, tables, blockquotes, rules) instead of stripping formatting
237
+ - Widened compare table columns (min 35 chars), added Description + URL rows, and raised the topic cap to 5 per repo
238
+
239
+ ### v9.2.1
240
+
241
+ - npm package search (beta) and a new landing screen
242
+ - Removed the bundled Bun binary — downloaded at install time instead; package size 39.5 MB → 100 KB
243
+ - Postinstall failures no longer break `npm install`; `bun` dropped from engines
244
+ - Fixed TUI layout on small terminals, trending visibility from the landing screen, and independent trending-tab fetches
245
+
246
+ ### v9.1.1
247
+
248
+ - Bundle `vendor/` and `dist/` for offline install
249
+ - Postinstall exits non-zero on Bun download failure; bundled Bun 1.3.12 → 1.3.14
250
+
251
+ ### v9.1.0
252
+
253
+ - Automatic update checking against the npm registry, with a Y/N/L modal
254
+ - Leader menu (Space) consolidating all contextual actions
255
+ - Topic explorer, notifications panel, saved searches, activity graph, README viewer
256
+ - Tab qualifier auto-complete, PageUp/PageDown, `Ctrl+X` clear history, `Ctrl+C` clear notifications
257
+ - TUI runs on Node.js 20+ via the downloaded Bun binary
258
+
259
+ ---
260
+
261
+ ## License
262
+
263
+ MIT