The Problem
Coding agents waste context window and tool calls re-reading files they have already seen. Every file open, grep, and directory listing costs tokens, and agents often re-explore the same code paths multiple times in one session. A pre-indexed code graph that updates on file changes gives agents surgical access to code structure without re-scanning the tree.
What This Does
CodeGraph builds a semantic code graph from a repository and exposes it to agent tools through an MCP server. The codegraph-kernel/ directory contains the Rust-powered indexing engine, while src/ holds the TypeScript orchestration layer. The __tests__/ tree (399 files) covers language resolution, graph querying, and daemon behavior, with fixtures for TypeScript, Go, and a kernel-parity/ set spanning C, C++, Rust, Swift, Scala, Dart, PHP, Lua, and more.
The tool indexes symbols, call edges, and framework-aware routes, then serves them locally to multiple agents: Claude Code, Cursor, Codex, OpenCode, Hermes, Gemini, Antigravity, Kiro, and GitHub Copilot. A ui/ directory (97 files, Svelte-based) provides a browser view of the graph, and scripts/ (72 files) handles install, upgrade, and daemon lifecycle.
How It Is Wired
The traced entry points are all test fixtures — __tests__/fixtures/*/src/index.ts and payroll-go/cmd/payrolld/main.go — meaning the internal call graph has not been mapped for the production code paths in this repository yet. The README documents a CLI (codegraph upgrade, codegraph commands) and an MCP tool surface, but the specific function-level flow from CLI invocation through indexing to agent tool responses is not present in the analysis blocks.
What the structure does make clear: the daemon is central. Test names like daemon-manager.test.ts, daemon-registry.test.ts, daemon-socket-fallback.test.ts, and daemon-client-liveness.test.ts indicate a long-running process that agents connect to over a socket, with fallback behavior and liveness checks. The kernel in codegraph-kernel/ is the indexing core, and explore-* tests (allocation, blast radius, ranking, dedup, path pinning) show that query responses are budgeted and ranked, not raw dumps.
How To Use It
The README states installation requires no Node.js — the runtime is bundled. The fork URL is:
git clone https://github.com/moses-y/codegraph
The README documents codegraph upgrade for existing installs and a CLI reference section. Since this is a fork of colbymchenry/codegraph, the upstream npm package (@colbymchenry/codegraph) is the likely distribution channel, but this fork's package name and publish state are not confirmed in the structure. No package.json exists at the repo root in the listing — only inside test fixtures — so the build command for the TypeScript layer cannot be verified from the structure alone.
Real-World Use
An agent working on a large TypeScript codebase starts a session. Instead of grepping for a function and reading three files to trace a call path, it asks CodeGraph for the callers and callees of the target symbol. The graph returns the relevant edges in a few hundred tokens. When the developer edits a file, the daemon re-indexes the change, so the next query reflects current code without a full rebuild.
Code Health & Issues
Deep static analysis has not run for this repository yet. The structure supports these observations:
- Low — Root-level build configuration is absent from the listing; only fixture
package.jsonfiles appear, so the production build path is unverified. - Low — 403 test files is a strong signal, but coverage is concentrated on language resolution and explore/ranking behavior; CLI and daemon integration paths have fewer visible tests.
The Bottom Line
CodeGraph targets a real problem: agent context efficiency through pre-indexed code graphs. The fork inherits a substantial upstream codebase with broad language support and a serious test suite. The main open question is fork maintenance — with 0 stars and no topics, this is an unproven distribution of someone else's work, so pin to the upstream release unless you need this specific fork's changes.