github-search-cli 9.8.1 → 9.8.3

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/CHANGELOG.md CHANGED
@@ -6,6 +6,126 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
6
6
 
7
7
  ---
8
8
 
9
+ ## [9.8.3] — 2026-10-01 (released)
10
+
11
+ ### Fixed
12
+
13
+ - **The TUI always opens on the landing menu again.** A saved session used to
14
+ skip it on every launch, and one user's session had an MCP handshake request
15
+ saved as its query, so startup auto-ran a garbage search instead of showing
16
+ the menu. Sessions now restore preferences and pre-fill the last query only
17
+ when a mode is picked; they never auto-run a search. Both save and restore
18
+ sanitize the session: JSON-shaped or oversized queries are dropped, and
19
+ malformed fields fall back to defaults, so a corrupted file can't hijack
20
+ startup again.
21
+ - **401/403 API errors now say what actually went wrong instead of "Network
22
+ error".** A rejected token (401) shows "Bad GitHub token (401)" with keys to
23
+ fix it; an authenticated-but-forbidden 403 (e.g. SAML/SSO enforcement) names
24
+ the SSO case; only genuine connectivity/server failures keep the generic
25
+ network message. A rate-limited search no longer swallows the error and
26
+ renders as a silent zero-result "success" — the real message reaches the
27
+ status bar, the MCP server reports it as structured backoff advice, and the
28
+ adapter no longer turns rate limits into empty results.
29
+ - **Recover-from-errors without leaving the TUI.** While the matching error is
30
+ showing, `t` opens an inline token prompt (saves to config and re-runs the
31
+ failed query), `u` clears the token and retries unauthenticated, `c` swaps in
32
+ a different token after a rate limit, and `r` retries. Documented in the help
33
+ overlay and README.
34
+ - **An image wrapped in a link now renders.** The badge-and-screenshot shape
35
+ `[![alt](shot.png)](url)` — used by `sst/opencode` (its only hero image was
36
+ lost) and `withastro/astro` (23 of 25 images lost) — was treated as prose
37
+ because the markdown token walk rejected `link` tokens instead of recursing
38
+ into them. The image now renders and keeps its link as an OSC 8 hyperlink on
39
+ the image cells, so clicking it in the terminal opens the same URL.
40
+ - **A README full of small images no longer floods the screen.** Images whose
41
+ README declares an edge under 100 px (`<img width="48">` sponsor avatars,
42
+ badges) are filtered while parsing, before any request is made; images with
43
+ no declared size are measured from their header after the download
44
+ (`Bun.Image.metadata()`, header read only — no pixel decode) and rejected
45
+ before rasterising. On `openclaw/openclaw` (661 `<img>` tags, 648 of them
46
+ 48×48 avatars) this takes the README from 649 downloads / 28.3 s to open to
47
+ 1 download / ~0.5 s.
48
+ - A pure-image block whose refs are all filtered out renders as nothing instead
49
+ of falling back to prose, which would have printed the raw markdown of the
50
+ filtered-out image.
51
+
52
+ ### Changed
53
+
54
+ - **Images smaller than 100 px on any edge are no longer rendered, even when
55
+ the declared size understates the real one** (two images in
56
+ `openclaw/openclaw` declare `width="48"` but are 420×420). The README is
57
+ treated as the authority on size; the alternative — rendering the avatar at
58
+ whatever the terminal fits — is what made these READMEs unusable.
59
+ - The TUI no longer skips the landing menu on startup: a saved session
60
+ restores sort/limit/trending tab and pre-fills the query when you pick Repo
61
+ Search, but the menu always comes first. See the session-sanitizing fix
62
+ above.
63
+
64
+ ---
65
+
66
+ ## [9.8.2] — 2026-09-28 (released)
67
+
68
+ ### Security
69
+
70
+ - **GitHub tokens no longer leak into crash reports.** An uncaught error
71
+ auto-built a GitHub issue URL from the raw `process.argv`, so a token passed
72
+ as `--token` ended up in a public URL. Every field is now redacted before it
73
+ reaches the URL, title, body or stack trace, and when a credential is
74
+ detected ghfind prints the URL to copy instead of opening a browser.
75
+ - **Your token is never sent to `raw.githubusercontent.com`** when fetching a
76
+ README. It is only attached to `api.github.com` requests, and only for a
77
+ repository marked private.
78
+ - **Untrusted skill sources are validated** before they can reach a shell
79
+ command or URL. A `source` or `skillId` containing shell metacharacters
80
+ (`;`, `$`, backticks, newlines, path traversal) is now dropped from
81
+ registry results instead of being interpolated into `npx skills add`.
82
+ - **The config file holding your token is written with `0600` permissions**
83
+ (effective on POSIX; on Windows the file still inherits the directory ACL).
84
+ - `--doctor` masks the token with `maskToken()` instead of printing a
85
+ raw 7-character prefix.
86
+
87
+ ### Fixed
88
+
89
+ - **Recoverable errors no longer open a bug-report tab.** The catch in
90
+ `src/cli.ts` tested `err.name === "SearchCliError"`, which is never true
91
+ because each subclass sets its own name, so rate-limit, network and
92
+ layout-change errors all fell through to the crash reporter. Routing now uses
93
+ `instanceof SearchCliError`.
94
+ - **`--compare` and the MCP tool `ghfind_compare_repos` resolve repos
95
+ exactly.** Both used a free-text search with no `repo:` qualifier and never
96
+ checked the returned `fullName`, so they could silently compare a different
97
+ repository. They now use the existing `resolveRepoFromRef()` seam
98
+ (`GET /repos/{owner}/{repo}`).
99
+ - **State files are written atomically.** Bookmarks, history, sessions, saved
100
+ searches, notifications and the update check were written straight to their
101
+ live path; a crash or a full disk left a truncated JSON file that was then
102
+ silently replaced with defaults, destroying user data. Writes now go to a
103
+ temp file and are renamed into place.
104
+ - **Notification IDs no longer restart** after "dismiss all" — the id counter
105
+ was recomputed from an already-empty list.
106
+ - **`ghfind history --delete` no longer removes every duplicate entry.** The
107
+ delete matched by value instead of by index.
108
+ - **An invalid `--sort` value is rejected** with the list of valid choices and
109
+ a non-zero exit code instead of silently degrading to the default.
110
+ - **A failed "load more" in the TUI no longer clears the results** already on
111
+ screen; the error goes to the status bar.
112
+ - **`--markdown` escapes `|` in cells**, matching `--csv`.
113
+ - Local skill scanning is memoised per process, so a search no longer re-walks
114
+ the skill roots on every keystroke.
115
+ - `MemoryCache.set` is a true LRU — a refreshed entry now moves to the end of
116
+ the insertion order.
117
+ - Skill ids and sources may contain `_` (e.g. `my_org/my_repo`), which
118
+ are common on GitHub and were wrongly rejected.
119
+
120
+ ### Changed
121
+
122
+ - **`postinstall` and the bundled agent skill are unchanged in behaviour**; the
123
+ skill now states that `--compare` resolves a repository exactly.
124
+ - Internal `--compare` resolution is now shared by the CLI and the MCP server
125
+ instead of duplicated in both.
126
+
127
+ ---
128
+
9
129
  ## [9.8.1] — 2026-09-26 (released)
