Skip to content

Commit 2f3188e

Browse files
committed
docs: reframe value prop around precision/speed, update Node floor to 20, and expand language/framework coverage
- Benchmark table reordered to lead with tool calls, time, and file reads (the universal wins); cost and tokens moved right with a note that savings are scale-dependent, not a headline claim - README/introduction/quickstart/installation messaging updated to "surgical context · fewer tool calls · faster answers" framing, dropping the "16% cheaper" headline - Node engine floor raised from 18 to 20 in CLAUDE.md, package.json description updated - `codegraph init` now creates and indexes in one step; the `-i` flag is retired (still accepted as a no-op) - CLI reference expanded with new commands: `explore`, `node`, `unlock`, `daemon`, `telemetry`, `upgrade`, `version`, `help` - MCP server docs clarified: single `codegraph_explore` tool exposed by default, others unlisted but re-enableable via `CODEGRAPH_MCP_TOOLS` - Language support adds Objective-C, Astro, and R; framework routes adds Play, Vue Router/Nuxt, and Astro - API reference documents lower-level exports and embedding requirements (Node 22.5+ for `node:sqlite`) - Troubleshooting adds WSL/Windows dual-checkout guidance - How-it-works updated: SQLite backend is now Node's built-in `node:sqlite` in WAL mode, not better-sqlite3/WASM
1 parent f63e5db commit 2f3188e

17 files changed

Lines changed: 156 additions & 83 deletions

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ npx vitest run __tests__/extraction.test.ts -t "TypeScript"
2929

3030
`copy-assets` (called from `build`) copies `src/db/schema.sql` and all `src/extraction/wasm/*.wasm` files into `dist/`. **Any new SQL or grammar wasm must be copied or it won't ship.**
3131

32-
Node engines: `>=18.0.0 <25.0.0`. There is a hard exit on Node 25.x (see `src/bin/node-version-check.ts`).
32+
Node engines: `>=20.0.0 <25.0.0`. There is a hard exit on Node 25.x and below 20 (see `src/bin/node-version-check.ts`).
3333

3434
## Architecture
3535

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Follow [@getcodegraph](https://x.com/getcodegraph) on X for updates.
1010

1111
### Supercharge Claude Code, Cursor, Codex, OpenCode, Hermes Agent, Gemini, Antigravity, and Kiro with Semantic Code Intelligence
1212

13-
**~16% cheaper · ~58% fewer tool calls · 100% local**
13+
**Surgical context · fewer tool calls · faster answers · 100% local**
1414

1515
### [Documentation & Website →](https://colbymchenry.github.io/codegraph/)
1616

@@ -111,27 +111,31 @@ codegraph uninstall
111111

112112
## Why CodeGraph?
113113

114-
When Claude Code explores a codebase, it spawns **Explore agents** that scan files with grep, glob, and Read — consuming tokens on every tool call.
114+
When an AI agent needs to understand code — to answer a question or make a change — it discovers structure the slow way: grep, glob, and Read, one file at a time, rebuilding call paths and dependencies by hand. That's a pile of tool calls and round-trips before it even starts the real work.
115115

116-
**CodeGraph gives those agents a pre-indexed knowledge graph** — symbol relationships, call graphs, and code structure. Agents query the graph instantly instead of scanning files.
116+
**CodeGraph hands the agent the exact code it needs in one call.** It's a pre-built knowledge graph of every symbol, call edge, and dependency in your codebase — so instead of crawling files, the agent asks one question and gets back the relevant source, the call paths between those symbols (including dynamic-dispatch hops grep can't follow), and the blast radius of a change. **Surgical context, not a file-by-file search** — which means fewer tool calls and faster answers on every codebase, large or small.
117+
118+
> **A note on cost:** CodeGraph's win on *every* codebase is precision and speed — fewer tool calls, faster answers. It cuts token and dollar cost too, but those savings are **scale-dependent**: small and noisy on a modest codebase, and material only once a repo is large and tangled — at the scale of a Google or Microsoft monorepo, multiplied by a whole team's daily agent usage — for them to compound into a real line item. On a 500-file project, adopt CodeGraph for the speed; the cost savings show up when the codebase (and the team) gets big.
117119
118120
### Benchmark Results
119121

