You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ npx vitest run __tests__/extraction.test.ts -t "TypeScript"
29
29
30
30
`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.**
31
31
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`).
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.
115
115
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.
117
119
118
120
### Benchmark Results
119
121
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.**
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.
123
127
124
-
| Codebase | Language |Cost | Tokens|Time | Tool calls|
|**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|
133
137
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>
135
139
136
140
<details>
137
141
<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
234
238
235
239
|||
236
240
|---|---|
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|
238
242
|**Full-Text Search**| Find code by name instantly across your entire codebase, powered by FTS5 |
239
243
|**Impact Analysis**| Trace callers, callees, and the full impact radius of any symbol before making changes |
240
244
|**Always Fresh**| File watcher uses native OS events (FSEvents/inotify/ReadDirectoryChangesW) with debounced auto-sync — the graph stays current as you code, zero config |
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.
Copy file name to clipboardExpand all lines: site/src/content/docs/getting-started/installation.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,10 @@ The installer will:
14
14
- 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**.
15
15
- Prompt to install `codegraph` on your `PATH` (so agents can launch the MCP server).
16
16
- 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`.
18
18
- 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).
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.
Copy file name to clipboardExpand all lines: site/src/content/docs/getting-started/introduction.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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.
4
4
---
5
5
6
6
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,
9
9
10
10
## Why it matters
11
11
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.
13
13
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:
15
15
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**
20
19
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.
## 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)
19
23
20
24
```bash
21
-
npx @colbymchenry/codegraph # zero-install, or:
22
-
npm i -g @colbymchenry/codegraph
25
+
codegraph install
23
26
```
24
27
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.)
26
29
27
-
## Initialize Projects
30
+
## 3. Initialize each project
28
31
29
32
```bash
30
33
cd your-project
31
-
codegraph init -i
34
+
codegraph init
32
35
```
33
36
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.
35
38
36
39
Next: build [Your First Graph](/codegraph/getting-started/your-first-graph/), or see the full [Installation](/codegraph/getting-started/installation/) options.
Copy file name to clipboardExpand all lines: site/src/content/docs/getting-started/your-first-graph.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,19 @@ title: Your First Graph
3
3
description: Build an index and run your first queries against it.
4
4
---
5
5
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.
7
7
8
8
## Index a project
9
9
10
10
```bash
11
11
cd your-project
12
-
codegraph init -i # initialize + index in one step
12
+
codegraph init
13
13
```
14
14
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:
16
16
17
17
```bash
18
-
codegraph index # full index
18
+
codegraph index # full re-index
19
19
codegraph sync # incremental update of changed files
20
20
```
21
21
@@ -29,15 +29,22 @@ This reports the node/edge/file counts, the active SQLite backend, and the journ
29
29
30
30
## Run a query
31
31
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
+
32
40
```bash
33
41
codegraph query UserService # find symbols by name
34
42
codegraph callers handleRequest # what calls a function
35
43
codegraph callees handleRequest # what a function calls
36
44
codegraph impact AuthMiddleware # what a change would affect
37
-
codegraph context "fix the login flow"# build task-focused context
38
45
```
39
46
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/).
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