10
130
 
11
131
  ### Added
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 search-cli contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 search-cli contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -224,6 +224,15 @@ ghfind --completion fish | source
224
224
  | `Esc` | Close current overlay |
225
225
  | `q` | Quit ghfind |
226
226
 
227
+ **Error recovery** — active only while the matching error is in the status bar
228
+
229
+ | Key | Action |
230
+ | --- | --------------------------------------------- |
231
+ | `r` | Retry the failed search / trending load |
232
+ | `t` | Fix the GitHub token (401 bad token, 403 SSO) |
233
+ | `u` | Search without a token (401) |
234
+ | `c` | Change token (rate limit) |
235
+
227
236
  **Leader menu** — press `Space`, navigate with `↑`/`↓`, press `Enter` to dispatch
228
237
 
229
238
  Actions shown depend on current mode (search vs trending) and selection:
@@ -313,14 +322,14 @@ cd ghfind
313
322
  # With Bun (recommended for TUI)
314
323
  bun install
315
324
  bun start # TUI
316
- bun test # 414 tests
325
+ bun test # 516 tests
317
326
  bun run check # format check + tests — the green gate
318
327
  bun run build # build dist/
319
328
 
320
329
  # Or with npm
321
330
  npm install
322
331
  npm start # TUI (requires Node 20+)
