@gkoreli/ghx 2.1.10 → 2.1.12
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/README.md +10 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -56,6 +56,10 @@ No install step — npx downloads and caches the binary on first run.
|
|
|
56
56
|
ghx explore <owner/repo> # Branch + tree + README in 1 API call
|
|
57
57
|
ghx explore <owner/repo> <path> # Subdirectory listing
|
|
58
58
|
ghx read <owner/repo> <f1> [f2] [f3] # Read 1-10 files (GraphQL batching)
|
|
59
|
+
ghx read <owner/repo> "src/**/*.ts" --map # Glob patterns with structural map
|
|
60
|
+
ghx read <owner/repo> --map <f1> [f2] # Signatures, imports, types (~92% token reduction)
|
|
61
|
+
ghx read <owner/repo> --grep "pat" <f> # Matching lines only (ERE regex, 2 lines context)
|
|
62
|
+
ghx read <owner/repo> --lines 42-80 <f> # Specific line range
|
|
59
63
|
ghx search "<query>" # Code search with matching lines
|
|
60
64
|
ghx repos "<query>" # Repo search with README preview
|
|
61
65
|
ghx tree <owner/repo> [path] # Full recursive tree
|
|
@@ -108,9 +112,13 @@ ghx skill --mcp # MCP skill
|
|
|
108
112
|
|
|
109
113
|
Designed for eager context injection via spawn hooks — the agent always has the latest ghx knowledge without loading it mid-conversation.
|
|
110
114
|
|
|
115
|
+
## How It Was Built
|
|
116
|
+
|
|
117
|
+
23 agent sessions, 2,500+ conversation turns, 3 rewrites, 10 ADRs. The full story: **[Build the GitHub Exploration Tool, No Mistakes](https://gkoreli.com/how-ghx-was-born)**
|
|
118
|
+
|
|
111
119
|
## How It Works
|
|
112
120
|
|
|
113
|
-
Wraps `gh` CLI with GraphQL batching. `repos` and `explore` batch search + metadata + README into 1 call. `read` uses GraphQL aliases to fetch up to 10 files in 1 call. `search` hits REST `/search/code` with `text_matches` for matching context and 200-char token protection.
|
|
121
|
+
Wraps `gh` CLI with GraphQL batching. `repos` and `explore` batch search + metadata + README into 1 call. `read` uses GraphQL aliases to fetch up to 10 files in 1 call. Glob patterns (`src/**/*.ts`) auto-expand via tree fetch + [doublestar](https://github.com/bmatcuk/doublestar) matching in 2 API calls. `--grep` uses ERE regex with BRE normalization (agents trained on `grep` write `\|` for alternation — both styles work). `search` hits REST `/search/code` with `text_matches` for matching context and 200-char token protection.
|
|
114
122
|
|
|
115
123
|
Codemode runs JS in a [goja](https://github.com/nicholasgasior/goja) sandbox with esbuild TypeScript transpilation. Tools are injected as synchronous functions on a `codemode` global object. Max 20 tool calls per execution, 64KB code size limit.
|
|
116
124
|
|
|
@@ -118,7 +126,7 @@ Codemode runs JS in a [goja](https://github.com/nicholasgasior/goja) sandbox wit
|
|
|
118
126
|
|
|
119
127
|
```
|
|
120
128
|
v2/
|
|
121
|
-
├── pkg/ghx/ — core library (Explore, Read, Search, Repos, Tree)
|
|
129
|
+
├── pkg/ghx/ — core library (Explore, Read, Search, Repos, Tree, Glob)
|
|
122
130
|
├── pkg/codemode/ — JS executor (goja sandbox, TS transpilation, type generation)
|
|
123
131
|
└── cmd/ — CLI frontend (cobra) + MCP server (mcp-go)
|
|
124
132
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gkoreli/ghx",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.12",
|
|
4
4
|
"description": "Agent-first GitHub code exploration. GraphQL batching, code maps, codemode TypeScript sandbox, MCP server.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ghx": "npm/bin/ghx"
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"node": ">=16"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@gkoreli/ghx-darwin-arm64": "2.1.
|
|
31
|
-
"@gkoreli/ghx-darwin-x64": "2.1.
|
|
32
|
-
"@gkoreli/ghx-linux-arm64": "2.1.
|
|
33
|
-
"@gkoreli/ghx-linux-x64": "2.1.
|
|
34
|
-
"@gkoreli/ghx-win32-arm64": "2.1.
|
|
35
|
-
"@gkoreli/ghx-win32-x64": "2.1.
|
|
30
|
+
"@gkoreli/ghx-darwin-arm64": "2.1.12",
|
|
31
|
+
"@gkoreli/ghx-darwin-x64": "2.1.12",
|
|
32
|
+
"@gkoreli/ghx-linux-arm64": "2.1.12",
|
|
33
|
+
"@gkoreli/ghx-linux-x64": "2.1.12",
|
|
34
|
+
"@gkoreli/ghx-win32-arm64": "2.1.12",
|
|
35
|
+
"@gkoreli/ghx-win32-x64": "2.1.12"
|
|
36
36
|
}
|
|
37
37
|
}
|