120-
Tested across **7 real-world open-source codebases** spanning 7 languages, comparing an agent (Claude Code, headless) answering one architecture question **with** and **without** CodeGraph. Each cell is the savings at the **median of 4 runs per arm**. _Re-validated on Opus 4.8 (2026-06-02), on the current build (`codegraph_explore` as the primary tool)._
122+
Tested across **7 real-world open-source codebases** spanning 7 languages, comparing an agent (Claude Code, headless) answering one architecture question **with** and **without** CodeGraph, at the **median of 4 runs per arm**. _Re-validated on Opus 4.8 (2026-06-02), on the current build (`codegraph_explore` as the primary tool)._
123+
124+
> **The universal win — every repo, every size: 58% fewer tool calls · 22% faster · file reads cut to ~zero.**
121125
122-
> **Average: 16% cheaper · 47% fewer tokens · 22% faster · 58% fewer tool calls**
126+
The reliable, universal payoff is **surgical context and speed**: CodeGraph collapses the agent's grep/find/Read crawl into a few direct queries — returning the exact methods you asked about even when they're buried in a multi-thousand-line file — so it answers with **near-zero file reads** while the no-CodeGraph agent spends its budget on discovery. The **Tokens** and **Cost** columns are real too, but — as noted above — they're **scale-dependent**: small and noisy per query, compounding into real money only at large-codebase, high-volume scale.
123127

124-
| Codebase | Language | Cost | Tokens | Time | Tool calls |
125-
|----------|----------|------|--------|------|------------|
126-
| **VS Code** | TypeScript · ~10k files | 18% cheaper | 64% fewer | 11% faster | 81% fewer |
127-
| **Excalidraw** | TypeScript · ~640 | even | 25% fewer | 27% faster | 40% fewer |
128-
| **Django** | Python · ~3k | 8% cheaper | 60% fewer | 13% faster | 77% fewer |
129-
| **Tokio** | Rust · ~790 | even | 38% fewer | 18% faster | 57% fewer |
130-
| **OkHttp** | Java · ~645 | 25% cheaper | 54% fewer | 31% faster | 50% fewer |
131-
| **Gin** | Go · ~110 | 19% cheaper | 23% fewer | 24% faster | 44% fewer |
132-
| **Alamofire** | Swift · ~110 | 40% cheaper | 64% fewer | 33% faster | 58% fewer |
128+
| Codebase | Language | Tool calls | Time | File reads | Tokens | Cost |
129+
|----------|----------|------------|------|------------|--------|------|
130+
| **VS Code** | TypeScript · ~10k files | 81% fewer | 11% faster | 0 vs 9 | 64% fewer | 18% cheaper |
131+
| **Excalidraw** | TypeScript · ~640 | 40% fewer | 27% faster | 0 vs 7 | 25% fewer | even |
132+
| **Django** | Python · ~3k | 77% fewer | 13% faster | 0 vs 9 | 60% fewer | 8% cheaper |
133+
| **Tokio** | Rust · ~790 | 57% fewer | 18% faster | 0 vs 8 | 38% fewer | even |
134+
| **OkHttp** | Java · ~645 | 50% fewer | 31% faster | 0 vs 4 | 54% fewer | 25% cheaper |
135+
| **Gin** | Go · ~110 | 44% fewer | 24% faster | 1 vs 6 | 23% fewer | 19% cheaper |
136+
| **Alamofire** | Swift · ~110 | 58% fewer | 33% faster | 0 vs 9 | 64% fewer | 40% cheaper |
133137

134-
CodeGraph cuts **tokens, tool calls, and wall-clock time on every repo** — across small, medium, and large codebases — and answers them with **near-zero file reads**, while the no-CodeGraph agent spends its budget on grep/find/Read discovery. `codegraph_explore` shows the answer in full — the mechanism plus the exact methods you asked about, even when they're buried in a multi-thousand-line file — while collapsing redundant interchangeable implementations to signatures, so the response is sized to the *answer* rather than the file count. **Cost stays flat-to-cheaper everywhere** — largest on the small repos (Alamofire, OkHttp), roughly break-even on the most response-heavy ones (Excalidraw, Tokio), where CodeGraph trades the no-CodeGraph agent's many small grep/read round-trips for a few large, cache-heavy tool responses.
138+
<sub>**File reads** = median files the agent opened **with** vs **without** CodeGraph — the surgical-context win in one column. **Tokens** and **Cost** are the same with-vs-without deltas; they're directional (they move run-to-run) and, per query, small in absolute terms — which is why they only become a line item at scale. `codegraph_explore` also collapses redundant interchangeable implementations to signatures, so a response is sized to the *answer* rather than the file count.</sub>
135139

