@colbymchenry/codegraph 0.9.4 → 0.9.5
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 +51 -16
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
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
|
[](https://www.npmjs.com/package/@colbymchenry/codegraph)
|
|
10
12
|
[](https://opensource.org/licenses/MIT)
|
|
11
13
|
[](https://nodejs.org/)
|
|
@@ -133,8 +135,9 @@ The gains scale with codebase size: on large repos the agent answers from the in
|
|
|
133
135
|
| **Full-Text Search** | Find code by name instantly across your entire codebase, powered by FTS5 |
|
|
134
136
|
| **Impact Analysis** | Trace callers, callees, and the full impact radius of any symbol before making changes |
|
|
135
137
|
| **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
|
-
| **
|
|
138
|
+
| **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
139
|
| **Framework-aware Routes** | Recognizes web-framework routing files and links URL patterns to their handlers across 14 frameworks |
|
|
140
|
+
| **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
141
|
| **100% Local** | No data leaves your machine. No API keys. No external services. SQLite database only |
|
|
139
142
|
|
|
140
143
|
---
|
|
@@ -162,6 +165,35 @@ CodeGraph detects web-framework routing files and emits `route` nodes linked by
|
|
|
162
165
|
|
|
163
166
|
---
|
|
164
167
|
|
|
168
|
+
## Mixed iOS / React Native / Expo bridging
|
|
169
|
+
|
|
170
|
+
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.
|
|
171
|
+
|
|
172
|
+
| Boundary | JS / Swift side | Native side | How |
|
|
173
|
+
|---|---|---|---|
|
|
174
|
+
| **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`/…) |
|
|
175
|
+
| **ObjC → Swift** | ObjC `[obj fooWithBar:]` | Swift `@objc func foo(bar:)` | Reverse-bridge name candidates; verifies `@objc` exposure from source |
|
|
176
|
+
| **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 |
|
|
177
|
+
| **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 |
|
|
178
|
+
| **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 |
|
|
179
|
+
| **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 |
|
|
180
|
+
| **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 |
|
|
181
|
+
| **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 |
|
|
182
|
+
|
|
183
|
+
**Validated on real codebases** (small + medium + large for each bridge):
|
|
184
|
+
|
|
185
|
+
| Bridge | Small | Medium | Large |
|
|
186
|
+
|---|---|---|---|
|
|
187
|
+
| Swift ↔ ObjC | [Charts](https://github.com/danielgindi/Charts) | [realm-swift](https://github.com/realm/realm-swift) | [Wikipedia-iOS](https://github.com/wikimedia/wikipedia-ios) |
|
|
188
|
+
| 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) |
|
|
189
|
+
| RN native → JS events | [RNGeolocation](https://github.com/Agontuk/react-native-geolocation-service) | — | react-native-firebase |
|
|
190
|
+
| Expo Modules | expo-haptics | expo-camera | expo SDK sweep (7 packages) |
|
|
191
|
+
| 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) |
|
|
192
|
+
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
165
197
|
## Quick Start
|
|
166
198
|
|
|
167
199
|
### 1. Run the Installer
|
|
@@ -419,23 +451,25 @@ cg.close();
|
|
|
419
451
|
|
|
420
452
|
## Configuration
|
|
421
453
|
|
|
422
|
-
There isn't any — CodeGraph is zero-config
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
reading `.gitignore` files directly (root and nested, the same way git would).
|
|
454
|
+
There isn't any — CodeGraph is zero-config, with **no config file** to write or
|
|
455
|
+
keep in sync. Language support is automatic from the file extension; there's
|
|
456
|
+
nothing to wire up per language.
|
|
426
457
|
|
|
427
|
-
What
|
|
458
|
+
What it skips out of the box:
|
|
428
459
|
|
|
429
|
-
-
|
|
430
|
-
|
|
431
|
-
-
|
|
432
|
-
|
|
433
|
-
-
|
|
434
|
-
|
|
460
|
+
- **Dependency, build, and cache directories** — `node_modules`, `vendor`,
|
|
461
|
+
`dist`, `build`, `target`, `.venv`, `Pods`, `.next`, and the like across every
|
|
462
|
+
[supported stack](#supported-languages) — so the graph is your code, not
|
|
463
|
+
third-party noise. This holds even with no `.gitignore`.
|
|
464
|
+
- **Anything in your `.gitignore`** — honored in git repos via git, and in
|
|
465
|
+
non-git projects by reading `.gitignore` directly (root and nested).
|
|
466
|
+
- **Files larger than 1 MB** — generated bundles, minified JS, vendored blobs.
|
|
435
467
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
468
|
+
To keep something else out, add it to `.gitignore`. To pull a default-excluded
|
|
469
|
+
directory back **in** (say you really do want a vendored dependency indexed),
|
|
470
|
+
add a negation — `!vendor/`. The defaults apply uniformly, so committing a
|
|
471
|
+
dependency or build directory doesn't force it into the graph; the `.gitignore`
|
|
472
|
+
negation is the explicit opt-in.
|
|
439
473
|
|
|
440
474
|
## Supported Platforms
|
|
441
475
|
|
|
@@ -476,6 +510,7 @@ the MCP server and writing its instructions file:
|
|
|
476
510
|
| Ruby | `.rb` | Full support |
|
|
477
511
|
| C | `.c`, `.h` | Full support |
|
|
478
512
|
| C++ | `.cpp`, `.hpp`, `.cc` | Full support |
|
|
513
|
+
| Objective-C | `.m`, `.mm`, `.h` | Partial support (classes, protocols, methods, `@property`, `#import`, message sends; `.mm` ObjC++ may parse incompletely) |
|
|
479
514
|
| Swift | `.swift` | Full support |
|
|
480
515
|
| Kotlin | `.kt`, `.kts` | Full support |
|
|
481
516
|
| Scala | `.scala`, `.sc` | Full support (classes, traits, methods, type aliases, Scala 3 enums) |
|
|
@@ -500,7 +535,7 @@ the MCP server and writing its instructions file:
|
|
|
500
535
|
|
|
501
536
|
**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
537
|
|
|
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
|
|
538
|
+
**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
539
|
|
|
505
540
|
## Star History
|
|
506
541
|
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colbymchenry/codegraph",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
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.5",
|
|
10
|
+
"@colbymchenry/codegraph-darwin-x64": "0.9.5",
|
|
11
|
+
"@colbymchenry/codegraph-linux-arm64": "0.9.5",
|
|
12
|
+
"@colbymchenry/codegraph-linux-x64": "0.9.5",
|
|
13
|
+
"@colbymchenry/codegraph-win32-arm64": "0.9.5",
|
|
14
|
+
"@colbymchenry/codegraph-win32-x64": "0.9.5"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"npm-shim.js",
|