@colbymchenry/codegraph 0.9.1 → 0.9.2

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 (3) hide show
  1. package/README.md +31 -52
  2. package/npm-shim.js +16 -4
  3. 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, and OpenCode with Semantic Code Intelligence
5
+ ### Supercharge Claude Code, Cursor, Codex, OpenCode, and Hermes Agent with Semantic Code Intelligence
6
6
 
7
7
  **~35% cheaper · ~70% fewer tool calls · 100% local**
8
8
 
@@ -18,10 +18,11 @@
18
18
  [![Cursor](https://img.shields.io/badge/Cursor-supported-blueviolet.svg)](#)
19
19
  [![Codex CLI](https://img.shields.io/badge/Codex_CLI-supported-blueviolet.svg)](#)
20
20
  [![opencode](https://img.shields.io/badge/opencode-supported-blueviolet.svg)](#)
21
+ [![Hermes Agent](https://img.shields.io/badge/Hermes_Agent-supported-blueviolet.svg)](#)
21
22
 
22
- <br />
23
+ </div>
23
24
 
24
- ### Get Started
25
+ ## Get Started
25
26
 
26
27
  **No Node.js required** — one command grabs the right build for your OS:
27
28
 
@@ -40,15 +41,17 @@ npx @colbymchenry/codegraph # zero-install, or:
40
41
  npm i -g @colbymchenry/codegraph
41
42
  ```
42
43
 
43
- <sub>CodeGraph bundles its own runtime — nothing to compile, no native build, works the same everywhere.<br />The interactive installer auto-configures your agent(s) — Claude Code, Cursor, Codex CLI, opencode.</sub>
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>
44
45
 
45
- #### Initialize Projects
46
+ ### Initialize Projects
46
47
 
47
48
  ```bash
48
49
  cd your-project
49
50
  codegraph init -i
50
51
  ```
51
52
 
53
+ <div align="center">
54
+
52
55
  ![1_C_VYnhpys0UHrOuOgpgoyw](https://github.com/user-attachments/assets/f168182f-4d9a-44e0-94d7-08d018cc8a3a)
53
56
 
54
57
  </div>
@@ -121,7 +124,7 @@ The gains scale with codebase size: on large repos the agent answers from the in
121
124
  | **Impact Analysis** | Trace callers, callees, and the full impact radius of any symbol before making changes |
122
125
  | **Always Fresh** | File watcher uses native OS events (FSEvents/inotify/ReadDirectoryChangesW) with debounced auto-sync — the graph stays current as you code, zero config |
123
126
  | **19+ Languages** | TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C, C++, Swift, Kotlin, Dart, Lua, Luau, Svelte, Liquid, Pascal/Delphi |
124
- | **Framework-aware Routes** | Recognizes web-framework routing files and links URL patterns to their handlers across 13 frameworks |
127
+ | **Framework-aware Routes** | Recognizes web-framework routing files and links URL patterns to their handlers across 14 frameworks |
125
128
  | **100% Local** | No data leaves your machine. No API keys. No external services. SQLite database only |
126
129
 
127
130
  ---
@@ -138,6 +141,7 @@ CodeGraph detects web-framework routing files and emits `route` nodes linked by
138
141
  | **Express** | `app.get(...)`, `router.post(...)` with middleware chains |
139
142
  | **NestJS** | `@Controller` + `@Get/@Post/...`, GraphQL `@Resolver` + `@Query/@Mutation`, `@MessagePattern`/`@EventPattern`, `@SubscribeMessage` |
140
143
  | **Laravel** | `Route::get()`, `Route::resource()`, `Controller@action`, tuple syntax |
144
+ | **Drupal** | `*.routing.yml` routes (`_controller`, `_form`, entity handlers); `hook_*` implementations in `.module`/`.theme`/`.install`/`.inc` |
141
145
  | **Rails** | `get '/x', to: 'users#index'`, hash-rocket `=>` syntax |
142
146
  | **Spring** | `@GetMapping`, `@PostMapping`, `@RequestMapping` on methods |
143
147
  | **Gin / chi / gorilla / mux** | `r.GET(...)`, `router.HandleFunc(...)` |
@@ -157,7 +161,7 @@ npx @colbymchenry/codegraph
157
161
  ```
158
162
 
159
163
  The installer will:
160
- - Ask which agent(s) to configure — auto-detects installed ones from: **Claude Code**, **Cursor**, **Codex CLI**, **opencode**
164
+ - Ask which agent(s) to configure — auto-detects installed ones from: **Claude Code**, **Cursor**, **Codex CLI**, **opencode**, **Hermes Agent**
161
165
  - Prompt to install `codegraph` on your PATH (so agents can launch the MCP server)
162
166
  - Ask whether configs apply to all your projects or just this one
163
167
  - Write each chosen agent's MCP server config + an instructions file (e.g. `CLAUDE.md`, `.cursor/rules/codegraph.mdc`, `~/.codex/AGENTS.md`)
@@ -183,7 +187,7 @@ codegraph install --print-config codex # print snippet, no file wr
183
187
 
184
188
  ### 2. Restart Your Agent
185
189
 
186
- Restart your agent (Claude Code / Cursor / Codex CLI / opencode) for the MCP server to load.
190
+ Restart your agent (Claude Code / Cursor / Codex CLI / opencode / Hermes Agent) for the MCP server to load.
187
191
 
188
192
  ### 3. Initialize Projects
189
193
 
@@ -414,28 +418,23 @@ cg.close();
414
418
 
415
419
  ## Configuration
416
420
 
417
- The `.codegraph/config.json` file controls indexing:
421
+ There isn't any — CodeGraph is zero-config. It indexes every file whose
422
+ extension maps to a [supported language](#supported-languages) and **respects
423
+ your `.gitignore`**: in git repos via git itself, and in non-git projects by
424
+ reading `.gitignore` files directly (root and nested, the same way git would).
418
425
 
419
- ```json
420
- {
421
- "version": 1,
422
- "languages": ["typescript", "javascript"],
423
- "exclude": ["node_modules/**", "dist/**", "build/**", "*.min.js"],
424
- "frameworks": [],
425
- "maxFileSize": 1048576,
426
- "extractDocstrings": true,
427
- "trackCallSites": true
428
- }
429
- ```
426
+ What that means in practice:
430
427
 
431
- | Option | Description | Default |
432
- |--------|-------------|---------|
433
- | `languages` | Languages to index (auto-detected if empty) | `[]` |
434
- | `exclude` | Glob patterns to ignore | `["node_modules/**", ...]` |
435
- | `frameworks` | Framework hints for better resolution | `[]` |
436
- | `maxFileSize` | Skip files larger than this (bytes) | `1048576` (1MB) |
437
- | `extractDocstrings` | Extract docstrings from code | `true` |
438
- | `trackCallSites` | Track call site locations | `true` |
428
+ - Anything git ignores `node_modules`, build output, secrets in `.env` — is
429
+ never indexed. **To keep something out of the graph, add it to `.gitignore`.**
430
+ - There's no config file to write or keep in sync, and nothing to wire up per
431
+ language: support is automatic from the file extension.
432
+ - Files larger than 1 MB are skipped (generated bundles, minified JS, vendored
433
+ blobs) they cost parse budget for no useful symbols.
434
+
435
+ > Committed files that aren't gitignored *are* indexed, even under `vendor/` or a
436
+ > committed `dist/`. If you commit a dependency or build directory you don't want
437
+ > in the graph, add it to `.gitignore`.
439
438
 
440
439
  ## Supported Languages
441
440
 
@@ -469,30 +468,10 @@ The `.codegraph/config.json` file controls indexing:
469
468
 
470
469
  **Indexing is slow** — Check that `node_modules` and other large directories are excluded. Use `--quiet` to reduce output overhead.
471
470
 
472
- **Indexing is slow, or MCP hits `database is locked`** — both trace to the SQLite backend. `codegraph` picks the best available, in order: native `better-sqlite3` (fastest; an `optionalDependencies` native module), then Node's built-in `node:sqlite` (Node 22.5), then a bundled WASM build. Run `codegraph status` and read the **`Backend:`** and **`Journal:`** lines:
473
-
474
- - `Backend: native` or `node:sqlite` with `Journal: wal` — fast path with lock-free concurrent reads; nothing to do.
475
- - `Backend: wasm` — the native module didn't load *and* `node:sqlite` is unavailable (Node < 22.5). WASM is 5-10x slower and has no WAL, so heavy concurrent use can briefly hit `database is locked`. The simplest fix is Node ≥ 22.5 (you get `node:sqlite` automatically); otherwise restore the native backend:
476
-
477
- ```bash
478
- # macOS
479
- xcode-select --install # installs the C compiler
480
-
481
- # Linux (Debian / Ubuntu)
482
- sudo apt install build-essential python3 make
483
-
484
- # Linux (RHEL / Fedora)
485
- sudo yum groupinstall "Development Tools"
486
-
487
- # Then rebuild on any platform:
488
- npm rebuild better-sqlite3
489
-
490
- # Or force-include as a hard dep:
491
- npm install better-sqlite3 --save
492
- ```
471
+ **MCP hits `database is locked`** — current builds shouldn't: CodeGraph bundles its own Node runtime and uses Node's built-in `node:sqlite` in WAL mode, where concurrent reads never block on a writer. If you still see it:
493
472
 
494
- After the fix, `codegraph status` should show `Backend: native`.
495
- - `Journal:` shows anything other than `wal` on a `native` / `node:sqlite` backend — WAL couldn't be enabled on this filesystem (common on network shares and WSL2 `/mnt`), so reads can block on writes. Move the project (with its `.codegraph/` folder) onto a local disk.
473
+ - **You're on an old (pre-0.9) install.** Reinstall to get the bundled runtime — `curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh` (macOS/Linux), `irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex` (Windows), or `npm i -g @colbymchenry/codegraph@latest`.
474
+ - **`codegraph status` shows `Journal:` other than `wal`** — WAL couldn't be enabled on this filesystem (common on network shares and WSL2 `/mnt`), so reads can block on writes. Move the project (with its `.codegraph/` folder) onto a local disk.
496
475
 
497
476
  **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.
498
477
 
@@ -516,7 +495,7 @@ MIT
516
495
 
517
496
  <div align="center">
518
497
 
519
- **Made for AI coding agents — Claude Code, Cursor, Codex CLI, and opencode**
498
+ **Made for AI coding agents — Claude Code, Cursor, Codex CLI, opencode, and Hermes Agent**
520
499
 
521
500
  [Report Bug](https://github.com/colbymchenry/codegraph/issues) · [Request Feature](https://github.com/colbymchenry/codegraph/issues)
522
501
 
package/npm-shim.js CHANGED
@@ -19,11 +19,23 @@ var childProcess = require('child_process');
19
19
 
20
20
  var target = process.platform + '-' + process.arch; // e.g. darwin-arm64, linux-x64
21
21
  var pkg = '@colbymchenry/codegraph-' + target;
22
- var launcher = process.platform === 'win32' ? 'bin/codegraph.cmd' : 'bin/codegraph';
22
+ var isWindows = process.platform === 'win32';
23
23
 
24
- var binPath;
24
+ // On Windows the bundle's launcher is a .cmd batch file. Modern Node refuses to
25
+ // spawn .cmd/.bat directly — spawnSync throws EINVAL (the CVE-2024-27980
26
+ // hardening, observed on Node 24). So on Windows we skip the .cmd and invoke the
27
+ // bundled node.exe against the app entry point directly. On unix the bin launcher
28
+ // is a shell script that spawns cleanly.
29
+ var command, args;
25
30
  try {
26
- binPath = require.resolve(pkg + '/' + launcher);
31
+ if (isWindows) {
32
+ command = require.resolve(pkg + '/node.exe');
33
+ var entry = require.resolve(pkg + '/lib/dist/bin/codegraph.js');
34
+ args = [entry].concat(process.argv.slice(2));
35
+ } else {
36
+ command = require.resolve(pkg + '/bin/codegraph');
37
+ args = process.argv.slice(2);
38
+ }
27
39
  } catch (e) {
28
40
  process.stderr.write(
29
41
  'codegraph: no prebuilt bundle for ' + target + '.\n' +
@@ -35,7 +47,7 @@ try {
35
47
  process.exit(1);
36
48
  }
37
49
 
38
- var res = childProcess.spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
50
+ var res = childProcess.spawnSync(command, args, { stdio: 'inherit' });
39
51
  if (res.error) {
40
52
  process.stderr.write('codegraph: ' + res.error.message + '\n');
41
53
  process.exit(1);
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@colbymchenry/codegraph",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
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.1",
10
- "@colbymchenry/codegraph-darwin-x64": "0.9.1",
11
- "@colbymchenry/codegraph-linux-arm64": "0.9.1",
12
- "@colbymchenry/codegraph-linux-x64": "0.9.1",
13
- "@colbymchenry/codegraph-win32-arm64": "0.9.1",
14
- "@colbymchenry/codegraph-win32-x64": "0.9.1"
9
+ "@colbymchenry/codegraph-darwin-arm64": "0.9.2",
10
+ "@colbymchenry/codegraph-darwin-x64": "0.9.2",
11
+ "@colbymchenry/codegraph-linux-arm64": "0.9.2",
12
+ "@colbymchenry/codegraph-linux-x64": "0.9.2",
13
+ "@colbymchenry/codegraph-win32-arm64": "0.9.2",
14
+ "@colbymchenry/codegraph-win32-x64": "0.9.2"
15
15
  },
16
16
  "files": [
17
17
  "npm-shim.js",