Indexing and queries
Goes onlineNothing
The index is a SQLite database inside the project. Parsing, resolution and every query run locally.
CodeGraph parses a repository with tree-sitter into a local index of symbols, calls and imports, and answers structural questions from it, on the command line, for coding agents over MCP, and in a browser viewer. There is no model inside, so the same repository gives the same answer on every machine.


The browser viewer is a preview and is switched off unless you turn it on; everything else is part of the regular command set.
Ask a question or name a few symbols; get their source grouped by file, what depends on them, and the calls between them.
A symbol's source with what it calls and what calls it, or a file with line numbers and the files that depend on it.
One step either way, or everything a change reaches through callers of callers.
From a list of changed files, the files that depend on them and the tests among them.
Read-only tools over standard input and output, written into each installed agent's config by one command.
The same tools over streamable HTTP on the local machine, for editors and remote development.
Instructions that tell an agent which tool to use when, installed into each agent's skill directory.
One background process per project, shared by every client, re-indexes the files you change.
Re-reads only what changed and ends up identical to a full rebuild.
Symbols, files, call paths, a module map, type hierarchies and unreached code, in light and dark.
TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, C#, PHP, Ruby, Swift, Kotlin and more.
Vue, Svelte, Astro, Razor and Liquid files, and MyBatis mapper XML.
Scenes, resources, scripts, autoloads and signal handlers, with a resource audit.
curl -fsSL https://raw.githubusercontent.com/sunerpy/codegraph-rust/main/scripts/install.sh | sh
Or the PowerShell script on Windows, or an archive from the releases page.
codegraph init .
Builds the index in the project's .codegraph directory. Later updates read only what changed.
codegraph explore "how does checkout compute the total" -p .
Returns the relevant source, what depends on it and the calls between it.
codegraph install --yes
Adds the MCP server to the config of every agent it finds.
An agent with CodeGraph asks one structural question instead of searching and reading files one at a time, and gets back the relevant source together with the calls between it. Answers come from the parsed code, so they are the same on every run.
codegraph install --yes writes the MCP server into the config of Claude Code, Cursor, Codex CLI, Kiro, Zed, VS Code and the other agents it supports.
| Question | Command line | MCP tool |
|---|---|---|
| How does this area work? | codegraph explore | codegraph_explore |
| Show me this symbol or file | codegraph node | codegraph_node |
| Where is it defined? | codegraph search | codegraph_search |
| Who calls it? | codegraph callers | codegraph_callers |
| What does changing it reach? | codegraph impact | codegraph_impact |
Both sides run the same engine, so an agent and you get the same answer. Every tool is read-only.
The viewer reads the same index: a symbol with its callers and callees, the call path from one function to another, the repository as a map of modules, the hierarchy of a type, and the code nothing reaches. It runs on your computer and only reads.


Most languages get full symbol extraction. Components and templates get their embedded scripts and markup, and a few formats are tracked at file level. The table says which is which, rather than one number for all of them.
| Depth | What is extracted | Languages |
|---|---|---|
| Full symbols | Functions, classes, methods, imports, calls and references | TypeScript, TSX, JavaScript, JSX, ArkTS, Python, Go, Rust, Java, C, C++, C#, PHP, Ruby, Swift, Kotlin, Dart, Scala, Lua, Luau, Objective-C, R, Solidity, Nix, Terraform, Erlang, GDScript, Pascal, CFML |
| Embedded | The scripts and template markup inside a host file | Vue, Svelte, Astro, Razor, Liquid, MyBatis XML |
| File level | Files and the references between them | YAML, Twig, Properties, and Godot scene, resource and project files |
A file in a language outside this table is not in the graph. Extensions can be mapped onto these languages in .codegraph/codegraph.json.
Every release has an archive for each platform, a SHA256SUMS file and a build attestation per archive.
| Platform | Target | Archive |
|---|---|---|
| Linux x86_64Available | x86_64-unknown-linux-musl | .tar.gz |
| Linux ARM64Available | aarch64-unknown-linux-musl | .tar.gz |
| macOS IntelAvailable | x86_64-apple-darwin | .tar.gz |
| macOS Apple SiliconAvailable | aarch64-apple-darwin | .tar.gz |
| Windows x86_64Available | x86_64-pc-windows-msvc | .zip |
| Windows ARM64Available | aarch64-pc-windows-msvc | .zip |
The Linux builds are statically linked and need no system library. Building from source needs a Rust toolchain and a C compiler.
CodeGraph depends on no hosted service.
Goes onlineNothing
The index is a SQLite database inside the project. Parsing, resolution and every query run locally.
Goes onlineNothing
The MCP server talks to the program that started it; the HTTP server and the viewer listen on the local machine.
Goes onlineDownloads from GitHub
The install scripts and codegraph self-update fetch releases from GitHub Releases.
curl -fsSL https://raw.githubusercontent.com/sunerpy/codegraph-rust/main/scripts/install.sh | shirm https://raw.githubusercontent.com/sunerpy/codegraph-rust/main/scripts/install.ps1 | iexcargo install --locked --git https://github.com/sunerpy/codegraph-rust codegraph-rsThe scripts check every archive against the release's SHA256SUMS before installing it. The install guide covers pinning a version, updating and removing CodeGraph.
Bug reports and feature requests go to GitHub Issues. Scan the code with WeChat to follow the Official Account 六月水蓝. CodeGraph is MIT-licensed.