323
- npm test # 414 tests
332
+ npm test # 516 tests
324
333
  npm run build # build dist/
325
334
 
326
335
  > Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) for commands,
@@ -331,23 +340,22 @@ npm run build # build dist/
331
340
 
332
341
  ## Known limitations
333
342
 
334
- **README image rendering is currently incomplete.** Images that do render look
335
- right, but several common cases silently show nothing:
336
-
337
- - **An image wrapped in a link does not render at all.** This is the common
338
- badge-and-screenshot style: `[![alt](shot.png)](https://example.com)`.
339
- The whole block is treated as prose and the image is dropped.
340
- - **An image smaller than 100px is skipped**, judged by the `width`/`height`
341
- the README declares in its `<img>` tag. A README that understates an
342
- image's size hides that image.
343
- - **SVG is not rendered** — the rasteriser cannot draw it.
344
- - Markdown `![](url)` images have no declared size, so they are downloaded
345
- before the size check can reject them. A README full of them is slow to open.
346
-
347
- A README using none of the above — plain `![]()` images and a few large
348
- banners — renders fine and fast. See
343
+ README image rendering has one deliberate blind spot and one hard one:
344
+
345
+ - **Images smaller than 100 px on any edge are skipped.** For `<img>` tags the
346
+ declared `width`/`height` is trusted, so an image that understates its size
347
+ is hidden (a README that _overstates_ nothing is never affected). Markdown
348
+ `![]()` images declare no size, so they are measured from the image header
349
+ instead — still before any pixels are decoded.
350
+ - **SVG is not rendered** — the rasteriser cannot draw it, so SVGs (and
351
+ badge-service images, which are tiny SVGs with text baked in) show an
352
+ `🖼 alt` caption instead.
353
+
354
+ An image wrapped in a link — `[![alt](shot.png)](url)`, the badge-and-screenshot
355
+ style — renders fine and keeps its link: the image cells carry an OSC 8
356
+ hyperlink, so clicking it opens the target in your browser. See
349
357
  [.issues/tickets/readme-image-rendering.md](.issues/tickets/readme-image-rendering.md)
350
- for the measurements and the remaining work.
358
+ for the architecture, measurements, and remaining work.
351
359
 
352
360
  ---
353
361
 
@@ -355,6 +363,25 @@ for the measurements and the remaining work.
355
363
 
356
364
  Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
357
365
 
366
+ ### v9.8.3
367
+
368
+ - **401/403 say what actually happened** — a rejected token and an authenticated-but-forbidden request (e.g. SAML/SSO enforcement) both used to report "Network error", naming a connectivity problem you didn't have; only genuine connectivity and server failures keep that message now
369
+ - **A rate-limited search no longer looks like an empty one** — the adapter used to swallow the error and render a silent, successful "no repositories found"; the real message reaches the status bar, and the `ghfind_search_repos` MCP tool returns `rateLimited: true` with backoff advice instead of a tool failure
370
+ - **Recover from errors without leaving the TUI** — while the matching error is in the status bar, `t` opens an inline token prompt (saves it and re-runs the failed query), `u` clears the token and retries unauthenticated, `c` swaps in a different token, `r` retries
371
+ - **A corrupted session no longer hijacks startup** — a `session.json` holding an MCP handshake blob used to skip the landing menu and auto-run that garbage as a search on every launch; the menu always comes first now, and both save and restore sanitize the session
372
+ - **Images wrapped in a link render now** — the badge-and-screenshot shape `[![alt](shot.png)](url)` rendered nothing at all, which cost `sst/opencode` its only image and `withastro/astro` 23 of its 25; the image cells carry an OSC 8 hyperlink, so clicking it opens the target
373
+ - **A README full of small images no longer floods the screen** — images the README declares under 100px on any edge are skipped before a request is made, and undeclared `![]()` images are measured from the image header before any pixel decode; on `openclaw/openclaw` (648 sponsor avatars) that is 649 fetches / 28.3s → 1 fetch / ~0.5s
374
+
375
+ ### v9.8.2
376
+
377
+ - **Security: tokens no longer leak into crash reports** — an uncaught error auto-built a GitHub issue URL from raw `process.argv`, so a `--token` value ended up in a public URL; every field is redacted now, and ghfind prints the URL to copy instead of opening a browser when it finds a credential
378
+ - **Security: your token is never sent to `raw.githubusercontent.com`** when fetching a README, only to `api.github.com` and only for a private repo
379
+ - **Security: untrusted skill sources are validated** before reaching a shell command or URL, so a hostile skills.sh entry cannot inject into `npx skills add`
380
+ - **Recoverable errors no longer open a bug-report tab** — rate limits, network blips and layout changes print a short message and exit
381
+ - **`--compare` resolves repositories exactly** in both the CLI and the `ghfind_compare_repos` MCP tool; it used a free-text search that could silently compare the wrong repo
382
+ - **State files are written atomically** — a crash mid-write used to leave truncated JSON that was silently replaced with defaults, losing bookmarks and history
383
+ - Fixed notification IDs restarting after "dismiss all", `history --delete` removing every duplicate, an invalid `--sort` degrading silently, a failed "load more" clearing the TUI's results, `--markdown` not escaping `|`, and a not-quite-LRU memory cache
384
+
358
385
  ### v9.8.1
