OpenSource-Hub
C

codegraph

SHA-256
50.2k stars·Developer Tools·SHA-256 checksum verified

Pre-indexed code knowledge graph for AI coding agents – cuts token usage by 47%, tool calls by 58%, and auto-syncs on file changes. 100% local.

Smart Download

Download Download Version

v1.0.1 · 50.2 MB

A pre-indexed code knowledge graph that slash AI coding agent costs by 16% and tool calls by 58%.

Core Features

  • Auto-builds knowledge graph (symbols, call relationships, module dependencies)
  • Real-time auto-sync on file changes – never stale
  • MCP server integration with 8+ AI agents (Claude Code, Cursor, Codex, Gemini, etc.)
  • One-command install, no Node.js required (self-contained runtime)
  • 100% local, no data leaves your machine

What It Can't Do

  • After installing the CLI, you must open a new terminal for the 'codegraph' command to be available (PATH update)
  • 'codegraph install' is a separate mandatory step to wire the MCP server to your agents; just installing the CLI does not enable the graph
  • Uninstall does not remove project indexes; manually delete .codegraph/ if you want full removal
  • Currently no remote sync or cloud support – the graph stays entirely local

Use Cases

  • Reduce token costs and latency when using AI coding assistants (e.g., Claude Code) on large codebases during refactoring or understanding
  • Automatically maintain code knowledge graph in CI, aiding PR reviews and impact analysis

Detailed Introduction

CodeGraph is a local-first code knowledge graph that supercharges AI-powered coding agents like Claude Code, Cursor, Codex, Gemini CLI, and more. Instead of agents wasting tokens on grep/glob/read tool calls to understand your codebase, CodeGraph builds a pre-indexed graph of symbol relationships, call hierarchies, and module dependencies – and keeps it auto-synced as you edit files. Benchmarked on 7 real-world repos (VS Code, Django, Tokio, Alamofire, etc.), it delivers on average 16% cost reduction, 47% fewer tokens, 22% faster responses, and 58% fewer tool calls. Unlike generic code search tools (e.g., ripgrep, Sourcegraph), CodeGraph integrates directly as an MCP server, requires zero configuration per agent, and works fully offline. Ideal for developers who want to slash AI coding costs while maintaining deep code understanding.

Tags

code-intelligenceknowledge-graphai-coding-assistantmcp-serverdeveloper-tools

Getting Started

1

Download installer

Click the button above to download the installer for your system

2

Install the software

Double-click the downloaded installer and follow the prompts

3

Open a terminal and run the one-liner install command for your OS (macOS/Linux or Windows)

4

In a new terminal, run 'codegraph install' to auto-connect CodeGraph to your installed AI agents

5

Navigate to your project directory and run 'codegraph init' to build the code graph (one-time)

Install Guide
  1. Open a terminal and run the one-liner install command for your OS (macOS/Linux or Windows)
  2. In a new terminal, run 'codegraph install' to auto-connect CodeGraph to your installed AI agents
  3. Navigate to your project directory and run 'codegraph init' to build the code graph (one-time)
File Integrity

SHA-256 checksum verified

Checksum extracted from GitHub official Release page

SHA256 Checksum

d45a068f44596a85c7ba7d0ef924eaf7103fbbf3cafbeb668127daff60a52228

This checksum is extracted from the GitHub Release page. Verify file integrity after download.

All SHA-256 checksums on this platform are extracted from the project's official GitHub Release page, without any modification. You can independently verify them on the GitHub Releases page.

Open Source Transparency

View GitHub Source
Environment Guide

Uninstall Info

Run 'codegraph uninstall' to remove CodeGraph from all configured AI agents. Project index files (.codegraph/ directory) are left untouched; for complete cleanup, run 'codegraph uninit' per project or delete the directory manually.

No Extra Dependencies

Ready to use after download. No additional runtime required.

Project Info
LicenseMIT
Last Updated2026-06-16T15:14:27Z
GitHub RepositoryOfficial Website

Similar Projects