codegraph is a free, open source ai assisted coding project written in C and released under MIT. It has 71,385 GitHub stars, 4,590 forks and 518 open issues, and was last pushed 41 hours ago. On this registry it ranks #6 of 26 tracked projects in AI Assisted Coding, with 5 head-to-head comparisons available.

What is codegraph?

CodeGraph is a pre-indexed code knowledge graph that runs locally and wires into AI coding agents — Claude Code, Cursor, Codex, Gemini, OpenCode, AntiGravity, Kiro, GitHub Copilot, and Hermes Agent — so those agents query a semantic map of the codebase instead of reading files one at a time.

What it is

CodeGraph builds and maintains a graph of a codebase ahead of the moment an agent needs it. The index updates automatically when code changes, and agents reach it through MCP tools and a bundled CLI, so a request can resolve to the relevant definitions, call sites, and routes rather than walking the tree. According to the project README, the kernel is powered by Rust, and the distribution is self-contained: the release bundles its own runtime, so no Node.js installation and no native build step are required.

The concrete problem it solves is context cost. Agent workflows typically spend tokens and tool calls probing a repository file by file until they happen to land on the relevant code, and the project frames its benefit as fewer tokens and fewer tool calls for the same task. CodeGraph replaces that exploratory read-and-grep loop with a pre-built index that answers structural questions directly. The README states the tool is 100% local, so source does not leave the machine as part of building or querying the graph.

Key capabilities

  • Pre-indexed code knowledge graph that auto-syncs as code changes, so the graph stays current without a manual rebuild.
  • MCP tools exposed to supported agents, documented under an MCP Tools section in the README.
  • CLI lifecycle commands including codegraph upgrade to update in place, codegraph upgrade --check to test whether an update exists, and a pinned-version upgrade form.
  • The upgrade path detects whether the install came from the bundle, npm, or npx, and updates the matching installation.
  • Framework-aware route detection, so framework routes surface as graph nodes rather than plain string literals.
  • Mixed iOS / React Native / Expo bridging, covering projects that span native and JavaScript layers.
  • Three install routes: curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh on macOS and Linux, irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex on Windows, or npm i -g @colbymchenry/codegraph where Node is present.

Who uses it and how

  • Developers working across more than one agent: the supported list spans nine tools, and each can be wired to the same local graph.
  • Mobile teams whose projects bridge native iOS and React Native or Expo code, which the README addresses as a named scenario.
  • Teams on framework-driven web applications that want route structure available to the agent rather than inferred from searches.
  • Cross-platform development groups, since Windows, macOS, and Linux are all listed as supported platforms.
  • Projects large enough that cross-file coverage is measured and reported in the README, where per-file reads strain the context budget.

Getting started

Install with the shell command for macOS and Linux, the PowerShell command for Windows, or npm i -g @colbymchenry/codegraph if Node is already present. The installer places codegraph on the PATH without modifying the current shell, so a new terminal is needed before wiring up an agent.

How it compares

The facts provided name no paid products that CodeGraph replaces and no similar tools in this category, so no direct contrast is possible here. On the evidence available it stands alone in this registry, and its only documented comparison point is the unassisted agent workflow it is designed to make cheaper.

When to use it — and when not to

Pick CodeGraph when agents are already part of the workflow, when the codebase is large enough that repeated file reads dominate token spend, and when keeping the index on local machines is a requirement rather than a preference. The trade-offs are visible in the metadata: the repository carries 518 open issues, and the hosted platform described in the README is still at the early beta access stage, so anyone wanting managed pull-request analysis cannot get it today. Skip it if the agent in use is not on the supported list, or if the project needs a hosted service now rather than a local index each developer must run. The MIT licence is unambiguous, which removes licence risk from the decision.

project readme (upstream, from github) — read inline

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 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 readme truncated — read the full docs on github

Frequently asked questions

Is codegraph free to use?

codegraph is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does codegraph do?

Pre-indexed code knowledge graph, auto syncs on code changes, for Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, CoPilot, and Hermes Agent — f

What is codegraph written in?

codegraph is primarily written in C. Its source is publicly available at https://github.com/colbymchenry/codegraph, and it has 71,385 GitHub stars.