359
386
 
360
387
  - **`ghfind skill search <query>`** finds agent skills by keyword and prints why
@@ -376,13 +403,6 @@ Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
376
403
  - **Images render inline — see [Known limitations](#known-limitations)** — relative and `/`-rooted paths resolve against the README's branch, `github.com/.../blob/...` links are rewritten to raw content, downloads are cached and size-capped, SVG and badge-service images are skipped, and anything unloadable falls back to an `🖼 alt` caption; press `i` in the viewer to toggle images
377
404
  - **No new dependencies** — the PNG decoder, image-to-cells rasteriser, and fetch cache are plain TypeScript, and images draw with truecolor half blocks, so they work on any truecolor terminal without image-protocol support
378
405
 
379
- ### v9.7.1
380
-
381
- - **In-app update actually works now** — it used to `bun install -g` into `~/.bun` while your running copy lives in an npm prefix, reporting success while nothing changed; it now detects which package manager owns the running install and updates it in place
382
- - **New `ghfind --doctor` check** — flags stale/PATH-shadowing global installs (multiple `ghfind` copies with different versions) and prints the exact uninstall command
383
- - **Windows URL fix** — links with query params were truncated at the first `&` by `cmd /c start`; every pre-filled crash-report/issue link now opens complete
384
- - Fixed `open-url` crashing under Node; CI now enforces lint + typecheck gates (first green Biome baseline)
385
-
386
406
  ## License
387
407
 
388
408
  MIT
@@ -1,55 +1,55 @@
1
- # ghfind bash completion
2
- # Source: source <(ghfind --completion bash)
3
-
4
- _ghfind() {
5
- local cur prev opts
6
- COMPREPLY=()
7
- cur="${COMP_WORDS[COMP_CWORD]}"
8
- prev="${COMP_WORDS[COMP_CWORD-1]}"
9
-
10
- opts="--json --csv --markdown --count --limit --sort --token --trending --language --since --pipe --format --registry --watch --interval --version --help --completion --remote --local --copy --raw --as pkg login init doctor org user mcp skill bookmarks history topics saved readme share trending deep-dive compare"
11
-
12
- case "${prev}" in
13
- --sort)
14
- COMPREPLY=( $(compgen -W "best-match stars updated forks" -- "${cur}") )
15
- return 0
16
- ;;
17
- --since)
18
- COMPREPLY=( $(compgen -W "daily weekly monthly" -- "${cur}") )
19
- return 0
20
- ;;
21
- --pipe)
22
- COMPREPLY=( $(compgen -W "clone open" -- "${cur}") )
23
- return 0
24
- ;;
25
- --format)
26
- COMPREPLY=( $(compgen -W "urls names ssh-urls clone-commands ids" -- "${cur}") )
27
- return 0
28
- ;;
29
- --completion)
30
- COMPREPLY=( $(compgen -W "bash zsh fish" -- "${cur}") )
31
- return 0
32
- ;;
33
- --as)
34
- COMPREPLY=( $(compgen -W "markdown plain gh-cli short" -- "${cur}") )
35
- return 0
36
- ;;
37
- --registry)
38
- COMPREPLY=( $(compgen -W "npm" -- "${cur}") )
39
- return 0
40
- ;;
41
- --language)
42
- COMPREPLY=( $(compgen -W "rust python typescript javascript go c c++ c# java ruby php swift kotlin zig" -- "${cur}") )
43
- return 0
44
- ;;
45
- --limit|--interval)
46
- return 0
47
- ;;
48
- *)
49
- ;;
50
- esac
51
-
52
- COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
53
- return 0
54
- }
55
- complete -F _ghfind ghfind
1
+ # ghfind bash completion
2
+ # Source: source <(ghfind --completion bash)
3
+
4
+ _ghfind() {
5
+ local cur prev opts
6
+ COMPREPLY=()
7
+ cur="${COMP_WORDS[COMP_CWORD]}"
8
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
9
+
10
+ opts="--json --csv --markdown --count --limit --sort --token --trending --language --since --pipe --format --registry --watch --interval --version --help --completion --remote --local --copy --raw --as pkg login init doctor org user mcp skill bookmarks history topics saved readme share trending deep-dive compare"
11
+
12
+ case "${prev}" in
13
+ --sort)
14
+ COMPREPLY=( $(compgen -W "best-match stars updated forks" -- "${cur}") )
15
+ return 0
16
+ ;;
17
+ --since)
18
+ COMPREPLY=( $(compgen -W "daily weekly monthly" -- "${cur}") )
19
+ return 0
20
+ ;;
21
+ --pipe)
22
+ COMPREPLY=( $(compgen -W "clone open" -- "${cur}") )
23
+ return 0
24
+ ;;
25
+ --format)
26
+ COMPREPLY=( $(compgen -W "urls names ssh-urls clone-commands ids" -- "${cur}") )
27
+ return 0
28
+ ;;
29
+ --completion)
30
+ COMPREPLY=( $(compgen -W "bash zsh fish" -- "${cur}") )
31
+ return 0
32
+ ;;
33
+ --as)
34
+ COMPREPLY=( $(compgen -W "markdown plain gh-cli short" -- "${cur}") )
35
+ return 0
36
+ ;;
37
+ --registry)
38
+ COMPREPLY=( $(compgen -W "npm" -- "${cur}") )
39
+ return 0
40
+ ;;
41
+ --language)
42
+ COMPREPLY=( $(compgen -W "rust python typescript javascript go c c++ c# java ruby php swift kotlin zig" -- "${cur}") )
43
+ return 0
44
+ ;;
45
+ --limit|--interval)
46
+ return 0
47
+ ;;
48
+ *)
49
+ ;;
50
+ esac
51
+
52
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
53
+ return 0
54
+ }
55
+ complete -F _ghfind ghfind
@@ -1,29 +1,29 @@
1
- # ghfind fish completion
2
- # Source: source (ghfind --completion fish | psub)
3
-
4
- complete -c ghfind -l json -d "JSON output"
5
- complete -c ghfind -l csv -d "CSV output"
6
- complete -c ghfind -l markdown -d "Markdown table output"
7
- complete -c ghfind -l count -d "Only result count"
8
- complete -c ghfind -l limit -d "Max results" -r
9
- complete -c ghfind -l sort -d "Sort strategy" -r -f -a "best-match stars updated forks"
10
- complete -c ghfind -l token -d "GitHub token" -r
11
- complete -c ghfind -l trending -d "Trending mode"
12
- complete -c ghfind -l language -d "Trending language filter" -r -f -a "rust python typescript javascript go c c++ c# java ruby php swift kotlin zig"
13
- complete -c ghfind -l since -d "Trending period" -r -f -a "daily weekly monthly"
14
- complete -c ghfind -l pipe -d "Pipe target" -r -f -a "clone open"
15
- complete -c ghfind -l format -d "Output format" -r -f -a "urls names ssh-urls clone-commands ids"
16
- complete -c ghfind -l registry -d "Registry for pkg" -r -f -a "npm"
17
-
18
- complete -c ghfind -l watch -d "Watch mode"
19
- complete -c ghfind -l interval -d "Watch interval seconds" -r
20
- complete -c ghfind -l version -d "Print version"
21
- complete -c ghfind -l help -d "Print help"
22
- complete -c ghfind -l completion -d "Shell" -r -f -a "bash zsh fish"
23
- complete -c ghfind -l as -d "Share format" -r -f -a "markdown plain gh-cli short"
24
- complete -c ghfind -l remote -d "Skill search: query skills.sh instead of this machine"
25
- complete -c ghfind -l local -d "Skill search: force the local scan (default)"
26
- complete -c ghfind -l copy -d "Share: also copy the snippet to the clipboard"
27
- complete -c ghfind -l raw -d "Readme: print the raw markdown with no header"
28
-
1
+ # ghfind fish completion
2
+ # Source: source (ghfind --completion fish | psub)
3
+
4
+ complete -c ghfind -l json -d "JSON output"
5
+ complete -c ghfind -l csv -d "CSV output"
6
+ complete -c ghfind -l markdown -d "Markdown table output"
7
+ complete -c ghfind -l count -d "Only result count"
8
+ complete -c ghfind -l limit -d "Max results" -r
9
+ complete -c ghfind -l sort -d "Sort strategy" -r -f -a "best-match stars updated forks"
10
+ complete -c ghfind -l token -d "GitHub token" -r
11
+ complete -c ghfind -l trending -d "Trending mode"
12
+ complete -c ghfind -l language -d "Trending language filter" -r -f -a "rust python typescript javascript go c c++ c# java ruby php swift kotlin zig"
13
+ complete -c ghfind -l since -d "Trending period" -r -f -a "daily weekly monthly"
14
+ complete -c ghfind -l pipe -d "Pipe target" -r -f -a "clone open"
15
+ complete -c ghfind -l format -d "Output format" -r -f -a "urls names ssh-urls clone-commands ids"
16
+ complete -c ghfind -l registry -d "Registry for pkg" -r -f -a "npm"
17
+
18
+ complete -c ghfind -l watch -d "Watch mode"
19
+ complete -c ghfind -l interval -d "Watch interval seconds" -r
20
+ complete -c ghfind -l version -d "Print version"
21
+ complete -c ghfind -l help -d "Print help"
22
+ complete -c ghfind -l completion -d "Shell" -r -f -a "bash zsh fish"
23
+ complete -c ghfind -l as -d "Share format" -r -f -a "markdown plain gh-cli short"
24
+ complete -c ghfind -l remote -d "Skill search: query skills.sh instead of this machine"
25
+ complete -c ghfind -l local -d "Skill search: force the local scan (default)"
26
+ complete -c ghfind -l copy -d "Share: also copy the snippet to the clipboard"
27
+ complete -c ghfind -l raw -d "Readme: print the raw markdown with no header"
28
+
29
29
  complete -c ghfind -f -a "login init doctor org user bookmarks history topics saved readme share pkg mcp skill trending deep-dive compare"