136140
<details>
137141
<summary><strong>Per-repo breakdown — WITH vs WITHOUT (median of 4)</strong></summary>
@@ -234,7 +238,7 @@ CodeGraph cuts **tokens, tool calls, and wall-clock time on every repo** — acr
234238

235239
| | |
236240
|---|---|
237-
| **Smart Context Building** | One tool call returns entry points, related symbols, and code snippets — no expensive exploration agents |
241+
| **Surgical Context** | One tool call returns entry points, related symbols, and code snippets — no slow file-by-file exploration |
238242
| **Full-Text Search** | Find code by name instantly across your entire codebase, powered by FTS5 |
239243
| **Impact Analysis** | Trace callers, callees, and the full impact radius of any symbol before making changes |
240244
| **Always Fresh** | File watcher uses native OS events (FSEvents/inotify/ReadDirectoryChangesW) with debounced auto-sync — the graph stays current as you code, zero config |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@colbymchenry/codegraph",
33
"version": "1.0.1",
4-
"description": "Supercharge Claude Code with semantic code intelligence. 94% fewer tool calls • 77% faster exploration • 100% local.",
4+
"description": "Supercharge AI coding agents with semantic code intelligence — surgical context, fewer tool calls, faster answers. 100% local.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"bin": {

site/src/content/docs/core-concepts/how-it-works.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ files → Extraction (tree-sitter) → DB (nodes/edges/files)
2121

2222
## 2. Storage
2323

24-
Everything goes into a local SQLite database (`.codegraph/codegraph.db`) with FTS5 full-text search. CodeGraph uses native `better-sqlite3` when available and transparently falls back to a WASM backend; `codegraph status` shows which is live.
24+
Everything goes into a local SQLite database (`.codegraph/codegraph.db`) with FTS5 full-text search, using Node's built-in `node:sqlite` in WAL mode from the bundled runtime.
2525

2626
## 3. Resolution
2727

site/src/content/docs/core-concepts/resolution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ Static parsing misses computed and indirect calls, so flows can break at dynamic
2525
- `EventEmitter` channels
2626
- React re-render (`setState``render`)
2727
- JSX child (`render` → child component)
28-
- Django ORM descriptors
28+
- Interface → implementation dispatch
2929

3030
Every synthesized edge is marked `provenance: 'heuristic'` with the site that wired it, and is shown inline wherever a path crosses it.

site/src/content/docs/getting-started/installation.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ The installer will:
1414
- Ask which agent(s) to configure — auto-detecting installed ones from **Claude Code**, **Cursor**, **Codex CLI**, **opencode**, **Hermes Agent**, **Gemini CLI**, **Antigravity IDE**, and **Kiro**.
1515
- Prompt to install `codegraph` on your `PATH` (so agents can launch the MCP server).
1616
- Ask whether configs apply to all your projects or just this one.
17-
- Write each chosen agent's MCP server config plus an instructions file (e.g. `CLAUDE.md`, `.cursor/rules/codegraph.mdc`, `~/.codex/AGENTS.md`).
17+
- Write each chosen agent's MCP server config, plus a small marker-fenced CodeGraph section in the agent's instructions file (`CLAUDE.md` / `AGENTS.md` / `GEMINI.md`). Cursor and Kiro get the MCP config only. Removed cleanly by `codegraph uninstall`.
1818
- Set up auto-allow permissions when Claude Code is one of the targets.
19-
- Initialize your current project (local installs only).
19+
20+
The installer **wires up your agents only — it does not index your code.** After it finishes, build each project's graph yourself with `codegraph init` (step 3 below).
2021

2122
## Non-interactive (scripting / CI)
2223

