github-search-cli 9.5.0 → 9.6.0
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 +85 -3
- package/README.md +65 -31
- package/completions/ghfind.bash +1 -1
- package/completions/ghfind.fish +1 -1
- package/completions/ghfind.zsh +2 -0
- package/dist/cli.js +813 -10
- package/package.json +1 -1
- package/release-notes/9.5.1.md +36 -0
- package/release-notes/9.6.0.md +67 -0
- package/scripts/brew.rb +31 -10
- package/scripts/install.sh +118 -0
- package/src/agent-skill.ts +140 -0
- package/src/cli.ts +60 -4
- package/src/doctor.ts +4 -0
- package/src/help.ts +4 -0
- package/src/mcp-server.ts +894 -0
- package/src/search.ts +69 -5
- package/src/types.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,60 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## [
|
|
9
|
+
## [9.6.0] — 2026-09-18 (released)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **MCP server (beta)** (`ghfind mcp`) — ghfind now speaks the
|
|
14
|
+
[Model Context Protocol](https://modelcontextprotocol.io): any MCP client
|
|
15
|
+
(Claude Code, Cursor, Codex, …) can call GitHub search as tools over stdio.
|
|
16
|
+
Zero new dependencies — the server is a small JSON-RPC 2.0 layer over the
|
|
17
|
+
existing modules. Nine tools: `ghfind_search_repos`, `ghfind_trending`,
|
|
18
|
+
`ghfind_npm_packages`, `ghfind_org_profile`, `ghfind_user_profile`,
|
|
19
|
+
`ghfind_compare_repos`, `ghfind_deep_dive`, `ghfind_bookmarked_releases`,
|
|
20
|
+
and `ghfind_skill`. Implements the 2025-06-18 lifecycle (initialize →
|
|
21
|
+
initialized notification → operation), speaks 2025-06-18 / 2025-03-26 /
|
|
22
|
+
2024-11-05, reports tool failures as `isError` results per spec, and logs
|
|
23
|
+
agent searches into the TUI history. `ghfind mcp --token <t>` pins a token;
|
|
24
|
+
otherwise config/`GITHUB_TOKEN` applies.
|
|
25
|
+
- **Agent skill (beta)** (`ghfind skill [name]`) — a token-efficient CLI usage guide
|
|
26
|
+
for coding agents (search syntax, flags, rate limits, token-efficiency
|
|
27
|
+
tips) so they stop parsing `--help`. Bare `ghfind skill` lists the catalog;
|
|
28
|
+
the registry (`src/agent-skill.ts`) is generic, so third parties can
|
|
29
|
+
register their own skills alongside the built-in `ghfind-cli` one.
|
|
30
|
+
- **Trending language filter** — `SearchOptions.trendingLanguage` and the
|
|
31
|
+
`ghfind_trending` MCP tool accept a github.com/trending language slug
|
|
32
|
+
(`rust`, `python`, …); `buildTrendingUrl` validates against the known
|
|
33
|
+
language list and drops unknown slugs instead of scraping an error page.
|
|
34
|
+
- **`NO_COLOR` support** — `ghfind --doctor` no longer emits ANSI color
|
|
35
|
+
codes when `NO_COLOR` is set (any value, per
|
|
36
|
+
[no-color.org](https://no-color.org/)) or when stdout is not a TTY.
|
|
37
|
+
- **curl installer** (`scripts/install.sh`) — downloads the standalone
|
|
38
|
+
binary for the detected platform from GitHub Releases, verifies it
|
|
39
|
+
against the release's `SHA256SUMS.txt`, installs to `~/.local/bin` or
|
|
40
|
+
`/usr/local/bin` (overridable with `GHFIND_INSTALL_DIR`, never needs
|
|
41
|
+
sudo), and prints a PATH hint when needed.
|
|
42
|
+
- **`SHA256SUMS.txt` on every release** — new `checksums` job in the
|
|
43
|
+
release workflow merges all platform binaries' checksums into one
|
|
44
|
+
file attached to the GitHub Release; the curl installer and package
|
|
45
|
+
maintainers verify against it.
|
|
46
|
+
- **Community health files** — `SECURITY.md` (private vulnerability
|
|
47
|
+
reporting), `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1), and
|
|
48
|
+
`SUPPORT.md` (routes users to `--doctor`, issues, and discussions).
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- **`scripts/brew.rb` formula was stale and broken** — pointed at the
|
|
53
|
+
wrong repo (`frank/search-cli`), version 0.1.0, and `search-cli-*`
|
|
54
|
+
asset names that never matched the release artifacts. Now targets
|
|
55
|
+
`codersdfs/search-cli` releases with the correct `ghfind-*` asset
|
|
56
|
+
names (plus linux-arm64), a livecheck block, and a version-pinning
|
|
57
|
+
test. Still a template: SHA256 placeholders are filled from
|
|
58
|
+
`SHA256SUMS.txt` when the tap lands.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## [9.5.1] — 2026-09-15
|
|
10
63
|
|
|
11
64
|
### Fixed
|
|
12
65
|
|
|
@@ -20,7 +73,6 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
|
|
|
20
73
|
screen. Also fixed while routing keys: `b` on the landing screen now opens
|
|
21
74
|
bookmarks (hint bar updated), and overlays opened from landing hide the
|
|
22
75
|
menu instead of drawing on top of it.
|
|
23
|
-
|
|
24
76
|
- **Update panel clipped the changelog** — the modal was hard-capped at 16
|
|
25
77
|
rows and put the release notes in a single unsized text block, so anything
|
|
26
78
|
past the first ~10 lines of the notes was invisible with no hint that more
|
|
@@ -30,10 +82,40 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
|
|
|
30
82
|
position resets each time the panel opens. The box is taller (24 rows), and
|
|
31
83
|
notes render at the panel's actual width so wrapped lines no longer clip
|
|
32
84
|
horizontally on narrow terminals.
|
|
85
|
+
- **`--help` listed `ghfind user <name>` twice** — the 9.5.0 usage block
|
|
86
|
+
carried a duplicated line, so the profile examples were printed twice. It
|
|
87
|
+
now appears once, and the `ghfind pkg` line is aligned with its neighbours.
|
|
88
|
+
|
|
89
|
+
### Internal
|
|
90
|
+
|
|
91
|
+
- **Test isolation** — seven suites derived their temp dirs from a
|
|
92
|
+
`Date.now()` stamp (`tmpdir()/<name>-<ms>`), a name two concurrent
|
|
93
|
+
`bun test` processes can collide on, which intermittently failed
|
|
94
|
+
bookmarks / config / doctor / history / login / saved-searches /
|
|
95
|
+
update-check tests. They now use `mkdtempSync`, which is unique and
|
|
96
|
+
collision-proof (the pattern `tests/releases.test.ts` already used), and
|
|
97
|
+
the login `readGhCliToken` / `persistToken` dirs are removed after use
|
|
98
|
+
instead of accumulating in the temp folder.
|
|
99
|
+
- **Docs sync** (README ↔ `src/help.ts` ↔ `--help`): README gained
|
|
100
|
+
`--releases` / `--compare` / `pkg` examples plus Packages and Releases
|
|
101
|
+
feature rows; the TUI help screen gained the `Org profile` command-menu
|
|
102
|
+
entry the leader menu already had. `tests/cli-help.test.ts` pins the
|
|
103
|
+
`--help` usage block (no duplicate rows, one description column).
|
|
104
|
+
- `package-lock.json` root version synced to 9.5.1 (`bun.lock` carries no
|
|
105
|
+
root version), and the release workflow's manual dispatch now runs the
|
|
106
|
+
gate only — the GitHub Release and npm publish jobs are tag-gated, so
|
|
107
|
+
dispatching from a branch can't create a release on a non-tag ref.
|
|
108
|
+
- `--doctor` tests remove their temp config dirs after each test instead of
|
|
109
|
+
leaving them behind.
|
|
110
|
+
- **CI was red on `windows-latest`** — `tests/landing.test.ts` source-greps
|
|
111
|
+
`src/tui.ts` for a snippet containing `\n`, but Windows checks the tree out
|
|
112
|
+
with CRLF, so the assertion could never match there while every other OS
|
|
113
|
+
passed. The source-grep helpers now normalise line endings before
|
|
114
|
+
asserting; `tests/overlay-registry.test.ts` does the same.
|
|
33
115
|
|
|
34
116
|
---
|
|
35
117
|
|
|
36
|
-
## [9.5.0] — 2026-09-15
|
|
118
|
+
## [9.5.0] — 2026-09-15 (released)
|
|
37
119
|
|
|
38
120
|
### Added
|
|
39
121
|
|
package/README.md
CHANGED
|
@@ -26,6 +26,14 @@
|
|
|
26
26
|
npm install -g github-search-cli
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
Or via the **curl installer** (Linux/macOS — downloads the standalone
|
|
30
|
+
binary, verifies its SHA256 against the release checksums, no Node
|
|
31
|
+
needed):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
curl -fsSL https://raw.githubusercontent.com/codersdfs/search-cli/main/scripts/install.sh | sh
|
|
35
|
+
```
|
|
36
|
+
|
|
29
37
|
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
38
|
|
|
31
39
|
## Why ghfind?
|
|
@@ -81,6 +89,43 @@ ghfind "query" --pipe open # open in browser
|
|
|
81
89
|
ghfind "query" --pipe clone # clone commands
|
|
82
90
|
ghfind --trending --json # trending as JSON
|
|
83
91
|
ghfind --watch "query" # poll every 300s
|
|
92
|
+
ghfind --releases # new releases for bookmarked repos
|
|
93
|
+
ghfind --compare a/b c/d # side-by-side comparison
|
|
94
|
+
ghfind pkg "query" --json # npm package search as JSON
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Use with AI agents
|
|
98
|
+
|
|
99
|
+
ghfind speaks the [Model Context Protocol](https://modelcontextprotocol.io) —
|
|
100
|
+
any MCP client (Claude Code, Cursor, Codex, …) can call its GitHub search
|
|
101
|
+
as tools:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
claude mcp add ghfind -- ghfind mcp
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
or in your MCP client config:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"mcpServers": {
|
|
112
|
+
"ghfind": { "command": "ghfind", "args": ["mcp"] }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Exposed tools: `ghfind_search_repos`, `ghfind_trending`,
|
|
118
|
+
`ghfind_npm_packages`, `ghfind_org_profile`, `ghfind_user_profile`,
|
|
119
|
+
`ghfind_compare_repos`, `ghfind_deep_dive`, `ghfind_bookmarked_releases`,
|
|
120
|
+
and `ghfind_skill` (a token-efficient CLI usage guide for agents).
|
|
121
|
+
Unauthenticated requests are rate-limited to 60/hr — set `GITHUB_TOKEN`
|
|
122
|
+
in the environment for 5,000/hr.
|
|
123
|
+
|
|
124
|
+
CLI-first agents can skip MCP entirely:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
ghfind skill # list agent skills
|
|
128
|
+
ghfind skill ghfind-cli # print the token-efficient CLI guide
|
|
84
129
|
```
|
|
85
130
|
|
|
86
131
|
### Completions
|
|
@@ -98,6 +143,7 @@ ghfind --completion fish | source
|
|
|
98
143
|
<table>
|
|
99
144
|
<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>
|
|
100
145
|
<tr><td><b>Trending</b></td><td>Today, week, month, year — filter by language</td></tr>
|
|
146
|
+
<tr><td><b>Packages</b></td><td>npm registry search (beta) — <code>ghfind pkg "query"</code></td></tr>
|
|
101
147
|
<tr><td><b>Bookmarks</b></td><td>Space → Bookmark / Bookmarks panel — save repos, tag them</td></tr>
|
|
102
148
|
<tr><td><b>Deep-dive</b></td><td>Space → Deep-dive — languages, contributors, README, activity chart</td></tr>
|
|
103
149
|
<tr><td><b>Compare</b></td><td>Space → Compare select / Compare view — side-by-side, select 2+ repos</td></tr>
|
|
@@ -109,9 +155,12 @@ ghfind --completion fish | source
|
|
|
109
155
|
<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>
|
|
110
156
|
<tr><td><b>User profile</b></td><td>User summary like org profile — repos, stars, followers, top languages (<code>ghfind user <name></code>)</td></tr>
|
|
111
157
|
<tr><td><b>Notifications</b></td><td>Space → Notifications — view & dismiss alerts</td></tr>
|
|
158
|
+
<tr><td><b>Releases</b></td><td><code>--releases</code> — new-release feed for bookmarked repos</td></tr>
|
|
112
159
|
<tr><td><b>Graph</b></td><td>Space → Activity graph — commit chart, fullscreen toggle</td></tr>
|
|
113
160
|
<tr><td><b>Help</b></td><td><code>?</code> / <code>Ctrl+H</code> — keybindings reference</td></tr>
|
|
114
161
|
<tr><td><b>Watch</b></td><td><code>--watch</code> — poll for new results</td></tr>
|
|
162
|
+
<tr><td><b>MCP server</b></td><td><code>ghfind mcp</code> — GitHub search as tools for AI agents (Claude Code, Cursor, …)</td></tr>
|
|
163
|
+
<tr><td><b>Agent skill</b></td><td><code>ghfind skill</code> — token-efficient CLI usage guide for coding agents</td></tr>
|
|
115
164
|
</table>
|
|
116
165
|
|
|
117
166
|
<details>
|
|
@@ -219,7 +268,7 @@ Prefix with `-` to exclude. Supported: `language`, `stars`, `fork`, `archived`,
|
|
|
219
268
|
}
|
|
220
269
|
```
|
|
221
270
|
|
|
222
|
-
Env: `GITHUB_TOKEN`, `GHFIND_CONFIG`, `XDG_CONFIG_HOME`, `XDG_STATE_HOME`
|
|
271
|
+
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/))
|
|
223
272
|
|
|
224
273
|
---
|
|
225
274
|
|
|
@@ -232,14 +281,14 @@ cd ghfind
|
|
|
232
281
|
# With Bun (recommended for TUI)
|
|
233
282
|
bun install
|
|
234
283
|
bun start # TUI
|
|
235
|
-
bun test #
|
|
284
|
+
bun test # 335 tests
|
|
236
285
|
bun run check # format check + tests — the green gate
|
|
237
286
|
bun run build # build dist/
|
|
238
287
|
|
|
239
288
|
# Or with npm
|
|
240
289
|
npm install
|
|
241
290
|
npm start # TUI (requires Node 20+)
|
|
242
|
-
npm test #
|
|
291
|
+
npm test # 335 tests
|
|
243
292
|
npm run build # build dist/
|
|
244
293
|
|
|
245
294
|
> Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) for commands,
|
|
@@ -252,39 +301,24 @@ npm run build # build dist/
|
|
|
252
301
|
|
|
253
302
|
Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
|
|
254
303
|
|
|
255
|
-
### v9.
|
|
256
|
-
|
|
257
|
-
- New `ghfind user <name>` command — user profiles like `ghfind org`: repos, total stars/forks, followers, top languages, top repos
|
|
258
|
-
- Supports `--json`, `--csv`, `--markdown`, `--count`, `--limit`, `--token`; `@` prefix accepted
|
|
259
|
-
- Fixed `ghfind org` mangling multi-word names with dashes
|
|
260
|
-
- Fixed landing-screen keys leaking into the main view — `/`, `Space`, `t`, `c`, `?`, `q` all double-fired; `b` on the landing screen now opens Bookmarks
|
|
261
|
-
- Fixed the update panel clipping the changelog — release notes are now scrollable (`↑↓`/`j`/`k`, `PgUp`/`PgDn`, `Home`/`End`) in a taller panel
|
|
262
|
-
|
|
263
|
-
### v9.3.0
|
|
264
|
-
|
|
265
|
-
- 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`, `?`)
|
|
266
|
-
- README viewer renders full markdown (headings, code blocks, lists, tables, blockquotes, rules) instead of stripping formatting
|
|
267
|
-
- Widened compare table columns (min 35 chars), added Description + URL rows, and raised the topic cap to 5 per repo
|
|
268
|
-
|
|
269
|
-
### v9.2.1
|
|
304
|
+
### v9.6.0
|
|
270
305
|
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
274
|
-
-
|
|
306
|
+
- **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)
|
|
307
|
+
- **Agent skill (beta)** — `ghfind skill` gives coding agents a token-efficient usage guide; `ghfind trending` accepts a language filter (`ghfind trending rust`)
|
|
308
|
+
- **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`
|
|
309
|
+
- **`NO_COLOR` support** — `ghfind --doctor` drops ANSI colors when `NO_COLOR` is set or stdout isn't a TTY
|
|
310
|
+
- Fixed the stale `scripts/brew.rb` formula (wrong repo, version, and asset names)
|
|
275
311
|
|
|
276
|
-
### v9.
|
|
312
|
+
### v9.5.1
|
|
277
313
|
|
|
278
|
-
-
|
|
279
|
-
-
|
|
314
|
+
- Fixed landing-screen keys leaking into the main view — `/`, `Space`, `t`, `c`, `?`, `q` all double-fired; `b` on the landing screen now opens Bookmarks
|
|
315
|
+
- Fixed the update panel clipping the changelog — release notes are now scrollable (`↑↓`/`j`/`k`, `PgUp`/`PgDn`, `Home`/`End`) in a taller panel
|
|
280
316
|
|
|
281
|
-
### v9.
|
|
317
|
+
### v9.5.0
|
|
282
318
|
|
|
283
|
-
-
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
- Tab qualifier auto-complete, PageUp/PageDown, `Ctrl+X` clear history, `Ctrl+C` clear notifications
|
|
287
|
-
- TUI runs on Node.js 20+ via the downloaded Bun binary
|
|
319
|
+
- New `ghfind user <name>` command — user profiles like `ghfind org`: repos, total stars/forks, followers, top languages, top repos
|
|
320
|
+
- Supports `--json`, `--csv`, `--markdown`, `--count`, `--limit`, `--token`; `@` prefix accepted
|
|
321
|
+
- Fixed `ghfind org` mangling multi-word names with dashes
|
|
288
322
|
|
|
289
323
|
---
|
|
290
324
|
|
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 --since --pipe --format --registry --watch --interval --version --help --completion pkg login init doctor org"
|
|
10
|
+
opts="--json --csv --markdown --count --limit --sort --token --trending --since --pipe --format --registry --watch --interval --version --help --completion pkg login init doctor org mcp skill"
|
|
11
11
|
|
|
12
12
|
case "${prev}" in
|
|
13
13
|
--sort)
|
package/completions/ghfind.fish
CHANGED
|
@@ -20,4 +20,4 @@ complete -c ghfind -l version -d "Print version"
|
|
|
20
20
|
complete -c ghfind -l help -d "Print help"
|
|
21
21
|
complete -c ghfind -l completion -d "Shell" -r -f -a "bash zsh fish"
|
|
22
22
|
|
|
23
|
-
complete -c ghfind -f -a "login init doctor org pkg"
|
|
23
|
+
complete -c ghfind -f -a "login init doctor org pkg mcp skill"
|
package/completions/ghfind.zsh
CHANGED
|
@@ -28,6 +28,8 @@ _ghfind() {
|
|
|
28
28
|
'doctor[Environment diagnostics]'
|
|
29
29
|
'org[Org profile]:org name:'
|
|
30
30
|
'pkg[Search packages]:query:'
|
|
31
|
+
'mcp[Run the MCP server for AI agents (stdio)]'
|
|
32
|
+
'skill[Print an agent skill guide]:skill name:'
|
|
31
33
|
)
|
|
32
34
|
_arguments "${opts[@]}" '*:query:'
|
|
33
35
|
}
|