github-search-cli 9.7.1 → 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 CHANGED
@@ -6,6 +6,86 @@ 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 (`[![alt](shot.png)](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
+
55
+ ## [9.8.0] — 2026-09-22 (released)
56
+
57
+ ### Added
58
+
59
+ - **README viewer now renders full markdown, including inline images.** The
60
+ viewer used to approximate markdown with box-drawing text; it now drives
61
+ OpenTUI's `MarkdownRenderable` with a theme-derived syntax style, so
62
+ headings, emphasis, links, lists, blockquotes, boxed tables, and fenced
63
+ code blocks render as markdown rather than as decorated plain text.
64
+ - **Images in READMEs render in the terminal.** Relative and root-relative
65
+ paths resolve against the branch the README was loaded from,
66
+ `github.com/.../blob/...` links are rewritten to raw content, and downloads
67
+ are cached and capped by size. SVG and badge-service images are skipped
68
+ (they carry text that survives rasterising poorly), and anything that fails
69
+ to load falls back to an `🖼 alt text` caption. Images are drawn with
70
+ truecolor half blocks, so they work on any truecolor terminal with no image
71
+ protocol support; press `i` in the viewer to toggle them off. The pipeline
72
+ lives in `src/png.ts` (PNG decoder), `src/image-render.ts`
73
+ (image → cells), `src/image-loader.ts` (URL resolution + fetch cache),
74
+ `src/markdown-images.ts` (token helpers) and `src/markdown-view.ts` (the
75
+ renderable), and degrades to captions on runtimes without `Bun.Image`.
76
+
77
+ ### Changed
78
+
79
+ - **The update modal's release notes render as markdown too.** The in-app
80
+ update panel reused the same text approximation as the README viewer; it
81
+ now shares `MarkdownRenderable` via the new view, so release notes show
82
+ real headings, lists, inline code, and boxed tables. Inline images stay
83
+ off there (the panel is narrow and notes are prose).
84
+ - With both surfaces migrated, the plain-text markdown renderer
85
+ (`src/markdown-render.ts`) is no longer used and has been removed.
86
+
87
+ ---
88
+
9
89
  ## [9.7.1] — 2026-09-20 (released)
10
90
 
11
91
  ### Fixed
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
- and `ghfind_skill` (a token-efficient CLI usage guide for agents).
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 # list agent skills
131
- ghfind skill ghfind-cli # print the token-efficient CLI guide
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 &lt;query&gt;</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 &amp; 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>
@@ -207,7 +235,7 @@ Actions shown depend on current mode (search vs trending) and selection:
207
235
  | Refresh | Re-run current search (or reload trending) |
208
236
  | Toggle trending | Switch between search and trending views |
209
237
  | Deep-dive | Show languages, contributors, README excerpt |
210
- | Readme | Full README viewer |
238
+ | Readme | Full markdown README viewer (inline images included) |
211
239
  | Activity graph | Toggle commit chart fullscreen |
212
240
  | Bookmark | Save / unsave selected repo |
213
241
  | Compare | Add/remove repo to comparison set |
@@ -233,6 +261,7 @@ Actions shown depend on current mode (search vs trending) and selection:
233
261
  | `d` | History / Bookmarks / Saved searches / Notifications | Delete current entry |
234
262
  | `Ctrl+X` | History | Clear all history |
235
263
  | `Ctrl+C` | Notifications | Dismiss all notifications |
264
+ | `i` | README viewer | Toggle inline images on/off |
236
265
  | `Y` / `N` / `L` | Update modal | Yes (install) / No (skip) / Later (dismiss) |
237
266
  | `↑` / `↓` — `j` / `k` | Update modal | Scroll release notes |
238
267
  | `PgUp` / `PgDn` / `Home` / `End` | Update modal | Jump through release notes |
@@ -271,7 +300,7 @@ Prefix with `-` to exclude. Supported: `language`, `stars`, `fork`, `archived`,
271
300
  }
272
301
  ```
273
302
 
274
- 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/))
275
304
 
276
305
  ---
277
306
 
@@ -284,14 +313,14 @@ cd ghfind
284
313
  # With Bun (recommended for TUI)
285
314
  bun install
286
315
  bun start # TUI
287
- bun test # 355 tests
316
+ bun test # 414 tests
288
317
  bun run check # format check + tests — the green gate
289
318
  bun run build # build dist/
290
319
 
291
320
  # Or with npm
292
321
  npm install
293
322
  npm start # TUI (requires Node 20+)
294
- npm test # 355 tests
323
+ npm test # 414 tests
295
324
  npm run build # build dist/
296
325
 
297
326
  > Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) for commands,
@@ -300,10 +329,53 @@ npm run build # build dist/
300
329
 
301
330
  ---
302
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: `[![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
349
+ [.issues/tickets/readme-image-rendering.md](.issues/tickets/readme-image-rendering.md)
350
+ for the measurements and the remaining work.
351
+
352
+ ---
353
+
303
354
  ## Changelog
304
355
 
305
356
  Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
306
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
+
373
+ ### v9.8.0
374
+
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
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
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
378
+
307
379
  ### v9.7.1
308
380
 
309
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
@@ -311,23 +383,6 @@ Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
311
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
312
384
  - Fixed `open-url` crashing under Node; CI now enforces lint + typecheck gates (first green Biome baseline)
313
385
 
314
- ### v9.7.0
315
-
316
- - **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>`)
317
- - **Deep-dive metadata fix** — real stars, description, and topics are fetched first instead of a zeroed stub; a 404 exits with `Repo not found`
318
- - Fixed `ghfind mcp` failing to typecheck (JSON-RPC id narrowing; runtime behavior unchanged)
319
- - The MCP server and CLI now share repo-ref parsing, language validation, and the deep-dive pipeline
320
-
321
- ### v9.6.0
322
-
323
- - **MCP server (beta)** — `ghfind mcp` turns ghfind into a tool server: Claude Code, Cursor, Codex, and any MCP client can call GitHub search over stdio (nine tools, no new dependencies)
324
- - **Agent skill (beta)** — `ghfind skill` gives coding agents a token-efficient usage guide; `ghfind trending` accepts a language filter (`ghfind trending rust`)
325
- - **curl installer** — `curl -fsSL https://raw.githubusercontent.com/codersdfs/search-cli/main/scripts/install.sh | sh` downloads the standalone binary and verifies it against the release's `SHA256SUMS.txt`
326
- - **`NO_COLOR` support** — `ghfind --doctor` drops ANSI colors when `NO_COLOR` is set or stdout isn't a TTY
327
- - Fixed the stale `scripts/brew.rb` formula (wrong repo, version, and asset names)
328
-
329
- ---
330
-
331
386
  ## License
332
387
 
333
388
  MIT
@@ -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
@@ -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"
@@ -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
  }