█

AI/TLDR

CodeGraph

A local code knowledge graph that answers an agent's question in one tool call

Code Indexing & SearchOpen source
Latest
0.7.10
Updated
19 May 2026
License
MIT
Coverage
1 story

What's new

0.7.1019 May 2026

CodeGraph trended on GitHub with a local SQLite plus tree-sitter knowledge graph exposed over MCP, reported to cut Claude Code, Codex and Cursor codebase-exploration tool calls by 94%.

Latest news

Overview

CodeGraph pre-indexes a codebase into a knowledge graph so a coding agent can ask one question instead of running a dozen greps. A single MCP tool call returns the verbatim source of the symbols involved, the call paths through them, and the blast radius of a change — the context an agent would otherwise assemble by reading files one at a time.

The indexer is a native Rust kernel that parses source with tree-sitter, extracting nodes (functions, classes) and edges (calls, imports), then resolves references: calls to definitions, imports to their sources, inheritance chains. Everything lands in a local SQLite database with FTS5 full-text search, and a file watcher on native OS events keeps the graph in sync as you edit. Nothing leaves the machine — there is no external service in the path.

It understands more than plain call graphs: it recognises routing patterns across 17 web frameworks, and bridges cross-language boundaries such as Swift↔Objective-C, the React Native bridge and Expo Modules. A browser viewer renders the graph interactively — callers, source, callees and entry points — which is also the quickest way to sanity-check what the agent is being told.

What it does

  • Rust tree-sitter kernel indexing 30+ languages, from TypeScript, Python, Go and Rust to Swift, Kotlin, Solidity and Terraform
  • One MCP call returns verbatim source, call flow and blast-radius impact instead of a grep-and-read loop
  • Local SQLite storage with FTS5 full-text symbol search — no external service, fully offline
  • File watcher on native OS events auto-syncs the graph after a debounce as you code
  • Reference resolution: calls to definitions, imports to sources, inheritance chains
  • Framework-aware route detection across 17 web frameworks, plus Swift↔Objective-C and React Native bridging
  • Installer auto-detects agents — Claude Code, Cursor, Codex CLI, opencode, Gemini CLI, Antigravity, Kiro, GitHub Copilot and Hermes Agent
  • Browser viewer showing callers, source, callees and entry points

Getting started

Install the binary, let the installer configure your agents, then build the index once per repository.

Install without Node

A shell installer for macOS and Linux, or PowerShell on Windows.

bashbash
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex

Or install with npm

If you already have Node on the machine.

bashbash
npm i -g @colbymchenry/codegraph

Wire it into your agents and index the repo

`codegraph install` detects and configures supported agents; `codegraph init` builds the index once per repository; `codegraph ui` opens the browser viewer.

bashbash
codegraph install
codegraph init
codegraph ui

Let the watcher keep it fresh

After `init`, the file watcher tracks the project with native OS events and syncs changes after a short debounce, so you do not re-index by hand as you work.

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Cut the exploration tool calls a coding agent makes on a large repository by giving it symbols and call paths directly
  • Ask what a change would break before making it, using blast-radius impact analysis
  • Keep code context fully local — the index is SQLite on disk, with no external service in the path
  • Trace a request across a language boundary in a mobile codebase, such as Swift to Objective-C or a React Native bridge

How CodeGraph compares

CodeGraph alongside other open-source code indexing & search tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
CodeGraph★ 75.6kA local code knowledge graph that answers an agent's question in one tool call
GitNexus★ 48.1kIndexes a codebase into a knowledge graph of dependencies, call chains and execution flows, then exposes it to Claude Code, Cursor and Codex through MCP tools.
codebase-memory-mcp★ 47.6kA native MCP server that indexes a repository into a persistent tree-sitter knowledge graph of functions, call chains and routes, queried by agents through 15 tools.
code-review-graph★ 32.4kA local-first code intelligence graph built with Tree-sitter that serves precise, incrementally-updated structural context to AI coding tools over MCP, so they read only the code a task needs.
XERJ★ 17kSingle-binary, Elasticsearch-compatible search engine whose autoindex command turns any folder of code, docs, logs or PDFs into typed indices that AI coding agents query via CLI or MCP instead of grepping.
Claude Context★ 12.6kAn MCP server that indexes your codebase into a vector database so AI coding agents can find relevant code by meaning instead of loading whole folders.
Graft★ 10.8kBuilds a persistent knowledge graph of your codebase as linked markdown files, then feeds the matching nodes to coding agents so they stop re-exploring the repo on every task.
Semble★ 6.3kA CPU-only code search library and MCP server that indexes a repository with tree-sitter chunking, Model2Vec embeddings and BM25, so an agent retrieves the few relevant snippets instead of grepping and reading whole files.