@colbymchenry/codegraph 0.9.4 → 0.9.6

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.
Files changed (2) hide show
  1. package/README.md +91 -23
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  # CodeGraph
4
4
 
5
- ### Supercharge Claude Code, Cursor, Codex, OpenCode, and Hermes Agent with Semantic Code Intelligence
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
 
9
+ ### [Documentation & Website →](https://colbymchenry.github.io/codegraph/)
10
+
9
11
  [![npm version](https://img.shields.io/npm/v/@colbymchenry/codegraph.svg)](https://www.npmjs.com/package/@colbymchenry/codegraph)
10
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
13
  [![Self-contained](https://img.shields.io/badge/Node.js-bundled%20%C2%B7%20none%20required-brightgreen.svg)](https://nodejs.org/)
@@ -16,9 +18,12 @@
16
18
 
17
19
  [![Claude Code](https://img.shields.io/badge/Claude_Code-supported-blueviolet.svg)](#supported-agents)
18
20
  [![Cursor](https://img.shields.io/badge/Cursor-supported-blueviolet.svg)](#supported-agents)
19
- [![Codex CLI](https://img.shields.io/badge/Codex_CLI-supported-blueviolet.svg)](#supported-agents)
21
+ [![Codex](https://img.shields.io/badge/Codex-supported-blueviolet.svg)](#supported-agents)
20
22
  [![opencode](https://img.shields.io/badge/opencode-supported-blueviolet.svg)](#supported-agents)
21
23
  [![Hermes Agent](https://img.shields.io/badge/Hermes_Agent-supported-blueviolet.svg)](#supported-agents)
24
+ [![Gemini](https://img.shields.io/badge/Gemini-supported-blueviolet.svg)](#supported-agents)
25
+ [![Antigravity](https://img.shields.io/badge/Antigravity-supported-blueviolet.svg)](#supported-agents)
26
+ [![Kiro](https://img.shields.io/badge/Kiro-supported-blueviolet.svg)](#supported-agents)
22
27
 
23
28
  </div>
24
29
 
@@ -41,7 +46,7 @@ npx @colbymchenry/codegraph # zero-install, or:
41
46
  npm i -g @colbymchenry/codegraph
42
47
  ```
43
48
 
44
- <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>
45
50
 
46
51
  ### Initialize Projects
47
52
 
@@ -133,10 +138,38 @@ The gains scale with codebase size: on large repos the agent answers from the in
133
138
  | **Full-Text Search** | Find code by name instantly across your entire codebase, powered by FTS5 |
134
139
  | **Impact Analysis** | Trace callers, callees, and the full impact radius of any symbol before making changes |
135
140
  | **Always Fresh** | File watcher uses native OS events (FSEvents/inotify/ReadDirectoryChangesW) with debounced auto-sync — the graph stays current as you code, zero config |
136
- | **19+ Languages** | TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C, C++, Swift, Kotlin, Dart, Lua, Luau, Svelte, Liquid, Pascal/Delphi |
141
+ | **20+ Languages** | TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C, C++, Objective-C, Swift, Kotlin, Dart, Lua, Luau, Svelte, Liquid, Pascal/Delphi |
137
142
  | **Framework-aware Routes** | Recognizes web-framework routing files and links URL patterns to their handlers across 14 frameworks |
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 |
138
144
  | **100% Local** | No data leaves your machine. No API keys. No external services. SQLite database only |
139
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
+
140
173
  ---
141
174
 
142
175
  ## Framework-aware Routes
@@ -162,6 +195,35 @@ CodeGraph detects web-framework routing files and emits `route` nodes linked by
162
195
 
163
196
  ---
164
197
 
198
+ ## Mixed iOS / React Native / Expo bridging
199
+
200
+ Real iOS and React Native codebases live across multiple languages — a Swift caller invokes an Objective-C selector that's been auto-bridged, a JS file calls into a native module via the React Native bridge, a JSX component delegates to a native view manager. Static tree-sitter extraction stops at each language boundary. CodeGraph bridges them so `trace`, `callers`, `callees`, and `impact` connect end-to-end across the gap.
201
+
202
+ | Boundary | JS / Swift side | Native side | How |
203
+ |---|---|---|---|
204
+ | **Swift → ObjC** | Swift `obj.foo(bar:)` | ObjC selector `-fooWithBar:` | `@objc` auto-bridging rules (including init/property/protocol forms) + Cocoa preposition prefixes (`With`/`For`/`By`/`In`/`On`/`At`/…) |
205
+ | **ObjC → Swift** | ObjC `[obj fooWithBar:]` | Swift `@objc func foo(bar:)` | Reverse-bridge name candidates; verifies `@objc` exposure from source |
206
+ | **React Native legacy bridge** | JS `NativeModules.X.fn(...)` | ObjC `RCT_EXPORT_METHOD` / `RCT_REMAP_METHOD` · Java/Kotlin `@ReactMethod` | Parses macro/annotation declarations to build a JS-name → native-method map |
207
+ | **React Native TurboModules** | JS `import M from './NativeM'; M.fn(...)` | Native impl matching the Codegen spec | Treats the `Native<X>.ts` spec interface as ground truth |
208
+ | **RN native → JS events** | JS `new NativeEventEmitter(...).addListener('e', cb)` | ObjC `[self sendEventWithName:@"e" body:...]` · Swift `sendEvent(withName: "e", ...)` · Java/Kotlin `.emit("e", ...)` | Synthesized cross-language event channel keyed by literal event name |
209
+ | **Expo Modules** | JS `requireNativeModule('X').fn(...)` | Swift / Kotlin `Module { Name("X"); AsyncFunction("fn") { ... } }` | Parses the Expo DSL literals; synthetic method nodes resolve via existing name-match |
210
+ | **Fabric view components** | JSX `<MyView prop={v}/>` | TS Codegen spec + native impl class | Spec → `component` node; convention-based name+suffix lookup (`View`/`ComponentView`/`Manager`/`ViewManager`) bridges to native |
211
+ | **Legacy Paper view managers** | JSX `<MyView prop={v}/>` | ObjC `RCT_EXPORT_VIEW_PROPERTY` · Java/Kotlin `@ReactProp` | Same as Fabric — Paper-era declarations also produce `component` + `property` nodes |
212
+
213
+ **Validated on real codebases** (small + medium + large for each bridge):
214
+
215
+ | Bridge | Small | Medium | Large |
216
+ |---|---|---|---|
217
+ | Swift ↔ ObjC | [Charts](https://github.com/danielgindi/Charts) | [realm-swift](https://github.com/realm/realm-swift) | [Wikipedia-iOS](https://github.com/wikimedia/wikipedia-ios) |
218
+ | RN legacy bridge | [AsyncStorage](https://github.com/react-native-async-storage/async-storage) | [react-native-svg](https://github.com/software-mansion/react-native-svg) | [react-native-firebase](https://github.com/invertase/react-native-firebase) |
219
+ | RN native → JS events | [RNGeolocation](https://github.com/Agontuk/react-native-geolocation-service) | — | react-native-firebase |
220
+ | Expo Modules | expo-haptics | expo-camera | expo SDK sweep (7 packages) |
221
+ | Fabric / Paper views | [react-native-segmented-control](https://github.com/react-native-segmented-control/segmented-control) | [react-native-screens](https://github.com/software-mansion/react-native-screens) | [react-native-skia](https://github.com/Shopify/react-native-skia) |
222
+
223
+ Each bridge emits edges tagged `provenance:'heuristic'` with `metadata.synthesizedBy:` set to a stable channel name (e.g. `swift-objc-bridge`, `rn-event-channel`, `fabric-native-impl`, `expo-module-extract`), so the agent can tell at a glance how a hop got into the graph.
224
+
225
+ ---
226
+
165
227
  ## Quick Start
166
228
 
167
229
  ### 1. Run the Installer
@@ -171,10 +233,10 @@ npx @colbymchenry/codegraph
171
233
  ```
172
234
 
173
235
  The installer will:
174
- - 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**
175
237
  - Prompt to install `codegraph` on your PATH (so agents can launch the MCP server)
176
238
  - Ask whether configs apply to all your projects or just this one
177
- - Write each chosen agent's MCP server config + an instructions file (e.g. `CLAUDE.md`, `.cursor/rules/codegraph.mdc`, `~/.codex/AGENTS.md`)
239
+ - Write each chosen agent's MCP server config + an instructions file (e.g. `CLAUDE.md`, `.cursor/rules/codegraph.mdc`, `~/.codex/AGENTS.md`, `~/.gemini/GEMINI.md`)
178
240
  - Set up auto-allow permissions when Claude Code is one of the targets
179
241
  - Initialize your current project (local installs only)
180
242
 
@@ -197,7 +259,7 @@ codegraph install --print-config codex # print snippet, no file wr
197
259
 
198
260
  ### 2. Restart Your Agent
199
261
 
200
- 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.
201
263
 
202
264
  ### 3. Initialize Projects
203
265
 
@@ -419,23 +481,25 @@ cg.close();
419
481
 
420
482
  ## Configuration
421
483
 
422
- There isn't any — CodeGraph is zero-config. It indexes every file whose
423
- extension maps to a [supported language](#supported-languages) and **respects
424
- your `.gitignore`**: in git repos via git itself, and in non-git projects by
425
- reading `.gitignore` files directly (root and nested, the same way git would).
484
+ There isn't any — CodeGraph is zero-config, with **no config file** to write or
485
+ keep in sync. Language support is automatic from the file extension; there's
486
+ nothing to wire up per language.
426
487
 
427
- What that means in practice:
488
+ What it skips out of the box:
428
489
 
429
- - Anything git ignores — `node_modules`, build output, secrets in `.env` — is
430
- never indexed. **To keep something out of the graph, add it to `.gitignore`.**
431
- - There's no config file to write or keep in sync, and nothing to wire up per
432
- language: support is automatic from the file extension.
433
- - Files larger than 1 MB are skipped (generated bundles, minified JS, vendored
434
- blobs) they cost parse budget for no useful symbols.
490
+ - **Dependency, build, and cache directories** — `node_modules`, `vendor`,
491
+ `dist`, `build`, `target`, `.venv`, `Pods`, `.next`, and the like across every
492
+ [supported stack](#supported-languages) so the graph is your code, not
493
+ third-party noise. This holds even with no `.gitignore`.
494
+ - **Anything in your `.gitignore`** honored in git repos via git, and in
495
+ non-git projects by reading `.gitignore` directly (root and nested).
496
+ - **Files larger than 1 MB** — generated bundles, minified JS, vendored blobs.
435
497
 
436
- > Committed files that aren't gitignored *are* indexed, even under `vendor/` or a
437
- > committed `dist/`. If you commit a dependency or build directory you don't want
438
- > in the graph, add it to `.gitignore`.
498
+ To keep something else out, add it to `.gitignore`. To pull a default-excluded
499
+ directory back **in** (say you really do want a vendored dependency indexed),
500
+ add a negation — `!vendor/`. The defaults apply uniformly, so committing a
501
+ dependency or build directory doesn't force it into the graph; the `.gitignore`
502
+ negation is the explicit opt-in.
439
503
 
440
504
  ## Supported Platforms
441
505
 
@@ -460,6 +524,9 @@ the MCP server and writing its instructions file:
460
524
  - **Codex CLI**
461
525
  - **opencode**
462
526
  - **Hermes Agent**
527
+ - **Gemini CLI**
528
+ - **Antigravity IDE**
529
+ - **Kiro**
463
530
 
464
531
  ## Supported Languages
465
532
 
@@ -476,6 +543,7 @@ the MCP server and writing its instructions file:
476
543
  | Ruby | `.rb` | Full support |
477
544
  | C | `.c`, `.h` | Full support |
478
545
  | C++ | `.cpp`, `.hpp`, `.cc` | Full support |
546
+ | Objective-C | `.m`, `.mm`, `.h` | Partial support (classes, protocols, methods, `@property`, `#import`, message sends; `.mm` ObjC++ may parse incompletely) |
479
547
  | Swift | `.swift` | Full support |
480
548
  | Kotlin | `.kt`, `.kts` | Full support |
481
549
  | Scala | `.scala`, `.sc` | Full support (classes, traits, methods, type aliases, Scala 3 enums) |
@@ -500,7 +568,7 @@ the MCP server and writing its instructions file:
500
568
 
501
569
  **MCP server not connecting** — Ensure the project is initialized/indexed, verify the path in your MCP config, and check that `codegraph serve --mcp` works from the command line.
502
570
 
503
- **Missing symbols** — The MCP server auto-syncs on save (wait a couple seconds). Run `codegraph sync` manually if needed. Check that the file's language is supported and isn't excluded by config patterns.
571
+ **Missing symbols** — The MCP server auto-syncs on save (wait a couple seconds). Run `codegraph sync` manually if needed. Check that the file's language is supported and isn't inside a `.gitignore`d or default-excluded directory (e.g. `node_modules`, `dist`).
504
572
 
505
573
  ## Star History
506
574
 
@@ -520,7 +588,7 @@ MIT
520
588
 
521
589
  <div align="center">
522
590
 
523
- **Made for AI coding agents — Claude Code, Cursor, Codex CLI, opencode, and Hermes Agent**
591
+ **Made for AI coding agents — Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro**
524
592
 
525
593
  [Report Bug](https://github.com/colbymchenry/codegraph/issues) · [Request Feature](https://github.com/colbymchenry/codegraph/issues)
526
594
 
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@colbymchenry/codegraph",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
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.4",
10
- "@colbymchenry/codegraph-darwin-x64": "0.9.4",
11
- "@colbymchenry/codegraph-linux-arm64": "0.9.4",
12
- "@colbymchenry/codegraph-linux-x64": "0.9.4",
13
- "@colbymchenry/codegraph-win32-arm64": "0.9.4",
14
- "@colbymchenry/codegraph-win32-x64": "0.9.4"
9
+ "@colbymchenry/codegraph-darwin-arm64": "0.9.6",
10
+ "@colbymchenry/codegraph-darwin-x64": "0.9.6",
11
+ "@colbymchenry/codegraph-linux-arm64": "0.9.6",
12
+ "@colbymchenry/codegraph-linux-x64": "0.9.6",
13
+ "@colbymchenry/codegraph-win32-arm64": "0.9.6",
14
+ "@colbymchenry/codegraph-win32-x64": "0.9.6"
15
15
  },
16
16
  "files": [
17
17
  "npm-shim.js",