codegraph

Active
GitHub TypeScript MIT

Description

CodeGraph is a context graph for coding agents, mapping how a codebase is wired together so LLM-driven tools can navigate dependencies and produce more accurate edits.

Key Features

  • Pre-indexed code knowledge graph that auto-syncs code changes with millisecond queries
  • Compatible with multiple coding agents including Claude Code, Codex, Cursor, and AntiGravity
  • Runs 100% locally with indexes and queries kept on your machine
  • Dramatically reduces token consumption by giving LLMs precise context
  • Multi-language support covering AST parsing and dependency graph construction for major languages

Use Cases

πŸ’‘ Provide a RAG alternative for large codebases so LLMs no longer read everything
πŸ’‘ Inject precise project structure context when launching Claude Code or Codex
πŸ’‘ Speed up onboarding with second-level answers about modules and dependencies
πŸ’‘ Expose the code graph as an MCP server so any agent can query it

Quick Start

# Install the CodeGraph indexer
npm install -g @codegraph/cli

# Initialize index in project root
codegraph init

# Start MCP server for agent queries
codegraph serve --mcp

# Use it in Claude Code
> Find all callers of the user module

Related Projects