@colbymchenry/codegraph 0.9.5 → 0.9.7
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 +50 -39
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# CodeGraph
|
|
4
4
|
|
|
5
|
-
### Supercharge Claude Code, Cursor, Codex, OpenCode,
|
|
5
|
+
### Supercharge Claude Code, Cursor, Codex, OpenCode, Hermes Agent, Gemini, Antigravity, and Kiro with Semantic Code Intelligence
|
|
6
6
|
|
|
7
7
|
**~35% cheaper · ~70% fewer tool calls · 100% local**
|
|
8
8
|
|
|
@@ -18,9 +18,12 @@
|
|
|
18
18
|
|
|
19
19
|
[](#supported-agents)
|
|
20
20
|
[](#supported-agents)
|
|
21
|
-
[](#supported-agents)
|
|
22
22
|
[](#supported-agents)
|
|
23
23
|
[](#supported-agents)
|
|
24
|
+
[](#supported-agents)
|
|
25
|
+
[](#supported-agents)
|
|
26
|
+
[](#supported-agents)
|
|
24
27
|
|
|
25
28
|
</div>
|
|
26
29
|
|
|
@@ -43,7 +46,7 @@ npx @colbymchenry/codegraph # zero-install, or:
|
|
|
43
46
|
npm i -g @colbymchenry/codegraph
|
|
44
47
|
```
|
|
45
48
|
|
|
46
|
-
<sub>CodeGraph bundles its own runtime — nothing to compile, no native build, works the same everywhere. The interactive installer auto-configures your agent(s) — Claude Code, Cursor, Codex CLI, opencode, Hermes Agent.</sub>
|
|
49
|
+
<sub>CodeGraph bundles its own runtime — nothing to compile, no native build, works the same everywhere. The interactive installer auto-configures your agent(s) — Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, Kiro.</sub>
|
|
47
50
|
|
|
48
51
|
### Initialize Projects
|
|
49
52
|
|
|
@@ -140,6 +143,33 @@ The gains scale with codebase size: on large repos the agent answers from the in
|
|
|
140
143
|
| **Mixed iOS / React Native / Expo** | Closes cross-language flows that static parsing misses: Swift ↔ ObjC bridging, React Native legacy bridge + TurboModules + Fabric view components, native → JS event emitters, Expo Modules |
|
|
141
144
|
| **100% Local** | No data leaves your machine. No API keys. No external services. SQLite database only |
|
|
142
145
|
|
|
146
|
+
<details>
|
|
147
|
+
<summary><strong>How auto-syncing works — and why you don't need to run <code>codegraph sync</code> manually</strong></summary>
|
|
148
|
+
|
|
149
|
+
When your agent (Claude Code, Cursor, Codex, opencode) launches `codegraph serve --mcp`, three layers keep the index in step with your code — and make sure the agent never gets a silent wrong answer in the brief window between an edit and the next sync:
|
|
150
|
+
|
|
151
|
+
1. **File watcher with debounced auto-sync.** A native FSEvents / inotify / ReadDirectoryChangesW watcher captures every source-file create / modify / delete and triggers a re-index after a debounce window (default `2000ms`, tunable via `CODEGRAPH_WATCH_DEBOUNCE_MS`, clamped to `[100ms, 60s]`). Bursts of edits collapse into a single sync.
|
|
152
|
+
|
|
153
|
+
2. **Per-file staleness banner.** During the brief debounce window, MCP tool responses that would reference a still-pending file prepend a `⚠️` banner naming it and telling the agent to `Read` it directly. Pending files NOT referenced by the response surface as a small footer instead. Either way, the agent gets an explicit signal — validated with Claude Code, where the agent literally says "Reading the file directly for the live content" before opening it.
|
|
154
|
+
|
|
155
|
+
3. **Connect-time catch-up.** When the MCP server (re)connects, codegraph runs a fast `(size, mtime)` + content-hash reconciliation against the working tree before answering the first query — so edits made while no MCP server was running (a `git pull` from the terminal, edits from another editor, a previous agent session that exited) get absorbed on the next session's first tool call.
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
agent writes src/Widget.ts
|
|
159
|
+
→ watcher fires (<100ms)
|
|
160
|
+
→ debounce (default 2s)
|
|
161
|
+
→ sync; Widget.ts is in the index
|
|
162
|
+
→ next agent query sees it
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Verify any time** with `codegraph_status` (via MCP) or `codegraph status` (CLI). If anything is pending, you'll see a `### Pending sync:` section naming the files and their edit age.
|
|
166
|
+
|
|
167
|
+
The handful of cases where manual `codegraph sync` makes sense: the watcher is disabled (sandboxed environments, or `CODEGRAPH_NO_DAEMON=1`), or you're scripting against the index outside an agent session and want a pre-flight sync at the start of your script.
|
|
168
|
+
|
|
169
|
+
→ Full deep-dive in [Guides → Indexing a Project](https://colbymchenry.github.io/codegraph/guides/indexing/#stay-fresh-automatically).
|
|
170
|
+
|
|
171
|
+
</details>
|
|
172
|
+
|
|
143
173
|
---
|
|
144
174
|
|
|
145
175
|
## Framework-aware Routes
|
|
@@ -203,10 +233,10 @@ npx @colbymchenry/codegraph
|
|
|
203
233
|
```
|
|
204
234
|
|
|
205
235
|
The installer will:
|
|
206
|
-
- Ask which agent(s) to configure — auto-detects installed ones from: **Claude Code**, **Cursor**, **Codex CLI**, **opencode**, **Hermes Agent**
|
|
236
|
+
- Ask which agent(s) to configure — auto-detects installed ones from: **Claude Code**, **Cursor**, **Codex CLI**, **opencode**, **Hermes Agent**, **Gemini CLI**, **Antigravity IDE**, **Kiro**
|
|
207
237
|
- Prompt to install `codegraph` on your PATH (so agents can launch the MCP server)
|
|
208
238
|
- Ask whether configs apply to all your projects or just this one
|
|
209
|
-
- Write each chosen agent's MCP server config
|
|
239
|
+
- Write each chosen agent's MCP server config (the codegraph usage guide is delivered by the MCP server itself, so no instructions file is added to `CLAUDE.md` / `AGENTS.md` / etc.)
|
|
210
240
|
- Set up auto-allow permissions when Claude Code is one of the targets
|
|
211
241
|
- Initialize your current project (local installs only)
|
|
212
242
|
|
|
@@ -229,7 +259,7 @@ codegraph install --print-config codex # print snippet, no file wr
|
|
|
229
259
|
|
|
230
260
|
### 2. Restart Your Agent
|
|
231
261
|
|
|
232
|
-
Restart your agent (Claude Code / Cursor / Codex CLI / opencode / Hermes Agent) for the MCP server to load.
|
|
262
|
+
Restart your agent (Claude Code / Cursor / Codex CLI / opencode / Hermes Agent / Gemini CLI / Antigravity IDE / Kiro) for the MCP server to load.
|
|
233
263
|
|
|
234
264
|
### 3. Initialize Projects
|
|
235
265
|
|
|
@@ -238,7 +268,7 @@ cd your-project
|
|
|
238
268
|
codegraph init -i
|
|
239
269
|
```
|
|
240
270
|
|
|
241
|
-
Builds the per-project knowledge graph index.
|
|
271
|
+
Builds the per-project knowledge graph index. A single global `codegraph install` works in every project you open — no need to re-run the installer per project.
|
|
242
272
|
|
|
243
273
|
That's it — your agent will use CodeGraph tools automatically when a `.codegraph/` directory exists.
|
|
244
274
|
|
|
@@ -284,39 +314,16 @@ npm install -g @colbymchenry/codegraph
|
|
|
284
314
|
</details>
|
|
285
315
|
|
|
286
316
|
<details>
|
|
287
|
-
<summary><strong>
|
|
288
|
-
|
|
289
|
-
The installer automatically adds these instructions to `~/.claude/CLAUDE.md`:
|
|
290
|
-
|
|
291
|
-
```markdown
|
|
292
|
-
## CodeGraph
|
|
293
|
-
|
|
294
|
-
CodeGraph builds a semantic knowledge graph of codebases for faster, smarter code exploration.
|
|
295
|
-
|
|
296
|
-
### If `.codegraph/` exists in the project
|
|
317
|
+
<summary><strong>Agent Tool Guidance</strong></summary>
|
|
297
318
|
|
|
298
|
-
|
|
319
|
+
CodeGraph's MCP server delivers its usage guidance to your agent **automatically**, in the MCP `initialize` response — there's no instructions file to manage and nothing is added to your `CLAUDE.md` / `AGENTS.md` / `GEMINI.md`. In short, it tells the agent to:
|
|
299
320
|
|
|
300
|
-
**
|
|
321
|
+
- **Answer structural questions directly with CodeGraph** — it *is* the pre-built index, so a grep/read loop just repeats work it already did. Treat the returned source as already read.
|
|
322
|
+
- **Pick the tool by intent:** `codegraph_context` to map an area, `codegraph_trace` for "how does X reach Y", `codegraph_explore` to survey several symbols, `codegraph_search` to find a symbol, `codegraph_callers`/`codegraph_callees` to walk call flow, `codegraph_impact` before editing, `codegraph_node` for one symbol's source.
|
|
323
|
+
- **Trust the results — don't re-verify with grep**, and check the staleness banner after edits.
|
|
324
|
+
- If `.codegraph/` doesn't exist yet, offer to run `codegraph init -i`.
|
|
301
325
|
|
|
302
|
-
|
|
303
|
-
|------|---------|
|
|
304
|
-
| `codegraph_context` | Map a task / feature / area first — composes search + node + callers + callees in one call |
|
|
305
|
-
| `codegraph_trace` | "How does X reach Y" — the call path, each hop's body inline (follows dynamic-dispatch hops grep can't) |
|
|
306
|
-
| `codegraph_explore` | Survey several related symbols' source in ONE budget-capped call |
|
|
307
|
-
| `codegraph_search` | Find a symbol by name |
|
|
308
|
-
| `codegraph_callers` / `codegraph_callees` | Walk call flow one hop at a time |
|
|
309
|
-
| `codegraph_impact` | Check what's affected before editing |
|
|
310
|
-
| `codegraph_node` | Get a single symbol's source / signature |
|
|
311
|
-
|
|
312
|
-
A direct CodeGraph answer is a handful of calls; a grep/read exploration is dozens.
|
|
313
|
-
|
|
314
|
-
### If `.codegraph/` does NOT exist
|
|
315
|
-
|
|
316
|
-
At the start of a session, ask the user if they'd like to initialize CodeGraph:
|
|
317
|
-
|
|
318
|
-
"I notice this project doesn't have CodeGraph initialized. Would you like me to run `codegraph init -i` to build a code knowledge graph?"
|
|
319
|
-
```
|
|
326
|
+
The exact text is `src/mcp/server-instructions.ts` — the single source of truth.
|
|
320
327
|
|
|
321
328
|
</details>
|
|
322
329
|
|
|
@@ -487,13 +494,17 @@ See [Get Started](#get-started) for the one-line install commands.
|
|
|
487
494
|
## Supported Agents
|
|
488
495
|
|
|
489
496
|
The interactive installer auto-detects and configures each of these — wiring up
|
|
490
|
-
the MCP server
|
|
497
|
+
the MCP server (which delivers its own usage guidance, so no instructions file
|
|
498
|
+
is written):
|
|
491
499
|
|
|
492
500
|
- **Claude Code**
|
|
493
501
|
- **Cursor**
|
|
494
502
|
- **Codex CLI**
|
|
495
503
|
- **opencode**
|
|
496
504
|
- **Hermes Agent**
|
|
505
|
+
- **Gemini CLI**
|
|
506
|
+
- **Antigravity IDE**
|
|
507
|
+
- **Kiro**
|
|
497
508
|
|
|
498
509
|
## Supported Languages
|
|
499
510
|
|
|
@@ -555,7 +566,7 @@ MIT
|
|
|
555
566
|
|
|
556
567
|
<div align="center">
|
|
557
568
|
|
|
558
|
-
**Made for AI coding agents — Claude Code, Cursor, Codex CLI, opencode,
|
|
569
|
+
**Made for AI coding agents — Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro**
|
|
559
570
|
|
|
560
571
|
[Report Bug](https://github.com/colbymchenry/codegraph/issues) · [Request Feature](https://github.com/colbymchenry/codegraph/issues)
|
|
561
572
|
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colbymchenry/codegraph",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
4
4
|
"description": "Local-first code intelligence for AI agents (MCP). Self-contained — bundles its own runtime.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codegraph": "npm-shim.js"
|
|
7
7
|
},
|
|
8
8
|
"optionalDependencies": {
|
|
9
|
-
"@colbymchenry/codegraph-darwin-arm64": "0.9.
|
|
10
|
-
"@colbymchenry/codegraph-darwin-x64": "0.9.
|
|
11
|
-
"@colbymchenry/codegraph-linux-arm64": "0.9.
|
|
12
|
-
"@colbymchenry/codegraph-linux-x64": "0.9.
|
|
13
|
-
"@colbymchenry/codegraph-win32-arm64": "0.9.
|
|
14
|
-
"@colbymchenry/codegraph-win32-x64": "0.9.
|
|
9
|
+
"@colbymchenry/codegraph-darwin-arm64": "0.9.7",
|
|
10
|
+
"@colbymchenry/codegraph-darwin-x64": "0.9.7",
|
|
11
|
+
"@colbymchenry/codegraph-linux-arm64": "0.9.7",
|
|
12
|
+
"@colbymchenry/codegraph-linux-x64": "0.9.7",
|
|
13
|
+
"@colbymchenry/codegraph-win32-arm64": "0.9.7",
|
|
14
|
+
"@colbymchenry/codegraph-win32-x64": "0.9.7"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"npm-shim.js",
|