github-search-cli 9.8.0 → 9.8.1
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 +46 -0
- package/README.md +70 -14
- package/completions/ghfind.bash +5 -1
- package/completions/ghfind.fish +6 -1
- package/completions/ghfind.zsh +14 -1
- package/dist/cli.js +694 -33
- package/package.json +1 -1
- package/release-notes/9.8.1.md +74 -0
- package/src/agent-skill.ts +14 -0
- package/src/cli.ts +413 -1
- package/src/image-loader.ts +30 -1
- package/src/markdown-view.ts +20 -4
- package/src/mcp-server.ts +60 -0
- package/src/readme.ts +54 -0
- package/src/skill-finder.ts +445 -0
- package/src/tui.ts +8 -22
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,52 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [9.8.1] — 2026-09-26 (released)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`ghfind skill search <query>`** finds agent skills by keyword and prints
|
|
14
|
+
why each one matched. The default scan reads `SKILL.md` files under
|
|
15
|
+
`~/.codex/skills`, `~/.agents/skills`, `<project>/.codex/skills` and
|
|
16
|
+
`<project>/.github/skills`, in that priority order and de-duplicated by name
|
|
17
|
+
(the user-level roots overlap heavily on real machines). `--remote` queries
|
|
18
|
+
the public [skills.sh](https://skills.sh) ecosystem instead and returns each
|
|
19
|
+
hit's install count and `npx skills add` command. `GHFIND_SKILL_ROOTS`
|
|
20
|
+
overrides which directories are scanned.
|
|
21
|
+
- **MCP tool `ghfind_skill_search`.** Agents can search skills the moment they
|
|
22
|
+
connect: `source: "local"` (the default) searches installed skills,
|
|
23
|
+
`source: "registry"` searches skills.sh. Read-only — it returns install
|
|
24
|
+
commands rather than running them, and never writes to disk.
|
|
25
|
+
- **Read-only CLI views of local state:** `ghfind bookmarks [query]`,
|
|
26
|
+
`ghfind history [query]`, `ghfind saved` and `ghfind topics`, each with
|
|
27
|
+
`--json` for agents. They print what the TUI has stored and never modify it.
|
|
28
|
+
- **`ghfind readme <owner/repo>`** prints a repository's README (`--raw` skips
|
|
29
|
+
the header, `--json` returns `{ owner, name, sourceUrl, text }`), bringing the
|
|
30
|
+
TUI's README viewer to scripts and agents.
|
|
31
|
+
- **`ghfind share <owner/repo>`** prints a share snippet
|
|
32
|
+
(`--as markdown|plain|gh-cli|short`), with `--copy` to also put it on the
|
|
33
|
+
clipboard.
|
|
34
|
+
- Shell completions (bash, zsh, fish) cover every new subcommand and flag.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- The bundled `ghfind-cli` agent skill documents the skill search and the new
|
|
39
|
+
read-only commands, so CLI-first agents discover them without reading
|
|
40
|
+
`--help`.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **README image rendering does not work on real repositories.** The v9.8.0
|
|
45
|
+
notes described inline images as working; that was wrong. An image wrapped
|
|
46
|
+
in a link (`[](url)`) renders nothing, and a README with
|
|
47
|
+
many small images — `openclaw/openclaw` has 648 48x48 avatars — becomes
|
|
48
|
+
15,552 rows tall. Images declaring an edge under 100px are skipped, and
|
|
49
|
+
SVG is not rendered at all. Plain `![]()` images and large banners do
|
|
50
|
+
render correctly. Root causes and remaining work:
|
|
51
|
+
`.issues/tickets/readme-image-rendering.md`.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
9
55
|
## [9.8.0] — 2026-09-22 (released)
|
|
10
56
|
|
|
11
57
|
### Added
|
package/README.md
CHANGED
|
@@ -95,8 +95,21 @@ ghfind --compare a/b c/d # side-by-side comparison
|
|
|
95
95
|
ghfind --compare a/b c/d --json # comparison as JSON|CSV|Markdown
|
|
96
96
|
ghfind deep-dive a/b --json # deep-dive: languages, contributors, README
|
|
97
97
|
ghfind pkg "query" --json # npm package search as JSON
|
|
98
|
+
# Read-only local state
|
|
99
|
+
ghfind bookmarks # saved repos, newest first
|
|
100
|
+
ghfind history --limit 20 # past searches
|
|
101
|
+
ghfind saved # named searches saved in the TUI
|
|
102
|
+
ghfind topics # popular GitHub topics
|
|
103
|
+
ghfind readme a/b # print a repo README (--raw for no header)
|
|
104
|
+
ghfind share a/b --as gh-cli # share snippet (--copy also copies it)
|
|
105
|
+
# Agent skills
|
|
106
|
+
ghfind skill search testing # skills installed on this machine
|
|
107
|
+
ghfind skill search testing --remote --json # the skills.sh ecosystem
|
|
98
108
|
```
|
|
99
109
|
|
|
110
|
+
`bookmarks`, `history`, `saved`, `topics`, `readme` and `share` are read-only:
|
|
111
|
+
they print what the TUI has stored but never modify local state.
|
|
112
|
+
|
|
100
113
|
## Use with AI agents
|
|
101
114
|
|
|
102
115
|
ghfind speaks the [Model Context Protocol](https://modelcontextprotocol.io) —
|
|
@@ -120,17 +133,29 @@ or in your MCP client config:
|
|
|
120
133
|
Exposed tools: `ghfind_search_repos`, `ghfind_trending`,
|
|
121
134
|
`ghfind_npm_packages`, `ghfind_org_profile`, `ghfind_user_profile`,
|
|
122
135
|
`ghfind_compare_repos`, `ghfind_deep_dive`, `ghfind_bookmarked_releases`,
|
|
123
|
-
|
|
136
|
+
`ghfind_skill` (a token-efficient CLI usage guide for agents), and
|
|
137
|
+
`ghfind_skill_search` (find agent skills, either installed on this machine or
|
|
138
|
+
in the public skills.sh ecosystem ? read-only, it never installs anything).
|
|
124
139
|
Unauthenticated requests are rate-limited to 60/hr — set `GITHUB_TOKEN`
|
|
125
140
|
in the environment for 5,000/hr.
|
|
126
141
|
|
|
127
142
|
CLI-first agents can skip MCP entirely:
|
|
128
143
|
|
|
129
144
|
```bash
|
|
130
|
-
ghfind skill
|
|
131
|
-
ghfind skill ghfind-cli
|
|
145
|
+
ghfind skill # list agent skills
|
|
146
|
+
ghfind skill ghfind-cli # print the token-efficient CLI guide
|
|
147
|
+
ghfind skill search testing # search installed skills (local scan)
|
|
148
|
+
ghfind skill search testing --remote --limit 10 --json # search skills.sh
|
|
132
149
|
```
|
|
133
150
|
|
|
151
|
+
`ghfind skill search` matches skill names first, then descriptions, and reads
|
|
152
|
+
the `SKILL.md` files under `~/.codex/skills`, `~/.agents/skills`,
|
|
153
|
+
`<project>/.codex/skills` and `<project>/.github/skills` (in that priority
|
|
154
|
+
order, de-duplicated by name). `--remote` queries the public
|
|
155
|
+
[skills.sh](https://skills.sh) ecosystem instead and returns the
|
|
156
|
+
`npx skills add` command for each hit, without installing anything. Set
|
|
157
|
+
`GHFIND_SKILL_ROOTS` to override which directories are scanned.
|
|
158
|
+
|
|
134
159
|
### Completions
|
|
135
160
|
|
|
136
161
|
```bash
|
|
@@ -164,6 +189,9 @@ ghfind --completion fish | source
|
|
|
164
189
|
<tr><td><b>Watch</b></td><td><code>--watch</code> — poll for new results</td></tr>
|
|
165
190
|
<tr><td><b>MCP server</b></td><td><code>ghfind mcp</code> — GitHub search as tools for AI agents (Claude Code, Cursor, …)</td></tr>
|
|
166
191
|
<tr><td><b>Agent skill</b></td><td><code>ghfind skill</code> — token-efficient CLI usage guide for coding agents</td></tr>
|
|
192
|
+
<tr><td><b>Skill search</b></td><td><code>ghfind skill search <query></code> — find installed skills, or <code>--remote</code> for the skills.sh ecosystem (also <code>ghfind_skill_search</code> over MCP)</td></tr>
|
|
193
|
+
<tr><td><b>Read-only state</b></td><td><code>ghfind bookmarks|history|saved|topics</code> — print local state and popular topics without modifying anything</td></tr>
|
|
194
|
+
<tr><td><b>README & share</b></td><td><code>ghfind readme a/b</code> and <code>ghfind share a/b --as gh-cli</code> — the TUI's <code>r</code> / <code>y</code> actions from the shell</td></tr>
|
|
167
195
|
</table>
|
|
168
196
|
|
|
169
197
|
<details>
|
|
@@ -272,7 +300,7 @@ Prefix with `-` to exclude. Supported: `language`, `stars`, `fork`, `archived`,
|
|
|
272
300
|
}
|
|
273
301
|
```
|
|
274
302
|
|
|
275
|
-
Env: `GITHUB_TOKEN`, `GHFIND_CONFIG`, `XDG_CONFIG_HOME`, `XDG_STATE_HOME`, `NO_COLOR` (disables colored `--doctor` output, per [no-color.org](https://no-color.org/))
|
|
303
|
+
Env: `GITHUB_TOKEN`, `GHFIND_CONFIG`, `GHFIND_SKILL_ROOTS` (path-separator separated skill directories for `ghfind skill search`), `XDG_CONFIG_HOME`, `XDG_STATE_HOME`, `NO_COLOR` (disables colored `--doctor` output, per [no-color.org](https://no-color.org/))
|
|
276
304
|
|
|
277
305
|
---
|
|
278
306
|
|
|
@@ -301,14 +329,51 @@ npm run build # build dist/
|
|
|
301
329
|
|
|
302
330
|
---
|
|
303
331
|
|
|
332
|
+
## Known limitations
|
|
333
|
+
|
|
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: `[](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 `` 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
|
|
349
|
+
[.issues/tickets/readme-image-rendering.md](.issues/tickets/readme-image-rendering.md)
|
|
350
|
+
for the measurements and the remaining work.
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
304
354
|
## Changelog
|
|
305
355
|
|
|
306
356
|
Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
|
|
307
357
|
|
|
358
|
+
### v9.8.1
|
|
359
|
+
|
|
360
|
+
- **`ghfind skill search <query>`** finds agent skills by keyword and prints why
|
|
361
|
+
each one matched; `--remote` searches the public [skills.sh](https://skills.sh)
|
|
362
|
+
ecosystem instead, and `GHFIND_SKILL_ROOTS` overrides the scanned directories
|
|
363
|
+
- **MCP tool `ghfind_skill_search`** — agents search installed skills or the
|
|
364
|
+
skills.sh registry as soon as they connect; read-only
|
|
365
|
+
- **Read-only CLI views of local state** — `ghfind bookmarks`, `ghfind history`,
|
|
366
|
+
`ghfind saved`, `ghfind topics`, plus `ghfind readme <owner/repo>` and
|
|
367
|
+
`ghfind share <owner/repo>`, each with `--json` for agents
|
|
368
|
+
- **Shell completions** (bash, zsh, fish) cover every new subcommand and flag
|
|
369
|
+
- **README image rendering is incomplete** — see
|
|
370
|
+
[Known limitations](#known-limitations); the v9.8.0 notes wrongly described it
|
|
371
|
+
as working
|
|
372
|
+
|
|
308
373
|
### v9.8.0
|
|
309
374
|
|
|
310
375
|
- **README viewer renders real markdown** — headings, emphasis, links, lists, blockquotes, boxed tables, and fenced code now come from OpenTUI's markdown renderable with a theme-derived syntax style instead of a box-drawing text approximation
|
|
311
|
-
- **Images render inline** — 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
|
|
376
|
+
- **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
|
|
312
377
|
- **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
|
|
313
378
|
|
|
314
379
|
### v9.7.1
|
|
@@ -318,15 +383,6 @@ Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
|
|
|
318
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
|
|
319
384
|
- Fixed `open-url` crashing under Node; CI now enforces lint + typecheck gates (first green Biome baseline)
|
|
320
385
|
|
|
321
|
-
### v9.7.0
|
|
322
|
-
|
|
323
|
-
- **CLI parity with the MCP tools** — `ghfind deep-dive <owner/repo>` (languages, contributors, README excerpt, `--json`), `ghfind --compare` with `--json|--csv|--markdown`, and a trending language filter (`ghfind trending rust`, `--trending <lang>`)
|
|
324
|
-
- **Deep-dive metadata fix** — real stars, description, and topics are fetched first instead of a zeroed stub; a 404 exits with `Repo not found`
|
|
325
|
-
- Fixed `ghfind mcp` failing to typecheck (JSON-RPC id narrowing; runtime behavior unchanged)
|
|
326
|
-
- The MCP server and CLI now share repo-ref parsing, language validation, and the deep-dive pipeline
|
|
327
|
-
|
|
328
|
-
---
|
|
329
|
-
|
|
330
386
|
## License
|
|
331
387
|
|
|
332
388
|
MIT
|
package/completions/ghfind.bash
CHANGED
|
@@ -7,7 +7,7 @@ _ghfind() {
|
|
|
7
7
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
8
8
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
9
9
|
|
|
10
|
-
opts="--json --csv --markdown --count --limit --sort --token --trending --language --since --pipe --format --registry --watch --interval --version --help --completion pkg login init doctor org mcp skill trending deep-dive"
|
|
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
11
|
|
|
12
12
|
case "${prev}" in
|
|
13
13
|
--sort)
|
|
@@ -30,6 +30,10 @@ _ghfind() {
|
|
|
30
30
|
COMPREPLY=( $(compgen -W "bash zsh fish" -- "${cur}") )
|
|
31
31
|
return 0
|
|
32
32
|
;;
|
|
33
|
+
--as)
|
|
34
|
+
COMPREPLY=( $(compgen -W "markdown plain gh-cli short" -- "${cur}") )
|
|
35
|
+
return 0
|
|
36
|
+
;;
|
|
33
37
|
--registry)
|
|
34
38
|
COMPREPLY=( $(compgen -W "npm" -- "${cur}") )
|
|
35
39
|
return 0
|
package/completions/ghfind.fish
CHANGED
|
@@ -20,5 +20,10 @@ complete -c ghfind -l interval -d "Watch interval seconds" -r
|
|
|
20
20
|
complete -c ghfind -l version -d "Print version"
|
|
21
21
|
complete -c ghfind -l help -d "Print help"
|
|
22
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"
|
|
23
28
|
|
|
24
|
-
complete -c ghfind -f -a "login init doctor org pkg mcp skill trending deep-dive"
|
|
29
|
+
complete -c ghfind -f -a "login init doctor org user bookmarks history topics saved readme share pkg mcp skill trending deep-dive compare"
|
package/completions/ghfind.zsh
CHANGED
|
@@ -23,16 +23,29 @@ _ghfind() {
|
|
|
23
23
|
'--version[Print version]'
|
|
24
24
|
'--help[Print help]'
|
|
25
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]'
|
|
26
31
|
|
|
27
32
|
'login[Import a GitHub token from the gh CLI or paste one]'
|
|
28
33
|
'init[Run the setup wizard]'
|
|
29
34
|
'doctor[Environment diagnostics]'
|
|
30
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:'
|
|
31
43
|
'pkg[Search packages]:query:'
|
|
32
44
|
'trending[Trending repos, optionally by language]'
|
|
33
45
|
'deep-dive[Repo deep-dive: languages, contributors, README]:owner/repo:'
|
|
34
46
|
'mcp[Run the MCP server for AI agents (stdio)]'
|
|
35
|
-
'skill[Print an agent skill guide]:skill name:'
|
|
47
|
+
'skill[Print an agent skill guide, or search with: skill search <query>]:skill name:'
|
|
48
|
+
'compare[Compare repositories]'
|
|
36
49
|
)
|
|
37
50
|
_arguments "${opts[@]}" '*:query:'
|
|
38
51
|
}
|