@@ -43,10 +44,10 @@ Restart your agent (Claude Code / Cursor / Codex CLI / opencode / Hermes Agent /
4344

4445
```bash
4546
cd your-project
46-
codegraph init -i
47+
codegraph init
4748
```
4849

49-
This builds the per-project knowledge graph index and wires up any project-local agent surfaces, so a single global `codegraph install` works in every project you open.
50+
`codegraph init` creates the local `.codegraph/` directory and builds the full graph in the same step — one command. A single global `codegraph install` covers every project; you run `codegraph init` once per project.
5051

5152
## Supported platforms
5253

site/src/content/docs/getting-started/introduction.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Introduction
3-
description: What CodeGraph is, and why it makes AI coding agents faster and cheaper.
3+
description: What CodeGraph is, and why it makes AI coding agents faster and more precise.
44
---
55

66
CodeGraph is a **local-first code-intelligence tool**. It parses your codebase with [tree-sitter](https://tree-sitter.github.io/), stores every symbol, edge, and file in a local SQLite database, and exposes the result as a queryable **knowledge graph** — over the [Model Context Protocol (MCP)](/codegraph/reference/mcp-server/), a CLI, and a TypeScript library.
@@ -9,16 +9,15 @@ It exists to make AI coding agents — Claude Code, Cursor, Codex CLI, opencode,
99

1010
## Why it matters
1111

12-
When an agent explores a codebase, it spends most of its budget on *discovery* — finding the right files before it can read them. CodeGraph removes that step: symbol relationships, call graphs, and structure are already indexed.
12+
When an agent explores a codebase, it spends most of its budget on *discovery* — finding the right files before it can read them. CodeGraph removes that step: it hands the agent the exact code it needs in one call, so symbol relationships, call graphs, and structure don't have to be rebuilt file by file.
1313

14-
Tested across 7 real-world open-source codebases (median of 4 runs per arm), giving an agent CodeGraph was on average:
14+
The universal win is **surgical context and speed** — fewer tool calls, faster answers, on every codebase. Tested across 7 real-world open-source codebases (median of 4 runs per arm), giving an agent CodeGraph meant, regardless of repo size:
1515

16-
- **35% cheaper**
17-
- **57% fewer tokens**
18-
- **46% faster**
19-
- **71% fewer tool calls**
16+
- **58% fewer tool calls**
17+
- **22% faster**
18+
- **file reads cut to ~zero**
2019

21-
The gains scale with codebase size — on large repos the agent answers from the index with **zero file reads**.
20+
Token and dollar savings are real too, but they're the **scale-dependent bonus** that shows up on large, tangled codebases run at volume — small and noisy on a modest repo, material only once the codebase (and the team) gets big.
2221

2322
## What's in the graph
2423

site/src/content/docs/getting-started/quickstart.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ description: Get up and running with CodeGraph in seconds.
55

66
Get up and running with CodeGraph in seconds.
77

8-
## No Node.js required — one command grabs the right build for your OS
8+
## 1. Install the CLI
9+
10+
No Node.js required — one command grabs the right build for your OS:
911

1012
```bash
1113
# macOS / Linux
@@ -15,22 +17,23 @@ curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install
1517
irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex
1618
```
1719

18-
## Already have Node? Use npm instead (works on any version)
20+
Already have Node? `npm i -g @colbymchenry/codegraph` works on any version. CodeGraph bundles its own runtime — nothing to compile, no native build, works the same everywhere. The installer puts `codegraph` on your `PATH` but doesn't change your current shell — open a new terminal before the next step.
21+
22+
## 2. Wire up your agent(s)
1923

2024
```bash
21-
npx @colbymchenry/codegraph # zero-install, or:
22-
npm i -g @colbymchenry/codegraph
25+
codegraph install
2326
```
2427

25-
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.
28+
Auto-detects and configures Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro — wiring the CodeGraph MCP server into each. This step connects your agents only; it does **not** index any code. (Shortcut: `npx @colbymchenry/codegraph` downloads and runs the installer in one go.)
2629

27-
## Initialize Projects
30+
## 3. Initialize each project
2831

2932
```bash
3033
cd your-project
31-
codegraph init -i
34+
codegraph init
3235
```
3336

34-
That's it — your agent will use CodeGraph tools automatically when a `.codegraph/` directory exists.
37+
`codegraph init` creates the local `.codegraph/` directory and builds the full graph in the same step — one command, done. Your agent will use CodeGraph tools automatically when a `.codegraph/` directory exists.
3538

3639
Next: build [Your First Graph](/codegraph/getting-started/your-first-graph/), or see the full [Installation](/codegraph/getting-started/installation/) options.

site/src/content/docs/getting-started/your-first-graph.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ title: Your First Graph
33
description: Build an index and run your first queries against it.
44
---
55

6-
Once CodeGraph is installed, building and exploring a graph takes three commands.
6+
Once CodeGraph is installed, building and exploring a graph takes a few commands.
77

88
## Index a project
99

1010
```bash
1111
cd your-project
12-
codegraph init -i # initialize + index in one step
12+
codegraph init
1313
```
1414

15-
`init` creates the `.codegraph/` directory; `-i` (or `--index`) immediately builds the full index. For an existing project you can re-index any time:
15+
`codegraph init` creates the `.codegraph/` directory and builds the full graph in the same step — one command, done. From there a native file watcher keeps the index in sync on every change, so you rarely need to rebuild by hand. When you do want to:
1616

1717
```bash
18-
codegraph index # full index
18+
codegraph index # full re-index
1919
codegraph sync # incremental update of changed files
2020
```
2121

@@ -29,15 +29,22 @@ This reports the node/edge/file counts, the active SQLite backend, and the journ
2929

3030
## Run a query
3131

32+
Reach for `codegraph explore` first — a natural-language question or a bag of symbol names returns the relevant source plus the call paths between those symbols in a single shot (the same output the `codegraph_explore` tool gives your agent):
33+
34+
```bash
35+
codegraph explore "how does login work"
36+
```
37+
38+
For narrower, scriptable lookups there are focused commands:
39+
3240
```bash
3341
codegraph query UserService # find symbols by name
3442
codegraph callers handleRequest # what calls a function
3543
codegraph callees handleRequest # what a function calls
3644
codegraph impact AuthMiddleware # what a change would affect
37-
codegraph context "fix the login flow" # build task-focused context
3845
```
3946

40-
Each accepts `--json` for machine-readable output. See the full [CLI reference](/codegraph/reference/cli/).
47+
These four each accept `--json` for machine-readable output. See the full [CLI reference](/codegraph/reference/cli/).
4148

4249
## Hand it to your agent
4350

site/src/content/docs/guides/framework-routes.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ CodeGraph detects web-framework routing files and emits `route` nodes linked by
88
| Framework | Shapes recognized |
99
|---|---|
1010
| **Django** | `path()`, `re_path()`, `url()`, `include()` in `urls.py` (CBV `.as_view()`, dotted paths) |
11-
| **Flask** | `@app.route('/path', methods=[])`, blueprint routes |
12-
| **FastAPI** | `@app.get()`, `@router.post()`, all standard methods |
13-
| **Express** | `app.get()`, `router.post()` with middleware chains |
14-
| **NestJS** | `@Controller` + `@Get/@Post/`, GraphQL resolvers, message/event patterns, WebSocket subscriptions |
11+
| **Flask** | `@app.route('/path', methods=[...])`, blueprint routes |
12+
| **FastAPI** | `@app.get(...)`, `@router.post(...)`, all standard methods |
13+
| **Express** | `app.get(...)`, `router.post(...)` with middleware chains |
14+
| **NestJS** | `@Controller` + `@Get/@Post/...`, GraphQL `@Resolver` + `@Query/@Mutation`, `@MessagePattern`/`@EventPattern`, `@SubscribeMessage` |
1515
| **Laravel** | `Route::get()`, `Route::resource()`, `Controller@action`, tuple syntax |
16-
| **Drupal** | `*.routing.yml` routes; `hook_*` implementations in `.module`/`.theme`/`.install`/`.inc` |
17-
| **Rails** | `get '/x', to: 'users#index'`, hash-rocket syntax |
16+
| **Drupal** | `*.routing.yml` routes (`_controller`, `_form`, entity handlers); `hook_*` implementations in `.module`/`.theme`/`.install`/`.inc` |
17+
| **Rails** | `get '/x', to: 'users#index'`, hash-rocket `=>` syntax |
1818
| **Spring** | `@GetMapping`, `@PostMapping`, `@RequestMapping` on methods |
19-
| **Gin / chi / gorilla / mux** | `r.GET(…)`, `router.HandleFunc(…)` |
19+
| **Play** | `GET`/`POST`/… verb routes in `conf/routes``Controller.method` actions (Scala + Java) |
20+
| **Gin / chi / gorilla / mux** | `r.GET(...)`, `router.HandleFunc(...)` |
2021
| **Axum / actix / Rocket** | `.route("/x", get(handler))` |
2122
| **ASP.NET** | `[HttpGet("/x")]` attributes on action methods |
2223
| **Vapor** | `app.get("x", use: handler)` |
2324
| **React Router** / **SvelteKit** | Route component nodes |
25+
| **Vue Router** / **Nuxt** | `pages/` file-based routes, `server/api/` endpoints, route middleware |
26+
| **Astro** | `src/pages/` file-based routes (`.astro` pages + `.ts` endpoints, `[param]`/`[...rest]` syntax) |
2427

2528
Route resolution is automatic — there's nothing to configure. If a framework file is recognized, its routes appear in the graph after the next index or sync.

0 commit comments

Comments
 (0)