codegraph: a local code graph for coding agents
codegraph indexes a local code knowledge graph, auto syncs on code changes, and names nine agent harnesses as targets. C, MIT licensed, 72,972 stars.
TL;DR: codegraph builds a pre-indexed knowledge graph of your codebase, syncs it on code changes, and sells itself on fewer tokens and fewer tool calls while staying local. It is written in C, MIT licensed, at 72,972 stars, and was created in January 2026.
The approach is indexing, not prompting
Most token-saving tools for coding agents work on the prompt side. You add instructions, the model writes fewer words, the bill drops. codegraph works on a different layer: it pre-computes a graph of the code and hands the agent a query interface over it.
The description names the payoff directly, twice: “fewer tokens, fewer tool calls.” Those are two different costs. Fewer tokens is budget. Fewer tool calls is latency and loop iterations, which matters more than most people expect because every tool round trip is a full model call on a fresh context.
The other phrase in the description is “pre-indexed.” The index exists before the agent asks, and the second half of the description says it auto syncs on code changes. An index that requires manual reindexing is unusable in a loop that edits files, so the sync behavior is what makes the approach viable rather than the indexing itself.
Nine harnesses in one description
This is the most crowded part of the repo’s self-description: Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, CoPilot, and Hermes Agent.
Listing nine targets is a compatibility claim you should test rather than accept. An agent harness differs in how it exposes tool calls, how it handles large outputs, and whether it tolerates a server that stays resident. A tool that works in one and is awkward in another usually fails at the output-shaping step.
The upside of the list is real: you are not committing to one vendor’s harness.
The numbers
| Field | Value |
|---|---|
| Language | C |
| License | MIT |
| Stars | 72,972 |
| Forks | 4,683 |
| Open issues | 508 |
| Created | 2026-01-18 |
| Last push | 2026-10-02 |
| Topics | none declared |
C is the detail that sets expectations. A knowledge graph index that has to be fast and that must be present on developer machines is a plausible fit for C, where you control allocation and startup cost. It also means no runtime dependency and no package manager in the loop, which for a tool that sits beside your editor is a reasonable trade.
Five hundred and eight open issues on a project that is eight months old is a lot of surface area. Some of that is a fast-moving tool with an enthusiastic user base, and some of it is the ratio you would expect from a project growing this quickly.
The empty topics field
The repository declares no topics at all. This is the field GitHub uses for discovery beyond the description, and leaving it empty means the project is invisible in topic listings and search facets. For a repository with 72,972 stars, that reads as an oversight rather than a position.
It also means the description is doing all the work. The nine-harness list, the token claim, and the local guarantee are compressed into one sentence, which is why the sentence reads the way it does.
Verify the facts yourself rather than trusting the badge:
gh api repos/colbymchenry/codegraph \
--jq '{stars: .stargazers_count, forks: .forks_count,
license: .license.spdx_id, topics: .topics, pushed: .pushed_at}'
What local actually buys you
The description says 100% local, and taken at face value that rules out the usual objections. Nothing about your source code leaves the machine, there is no hosted index to price or throttle, and the tool keeps working on a plane.
The trade is that you operate it. A local index is something that has to be installed per machine, kept in sync, and excluded from your repository if it lands in your working tree. A hosted service does that for you and sends your code somewhere else. Which one you want depends on whether your code can leave the machine, not on which tool is better.
When to skip it
Skip it if your repository is small enough to fit in context. A code graph earns its keep when the codebase is larger than what you can read, and a few hundred files are cheaper to just read. Adding an index layer to a small repository adds a moving part and saves nothing.
Skip it if you cannot commit to keeping the index current. The whole claim rests on the graph matching the code, and a stale index produces confidently wrong answers, which is worse than no index at all.
Source and Accuracy Notes
- Project page: https://github.com/colbymchenry/codegraph
- Source repository: colbymchenry/codegraph (verified via GitHub API
html_url) - License: MIT (verified via GitHub API
license.spdx_id) - Stars at time of writing: 72,972
- The token and tool-call savings, the 100% local claim, and the harness compatibility list are the project’s own description. None were independently benchmarked for this post.
Related Posts
ai-setup
Recall – Persistent Memory for Claude Code via MCP Hooks
Recall gives Claude Code a permanent memory store that survives session restarts and context compaction. Four hooks capture and restore context automatically — with cloud SaaS or self-hosted options.
2/28/2026
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026