github-search-cli 9.6.0 → 9.7.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 +71 -0
- package/README.md +32 -26
- package/bin/ghfind.js +5 -5
- package/completions/ghfind.bash +5 -1
- package/completions/ghfind.fish +2 -1
- package/completions/ghfind.zsh +3 -0
- package/dist/cli.js +617 -258
- package/package.json +3 -2
- package/release-notes/9.7.0.md +53 -0
- package/release-notes/9.7.1.md +62 -0
- package/scripts/build.ts +1 -1
- package/scripts/postinstall.js +8 -8
- package/src/agent-skill.ts +7 -6
- package/src/cli.ts +139 -16
- package/src/compare.ts +81 -6
- package/src/config.ts +3 -3
- package/src/deepdive.ts +195 -24
- package/src/doctor.ts +144 -8
- package/src/error-report.ts +14 -8
- package/src/export.ts +1 -1
- package/src/history.ts +5 -5
- package/src/init.ts +2 -2
- package/src/login.ts +4 -4
- package/src/markdown-render.ts +13 -13
- package/src/mcp-server.ts +30 -58
- package/src/open-url.ts +16 -5
- package/src/output.ts +1 -1
- package/src/package-browser.ts +1 -1
- package/src/releases.ts +1 -14
- package/src/search-state.ts +1 -4
- package/src/search.ts +22 -4
- package/src/share.ts +2 -2
- package/src/storage.ts +4 -4
- package/src/themes.ts +1 -0
- package/src/trending-parser.ts +3 -4
- package/src/trending.ts +7 -7
- package/src/tui.ts +38 -42
- package/src/update-check.ts +96 -34
- package/src/version.ts +3 -3
- package/src/watch.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,77 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [9.7.1] — 2026-09-20 (released)
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **In-app update installed to the wrong location when running under Bun** —
|
|
14
|
+
`performUpdate()` ran `bun install -g github-search-cli`, which targets
|
|
15
|
+
Bun's own global dir (`~/.bun`), not the npm prefix the running copy and
|
|
16
|
+
its `ghfind` shim live in. The command exited 0 while the running install
|
|
17
|
+
never changed. The updater now detects which package manager owns the
|
|
18
|
+
running tree (`detectInstallLocation`: npm global vs `~/.bun` global) and
|
|
19
|
+
shells out to `npm install -g --prefix <prefix>` for npm-owned installs,
|
|
20
|
+
so the update lands exactly where the running install is.
|
|
21
|
+
- **Node fallback could not launch npm on Windows** — `child_process.spawn`
|
|
22
|
+
without a shell cannot execute `npm.cmd` (and recent Node rejects it with
|
|
23
|
+
`EINVAL`). The update spawn now goes through `node:child_process` on every
|
|
24
|
+
runtime with `shell: true` on win32 and properly quoted arguments, so the
|
|
25
|
+
Node fallback path actually works on Windows.
|
|
26
|
+
- **Compiled binaries / dev checkouts no longer fake an update** — when the
|
|
27
|
+
running install has no `node_modules` ancestor, self-update is refused
|
|
28
|
+
with a debug hint instead of npm-installing a copy the user isn't running.
|
|
29
|
+
- **Windows: URLs with query params were truncated at the first `&`** when opened via `cmd /c start` (every pre-filled crash-report/issue link lost its body and labels). Both openers now use `explorer.exe` on Windows, which receives the URL as a single argument.
|
|
30
|
+
- **`open-url.ts` crashed under Node** (`Bun.spawn` unconditional); now runtime-agnostic with a detached `child_process.spawn` fallback.
|
|
31
|
+
- **`--doctor` now detects stale/PATH-shadowing global installs** — multiple `ghfind` copies resolving to different versions are flagged with their prefixes and the exact uninstall command. This is the "updater said OK but nothing changed" trap.
|
|
32
|
+
- Lint gate was permanently broken: `package.json` pinned `biome@2.5.13` (package never existed on npm); now uses `@biomejs/biome` ^2.5.14 with a migrated `biome.json`.
|
|
33
|
+
- First clean lint baseline: 198 diagnostics triaged (auto-fixes + hand-fixes, incl. a dead `|| true` gate in `tui.ts` startup tips and an unsafe-autofix regression in `TrendingAdapter`); `tests/**` lint overrides for mocks/assertions; `tests/fixtures/**` excluded. CI now runs lint + typecheck on every push/PR (previously excluded as known-broken).
|
|
34
|
+
- `mcp-server.ts`: assignment-in-expression violations; `trending-parser.ts`: stateful `RegExp.exec` loop replaced with `matchAll` (lastIndex reuse hazard); `themes.ts`: documented ANSI control-char regex.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## [9.7.0] — 2026-09-19 (released)
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **CLI parity with the MCP tools** — the three MCP-only capabilities are now
|
|
43
|
+
first-class CLI commands:
|
|
44
|
+
- `ghfind deep-dive <owner/repo> [--json]` — language breakdown, top
|
|
45
|
+
contributors, and a README excerpt (previously MCP-only; the agent skill
|
|
46
|
+
doc told agents to `curl` instead).
|
|
47
|
+
- `ghfind --compare` accepts `--json|--csv|--markdown` (previously
|
|
48
|
+
text-only) and reports repos that failed to resolve; it exits non-zero
|
|
49
|
+
when fewer than 2 repos resolve.
|
|
50
|
+
- Trending language filter on the CLI: `ghfind trending <lang>` (the form
|
|
51
|
+
the README already advertised), `ghfind --trending <lang>`, and
|
|
52
|
+
`ghfind --trending --language <lang>` — validated against the same
|
|
53
|
+
accepted-language list as the MCP tool.
|
|
54
|
+
- `ghfind deep-dive --json` exposes a structured payload (language percents,
|
|
55
|
+
contributor counts, raw README) suitable for agents and scripting.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- The MCP server now shares its repo-ref parsing, trending-language
|
|
60
|
+
validation, and deep-dive data pipeline with the CLI via new seams in
|
|
61
|
+
`deepdive.ts` and `search.ts` (no protocol behavior change).
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
|
|
65
|
+
- **`ghfind mcp` failed to typecheck** — `processServerLine` declared `msg`
|
|
66
|
+
as a `let` binding, so TypeScript's aliased-conditional narrowing did not
|
|
67
|
+
apply and every `respond`/`respondError` call site errored on
|
|
68
|
+
`JsonRpcId | undefined`. HEAD did not compile. The id is now extracted
|
|
69
|
+
into a `const` before the notification check; runtime behavior is
|
|
70
|
+
unchanged (all 31 MCP tests pass against the previous behavior).
|
|
71
|
+
- **Deep-dive ran on a zeroed repo stub** — `ghfind deep-dive a/b --json`
|
|
72
|
+
reported `stars: 0`, `description: null`, and no timestamps because the
|
|
73
|
+
repo ref was never resolved. Both the CLI and the `ghfind_deep_dive` MCP
|
|
74
|
+
tool now fetch real repo metadata first (a 404 exits with
|
|
75
|
+
`Repo not found: owner/name`; network failures still degrade gracefully
|
|
76
|
+
to the stub).
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
9
80
|
## [9.6.0] — 2026-09-18 (released)
|
|
10
81
|
|
|
11
82
|
### Added
|
package/README.md
CHANGED
|
@@ -38,19 +38,19 @@ Or grab a **standalone binary** (no Node.js needed) from [GitHub Releases](https
|
|
|
38
38
|
|
|
39
39
|
## Why ghfind?
|
|
40
40
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| Repo search + qualifiers
|
|
44
|
-
| Trending repos (day/week/month/year)
|
|
45
|
-
| Full-screen TUI, keyboard-driven
|
|
46
|
-
| Bookmarks, tags & release tracking
|
|
47
|
-
| Side-by-side repo compare
|
|
48
|
-
| Deep-dive (
|
|
49
|
-
| npm package search
|
|
50
|
-
| Org profile
|
|
51
|
-
| User profile
|
|
52
|
-
| Pipeable JSON / CSV / Markdown export
|
|
53
|
-
| No login required
|
|
41
|
+
| | `ghfind` | `gh search` (GitHub CLI) | `hub` |
|
|
42
|
+
| ------------------------------------------- | -------- | ------------------------ | ----- |
|
|
43
|
+
| Repo search + qualifiers | ✅ | ✅ | ❌ |
|
|
44
|
+
| Trending repos (day/week/month/year) | ✅ | ❌ | ❌ |
|
|
45
|
+
| Full-screen TUI, keyboard-driven | ✅ | ❌ | ❌ |
|
|
46
|
+
| Bookmarks, tags & release tracking | ✅ | ❌ | ❌ |
|
|
47
|
+
| Side-by-side repo compare (JSON/CSV/MD) | ✅ | ❌ | ❌ |
|
|
48
|
+
| Deep-dive (languages, contributors, README) | ✅ | ❌ | ❌ |
|
|
49
|
+
| npm package search | ✅ | ❌ | ❌ |
|
|
50
|
+
| Org profile | ✅ | ✅ | ❌ |
|
|
51
|
+
| User profile | ✅ | ❌ | ❌ |
|
|
52
|
+
| Pipeable JSON / CSV / Markdown export | ✅ | JSON only | ❌ |
|
|
53
|
+
| No login required | ✅ | ❌ | ❌ |
|
|
54
54
|
|
|
55
55
|
> **No separate runtime needed!** Only requires Node.js 20+. The TUI needs Bun,
|
|
56
56
|
> which is downloaded automatically at install time. Non-interactive modes work
|
|
@@ -88,9 +88,12 @@ ghfind "query" --format urls # one URL per line
|
|
|
88
88
|
ghfind "query" --pipe open # open in browser
|
|
89
89
|
ghfind "query" --pipe clone # clone commands
|
|
90
90
|
ghfind --trending --json # trending as JSON
|
|
91
|
+
ghfind trending rust --json # trending, filtered by language
|
|
91
92
|
ghfind --watch "query" # poll every 300s
|
|
92
93
|
ghfind --releases # new releases for bookmarked repos
|
|
93
94
|
ghfind --compare a/b c/d # side-by-side comparison
|
|
95
|
+
ghfind --compare a/b c/d --json # comparison as JSON|CSV|Markdown
|
|
96
|
+
ghfind deep-dive a/b --json # deep-dive: languages, contributors, README
|
|
94
97
|
ghfind pkg "query" --json # npm package search as JSON
|
|
95
98
|
```
|
|
96
99
|
|
|
@@ -281,14 +284,14 @@ cd ghfind
|
|
|
281
284
|
# With Bun (recommended for TUI)
|
|
282
285
|
bun install
|
|
283
286
|
bun start # TUI
|
|
284
|
-
bun test #
|
|
287
|
+
bun test # 355 tests
|
|
285
288
|
bun run check # format check + tests — the green gate
|
|
286
289
|
bun run build # build dist/
|
|
287
290
|
|
|
288
291
|
# Or with npm
|
|
289
292
|
npm install
|
|
290
293
|
npm start # TUI (requires Node 20+)
|
|
291
|
-
npm test #
|
|
294
|
+
npm test # 355 tests
|
|
292
295
|
npm run build # build dist/
|
|
293
296
|
|
|
294
297
|
> Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) for commands,
|
|
@@ -301,6 +304,20 @@ npm run build # build dist/
|
|
|
301
304
|
|
|
302
305
|
Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
|
|
303
306
|
|
|
307
|
+
### v9.7.1
|
|
308
|
+
|
|
309
|
+
- **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
|
|
310
|
+
- **New `ghfind --doctor` check** — flags stale/PATH-shadowing global installs (multiple `ghfind` copies with different versions) and prints the exact uninstall command
|
|
311
|
+
- **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
|
+
- Fixed `open-url` crashing under Node; CI now enforces lint + typecheck gates (first green Biome baseline)
|
|
313
|
+
|
|
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
|
+
|
|
304
321
|
### v9.6.0
|
|
305
322
|
|
|
306
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)
|
|
@@ -309,17 +326,6 @@ Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
|
|
|
309
326
|
- **`NO_COLOR` support** — `ghfind --doctor` drops ANSI colors when `NO_COLOR` is set or stdout isn't a TTY
|
|
310
327
|
- Fixed the stale `scripts/brew.rb` formula (wrong repo, version, and asset names)
|
|
311
328
|
|
|
312
|
-
### v9.5.1
|
|
313
|
-
|
|
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
|
|
316
|
-
|
|
317
|
-
### v9.5.0
|
|
318
|
-
|
|
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
|
|
322
|
-
|
|
323
329
|
---
|
|
324
330
|
|
|
325
331
|
## License
|
package/bin/ghfind.js
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
* Strategy 2: Fall back to the bundled dist/cli.js with Node.js (works for
|
|
10
10
|
* non-interactive modes).
|
|
11
11
|
*/
|
|
12
|
-
import { existsSync } from "fs";
|
|
13
|
-
import { spawnSync } from "child_process";
|
|
14
|
-
import { join, dirname } from "path";
|
|
15
|
-
import { fileURLToPath, pathToFileURL } from "url";
|
|
16
|
-
import { platform } from "os";
|
|
12
|
+
import { existsSync } from "node:fs";
|
|
13
|
+
import { spawnSync } from "node:child_process";
|
|
14
|
+
import { join, dirname } from "node:path";
|
|
15
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
16
|
+
import { platform } from "node:os";
|
|
17
17
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
18
|
const PKG_DIR = join(__dirname, "..");
|
|
19
19
|
|
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 mcp skill"
|
|
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"
|
|
11
11
|
|
|
12
12
|
case "${prev}" in
|
|
13
13
|
--sort)
|
|
@@ -34,6 +34,10 @@ _ghfind() {
|
|
|
34
34
|
COMPREPLY=( $(compgen -W "npm" -- "${cur}") )
|
|
35
35
|
return 0
|
|
36
36
|
;;
|
|
37
|
+
--language)
|
|
38
|
+
COMPREPLY=( $(compgen -W "rust python typescript javascript go c c++ c# java ruby php swift kotlin zig" -- "${cur}") )
|
|
39
|
+
return 0
|
|
40
|
+
;;
|
|
37
41
|
--limit|--interval)
|
|
38
42
|
return 0
|
|
39
43
|
;;
|
package/completions/ghfind.fish
CHANGED
|
@@ -9,6 +9,7 @@ complete -c ghfind -l limit -d "Max results" -r
|
|
|
9
9
|
complete -c ghfind -l sort -d "Sort strategy" -r -f -a "best-match stars updated forks"
|
|
10
10
|
complete -c ghfind -l token -d "GitHub token" -r
|
|
11
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"
|
|
12
13
|
complete -c ghfind -l since -d "Trending period" -r -f -a "daily weekly monthly"
|
|
13
14
|
complete -c ghfind -l pipe -d "Pipe target" -r -f -a "clone open"
|
|
14
15
|
complete -c ghfind -l format -d "Output format" -r -f -a "urls names ssh-urls clone-commands ids"
|
|
@@ -20,4 +21,4 @@ complete -c ghfind -l version -d "Print version"
|
|
|
20
21
|
complete -c ghfind -l help -d "Print help"
|
|
21
22
|
complete -c ghfind -l completion -d "Shell" -r -f -a "bash zsh fish"
|
|
22
23
|
|
|
23
|
-
complete -c ghfind -f -a "login init doctor org pkg mcp skill"
|
|
24
|
+
complete -c ghfind -f -a "login init doctor org pkg mcp skill trending deep-dive"
|
package/completions/ghfind.zsh
CHANGED
|
@@ -12,6 +12,7 @@ _ghfind() {
|
|
|
12
12
|
'--sort[Sort strategy]:(best-match stars updated forks)'
|
|
13
13
|
'--token[GitHub token]:token:'
|
|
14
14
|
'--trending[Trending mode]'
|
|
15
|
+
'--language[Trending language filter]:language:'
|
|
15
16
|
'--since[Trending period]:(daily weekly monthly)'
|
|
16
17
|
'--pipe[Pipe target]:(clone open)'
|
|
17
18
|
'--format[Output format]:(urls names ssh-urls clone-commands ids)'
|
|
@@ -28,6 +29,8 @@ _ghfind() {
|
|
|
28
29
|
'doctor[Environment diagnostics]'
|
|
29
30
|
'org[Org profile]:org name:'
|
|
30
31
|
'pkg[Search packages]:query:'
|
|
32
|
+
'trending[Trending repos, optionally by language]'
|
|
33
|
+
'deep-dive[Repo deep-dive: languages, contributors, README]:owner/repo:'
|
|
31
34
|
'mcp[Run the MCP server for AI agents (stdio)]'
|
|
32
35
|
'skill[Print an agent skill guide]:skill name:'
|
|
33
36
|
)
|