@@ -1,53 +1,53 @@
1
- # ghfind zsh completion
2
- # Source: source <(ghfind --completion zsh)
3
-
4
- _ghfind() {
5
- local -a opts
6
- opts=(
7
- '--json[JSON output]'
8
- '--csv[CSV output]'
9
- '--markdown[Markdown table output]'
10
- '--count[Only result count]'
11
- '--limit[Max results]:limit:'
12
- '--sort[Sort strategy]:(best-match stars updated forks)'
13
- '--token[GitHub token]:token:'
14
- '--trending[Trending mode]'
15
- '--language[Trending language filter]:language:'
16
- '--since[Trending period]:(daily weekly monthly)'
17
- '--pipe[Pipe target]:(clone open)'
18
- '--format[Output format]:(urls names ssh-urls clone-commands ids)'
19
- '--registry[Registry for pkg]:(npm)'
20
-
21
- '--watch[Watch mode]'
22
- '--interval[Watch interval seconds]:seconds:'
23
- '--version[Print version]'
24
- '--help[Print help]'
25
- '--completion[Shell]:(bash zsh fish)'
26
- '--as[Share format]:(markdown plain gh-cli short)'
27
- '--remote[Skill search: query skills.sh instead of this machine]'
28
- '--local[Skill search: force the local scan (default)]'
29
- '--copy[Share: also copy the snippet to the clipboard]'
30
- '--raw[Readme: print the raw markdown with no header]'
31
-
32
- 'login[Import a GitHub token from the gh CLI or paste one]'
33
- 'init[Run the setup wizard]'
34
- 'doctor[Environment diagnostics]'
35
- 'org[Org profile]:org name:'
36
- 'user[User profile]:user name:'
37
- 'bookmarks[List saved repos]:query:'
38
- 'history[List past searches]:query:'
39
- 'topics[Browse popular GitHub topics]'
40
- 'saved[List saved searches]'
41
- 'readme[Print a repository README]:owner/repo:'
42
- 'share[Print a share snippet]:owner/repo:'
43
- 'pkg[Search packages]:query:'
44
- 'trending[Trending repos, optionally by language]'
45
- 'deep-dive[Repo deep-dive: languages, contributors, README]:owner/repo:'
46
- 'mcp[Run the MCP server for AI agents (stdio)]'
47
- 'skill[Print an agent skill guide, or search with: skill search <query>]:skill name:'
48
- 'compare[Compare repositories]'
49
- )
50
- _arguments "${opts[@]}" '*:query:'
51
- }
52
-
1
+ # ghfind zsh completion
2
+ # Source: source <(ghfind --completion zsh)
3
+
4
+ _ghfind() {
5
+ local -a opts
6
+ opts=(
7
+ '--json[JSON output]'
8
+ '--csv[CSV output]'
9
+ '--markdown[Markdown table output]'
10
+ '--count[Only result count]'
11
+ '--limit[Max results]:limit:'
12
+ '--sort[Sort strategy]:(best-match stars updated forks)'
13
+ '--token[GitHub token]:token:'
14
+ '--trending[Trending mode]'
15
+ '--language[Trending language filter]:language:'
16
+ '--since[Trending period]:(daily weekly monthly)'
17
+ '--pipe[Pipe target]:(clone open)'
18
+ '--format[Output format]:(urls names ssh-urls clone-commands ids)'
19
+ '--registry[Registry for pkg]:(npm)'
20
+
21
+ '--watch[Watch mode]'
22
+ '--interval[Watch interval seconds]:seconds:'
23
+ '--version[Print version]'
24
+ '--help[Print help]'
25
+ '--completion[Shell]:(bash zsh fish)'
26
+ '--as[Share format]:(markdown plain gh-cli short)'
27
+ '--remote[Skill search: query skills.sh instead of this machine]'
28
+ '--local[Skill search: force the local scan (default)]'
29
+ '--copy[Share: also copy the snippet to the clipboard]'
30
+ '--raw[Readme: print the raw markdown with no header]'
31
+
32
+ 'login[Import a GitHub token from the gh CLI or paste one]'
33
+ 'init[Run the setup wizard]'
34
+ 'doctor[Environment diagnostics]'
35
+ 'org[Org profile]:org name:'
36
+ 'user[User profile]:user name:'
37
+ 'bookmarks[List saved repos]:query:'
38
+ 'history[List past searches]:query:'
39
+ 'topics[Browse popular GitHub topics]'
40
+ 'saved[List saved searches]'
41
+ 'readme[Print a repository README]:owner/repo:'
42
+ 'share[Print a share snippet]:owner/repo:'
43
+ 'pkg[Search packages]:query:'
44
+ 'trending[Trending repos, optionally by language]'
45
+ 'deep-dive[Repo deep-dive: languages, contributors, README]:owner/repo:'
46
+ 'mcp[Run the MCP server for AI agents (stdio)]'
47
+ 'skill[Print an agent skill guide, or search with: skill search <query>]:skill name:'
48
+ 'compare[Compare repositories]'
49
+ )
50
+ _arguments "${opts[@]}" '*:query:'
51
+ }
52
+
53
53
  compdef _ghfind ghfind