Code Graph

•
2
•

Extracts detailed dependency graphs from multi-language codebases and stores them locally for querying, analysis, and LLM integration.

Code Graph is a local-first CLI tool built in Rust that constructs comprehensive Knowledge Graphs from your source code. It parses multiple languages (Python, Rust, JS/TS, Go, Java, C/C++) to identify dependencies like imports, function calls, and class inheritance, storing this information efficiently in an SQLite database. Designed with GraphRAG principles, it facilitates injecting structured code context into LLM prompts, enhancing AI-powered code analysis. It offers flexible access via a powerful CLI, a REST API for custom integrations, and an MCP server for seamless integration with AI clients like Claude and Cursor.

主な機能

010 GitHub stars
02Multi-language support (Python, Rust, JavaScript/TypeScript, Go, C/C++)
03Extracts dependency graphs (imports, calls, inheritance)
04Local-first storage with SQLite and incremental updates
05Integrates with LLMs for context-aware code analysis
06Provides CLI, REST API, and MCP Server access methods

ユースケース

01Generate LLM analysis of specific functions or code segments with relevant context
02Discover functions or classes by name across a codebase
03Integrate code context and dependency information into AI IDEs and clients