Repolode
Jakedismo

Jakedismo/codegraph-rust

A Rust tool that builds a semantic knowledge graph of your codebase and exposes agentic code-analysis tools to coding agents through MCP.

Stars
913
Forks
98
Open issues
17
Last commit
26 days ago

What is it?

CodeGraph indexes a project into a knowledge graph of nodes and edges, combining AST parsing, optional language-server symbol resolution, module linking, and embeddings. The graph is stored in an embedded SurrealDB database inside each project's .codegraph directory, so no separate database server is needed.

It is designed for AI coding assistants such as Claude Code, Cursor, and Codex. Four consolidated agentic tools (context, impact, architecture, and quality) run a reasoning agent over the graph and return an answer with file paths, line numbers, and bounded snippets, rather than a raw list of search hits. Indexing runs in tiers (fast, balanced, full) so users can trade speed and storage against graph richness.

Search combines vector similarity with lexical matching and optional reranking. The project also limits how much tool output reaches the model per run, and it supports multiple embedding and LLM providers, including Ollama, LM Studio, Jina, OpenAI, and Anthropic.

Key features

  • 01Builds a knowledge graph of code nodes, edges, modules, and dataflow relationships.
  • 02Offers four agentic MCP tools for context, change impact, architecture, and quality analysis.
  • 03Supports fast, balanced, and full indexing tiers with optional LSP resolution.
  • 04Stores data in an embedded SurrealDB per project, with no separate server required.
  • 05Combines vector and lexical search with optional reranking.
  • 06Respects .gitignore and filters common secret file patterns during indexing.

Use cases

  • Giving Claude Code or Cursor project-wide context before refactoring a large codebase.
  • Estimating what breaks when a function, type, or module changes.
  • Getting an architecture overview or finding complexity hotspots in an unfamiliar Rust project.
  • Running local, self-hosted embedding models so source code stays on your machine.

Quick start

  1. 1

    Follow the Installation Guide (docs/INSTALLATION_GUIDE.md) to install CodeGraph

  2. 2

    Index your project with the balanced tier

    codegraph index /path/to/project --index-tier balanced
  3. 3

    Ask a question from the command line

    codegraph agent context "your question"

Things to know

  • The balanced and full indexing tiers require external language servers such as rust-analyzer, node, or gopls to be installed.
  • Indexing has many configuration options and environment variables, so setup takes some effort.

In collections

Topics

FAQ

What is codegraph-rust?
A Rust tool that builds a semantic knowledge graph of your codebase and exposes agentic code-analysis tools to coding agents through MCP. CodeGraph indexes a project into a knowledge graph of nodes and edges, combining AST parsing, optional language-server symbol resolution, module linking, and embeddings. The graph is stored in an embedded SurrealDB database inside each project's .codegraph directory, so no separate database server is needed.
Is codegraph-rust free to use? What license does it have?
codegraph-rust has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
Is codegraph-rust still maintained?
Actively maintained. The last commit to codegraph-rust was on Oct 12, 2026.
What can I use codegraph-rust for?
Giving Claude Code or Cursor project-wide context before refactoring a large codebase. Estimating what breaks when a function, type, or module changes. Getting an architecture overview or finding complexity hotspots in an unfamiliar Rust project. Running local, self-hosted embedding models so source code stays on your machine.
How do I install codegraph-rust?
Follow the Installation Guide (docs/INSTALLATION_GUIDE.md) to install CodeGraph Index your project with the balanced tier: codegraph index /path/to/project --index-tier balanced Ask a question from the command line: codegraph agent context "your question"
Where can I get codegraph-rust?
The source code and installation instructions are on GitHub: https://github.com/Jakedismo/codegraph-rust

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects