MCPcopy Create free account
hub / github.com/colbymchenry/codegraph

github.com/colbymchenry/codegraph

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.6.0 ↗ · + Follow · compare 4 versions
6,960 symbols 20,955 edges 567 files 1,854 documented · 27% updated 1d agov1.6.0 · 2026-08-26★ 68,300156 open issues

Browse by type

Functions 5,753 Types & classes 1,206 Endpoints 1
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CodeGraph

Already installed? Run codegraph upgrade

Follow @getcodegraph on X for updates.

Supercharge Claude Code, Cursor, Codex, OpenCode, Hermes Agent, Gemini, Antigravity, Kiro, and GitHub Copilot with Semantic Code Intelligence

The fastest complete code graph · surgical context · built for how agents actually work · 100% local

Rust

  Kernel powered by Rust

Documentation & Website →

npm version License: MIT Self-contained npm provenance Attested builds

Windows macOS Linux

Claude Code Cursor Codex opencode Hermes Agent Gemini Antigravity Kiro GitHub Copilot

The CodeGraph platform is coming — for every PR, know exactly what to test, what could break, which flows are affected, and whether business logic is compromised.

Join the waitlist for early beta access

Get early beta access to the hosted product · getcodegraph.com

Contents

Get Started

1. Install the CLI

No Node.js required — one command grabs the right build for your OS:

# macOS / Linux
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

Already have Node? Use npm instead (works on any version)

npm i -g @colbymchenry/codegraph

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 so the command resolves.

Upgrade any time with codegraph upgrade — it detects how you installed (bundle, npm, or npx) and updates in place. Add --check to see if an update is available, or codegraph upgrade <version> to pin one.

2. Wire up your agent(s)

In a new terminal, run the installer to connect CodeGraph to the agents you use:

codegraph install

Detects and auto-configures Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, Kiro, and GitHub Copilot (VS Code, Copilot CLI, JetBrains IDEs) — wiring the CodeGraph MCP server into each. This is the step that connects CodeGraph to your agent; installing the CLI in step 1 does not do it on its own. It only wires up your agent — it does not index any code; building each project's graph is the separate codegraph init in step 3. (Shortcut: npx @colbymchenry/codegraph downloads and runs this in one go.)

3. Initialize each project

cd your-project
codegraph init

codegraph init creates the local .codegraph/ directory and builds the full graph in the same step — one command, done.

1_C_VYnhpys0UHrOuOgpgoyw

4. No more syncing!

Auto-sync is enabled by default. CodeGraph watches the project and updates the graph on every file change — while your agent edits code, or you add, modify, or delete files. The index is never stale, and there is nothing to re-run.

Uninstall

Changed your mind? One command removes CodeGraph from every agent it configured and the CLI itself — every install it finds (standalone bundle, npm global package, launcher link), shown to you before anything is deleted:

codegraph uninstall

Pass --keep-cli to remove only the agent configurations and keep the CLI installed.

Reverses the installer — strips CodeGraph's MCP server config, instructions, and permissions from each configured agent. Your project indexes (.codegraph/) are left untouched; remove those per-project with codegraph uninit. Use --target to remove from specific agents, or --yes to run non-interactively.


Language Support

Every language below gets the same treatment — full structural extraction and cross-file resolution into one graph, no per-language setup:

TypeScript JavaScript ArkTS Python Go Rust Java C# PHP Ruby C C++ Objective-C Metal CUDA Swift Kotlin Scala Dart Svelte Vue Astro Liquid Pascal / Delphi Lua R Luau CFML COBOL Visual Basic .NET Erlang Solidity Terraform / OpenTofu Nix

Per-language details — extensions, frameworks, and what exactly gets extracted — in Supported Languages.


Why CodeGraph?

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.

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.

token-cost-savings-scale

A note on cost: CodeGraph's win on every codebase is precision — the agent stops crawling files and answers from the graph. On current models that precision is also a large direct saving: the 2026-08 re-measurement, on a harness that blocks the CLI in both arms, put it at 44% lower cost and 62% fewer tokens on average across the seven benchmark repos, because a strong model without the graph burns its budget re-deriving structure. Cost tracks how much discovery a question demands more than raw repo size: 57–78% on questions the file-reading agent needed 28–43 tool calls to answer, near-even where it got there in 7.

A note on context: the numbers above measure throughput — tokens processed, tools called, dollars spent to reach one answer. They don't measure what is still sitting in your context

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 2,917
Method 2,836
Interface 780
Class 347
Struct 47
Enum 28
TypeAlias 4
Route 1

Languages

TypeScript77%
Rust14%
Go3%
C1%
C++1%
Kotlin1%

Modules by API surface

__tests__/fixtures/tail-render-ts/types/worker-configuration.d.ts1,261 symbols
src/mcp/tools.ts156 symbols
src/extraction/tree-sitter.ts119 symbols
src/db/queries.ts109 symbols
src/resolution/callback-synthesizer.ts89 symbols
src/index.ts85 symbols
codegraph-kernel/src/ccpp/mod.rs78 symbols
__tests__/fixtures/ambient-decls-ts/types/worker-configuration.d.ts73 symbols
__tests__/fixtures/kernel-parity/torture.kt69 symbols
src/extraction/index.ts66 symbols
codegraph-kernel/src/java.rs66 symbols
codegraph-kernel/src/swift.rs63 symbols

Dependencies from manifests, versioned

@astrojs/starlight0.39.2 · 1×
@clack/prompts1.3.0 · 1×
@fontsource-variable/archivo5.2.8 · 1×
@fontsource/ibm-plex-mono5.2.7 · 1×
@types/node20.19.30 · 1×
@types/picomatch4.0.2 · 1×
astro6.3.1 · 1×
chart.js4.4.0 · 1×
commander14.0.2 · 1×
fast-string-width3.0.2 · 1×
fast-wrap-ansi0.2.0 · 1×

Datastores touched

(mysql)Database · 1 repos
mydbDatabase · 1 repos

For agents

$ claude mcp add codegraph \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page