CodeGraph: Supercharge AI Coding Agents with Semantic Code Intelligence
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
CodeGraph is a powerful, pre-indexed code knowledge graph designed to enhance AI coding agents like Claude Code, Cursor, and Codex. It significantly reduces token usage and tool calls, offering a faster and more cost-effective way for agents to understand codebases. This 100% local solution provides semantic code intelligence, improving agent efficiency and accuracy.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
CodeGraph is a powerful, pre-indexed code knowledge graph designed to supercharge AI coding agents such as Claude Code, Cursor, Codex, OpenCode, and Hermes Agent. By providing semantic code intelligence, CodeGraph allows these agents to understand codebases more efficiently, leading to significantly fewer tokens consumed and fewer tool calls. This 100% local solution processes symbol relationships, call graphs, and code structure, enabling agents to query an instant knowledge graph rather than scanning files.
Installation
Getting started with CodeGraph is straightforward, with no Node.js required for the bundled runtime.
For macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
For Windows (PowerShell):
irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex
If you already have Node.js, you can use npm:
npx @colbymchenry/codegraph # zero-install
# or
npm i -g @colbymchenry/codegraph
After installation, initialize your project:
cd your-project
codegraph init -i
This command builds the per-project knowledge graph index and configures any project-local agent surfaces.
Examples
CodeGraph provides a rich command-line interface for interacting with your codebase's knowledge graph.
Initialize a project:
codegraph init -i
Search for symbols by name:
codegraph query UserService --kind class --json
Build context for AI agents based on a task:
codegraph context "fix login bug" --format markdown --max-nodes 20
Find test files affected by changes:
git diff --name-only | codegraph affected --stdin --quiet
Why Use CodeGraph
CodeGraph dramatically improves the efficiency and cost-effectiveness of AI coding agents. When an agent like Claude Code explores a codebase, it typically spawns "Explore agents" that scan files, consuming tokens with every tool call. CodeGraph replaces this with a pre-indexed knowledge graph, allowing agents to query instantly.
Key Benefits from Benchmarks:
Across 7 real-world open-source codebases, CodeGraph delivered an average of:
- 35% cheaper
- 57% fewer tokens
- 46% faster
- 71% fewer tool calls
Key Features:
- Smart Context Building: Returns entry points, related symbols, and code snippets in one tool call, eliminating expensive exploration.
- Full-Text Search: Instantly find code by name across your entire codebase.
- Impact Analysis: Trace callers, callees, and the full impact radius of any symbol before making changes.
- Always Fresh: Uses native OS file events for debounced auto-sync, keeping the graph current as you code with zero configuration.
- 19+ Languages: Supports a wide array of languages including TypeScript, Python, Go, Rust, Java, C#, and many more.
- Framework-aware Routes: Recognizes web-framework routing files and links URL patterns to their handlers across 14 frameworks.
- 100% Local: No data leaves your machine, no API keys, no external services, relying solely on a local SQLite database.
Links
Related repositories
Similar repositories that may be relevant next.

SandBase CLI: Connect Your AI Agent to 2,000+ Models and APIs
September 4, 2026
SandBase CLI is an open-source command-line interface and local MCP server that supercharges AI agents. It connects 25 popular AI clients, such as Claude Code, Cursor, and ChatGPT, to over 2,000 AI models and APIs, simplifying complex integrations. This powerful tool streamlines AI agent development by offering a unified gateway, removing the hassle of API key management and configuration.

Tessera: A Comprehensive Workspace for AI Coding Sessions and Agent Orchestration
September 4, 2026
Tessera is a powerful workspace for organizing AI coding sessions, acting as a local control room for agents like Claude Code, Codex, and OpenCode. It enables parallel sessions, isolated Git worktrees, and Kanban boards, streamlining complex AI development workflows. Developers can manage agents, track tasks, and complete Git operations all within one integrated environment.

OGAD: Private, On-Device AI with an OpenAI-Compatible Local Gateway
September 4, 2026
OGAD (Off Grid AI Desktop) is an open-source, AGPL-licensed application for private, on-device AI. It enables users to run various open models, including text, vision, image, and voice, entirely locally through a single OpenAI-compatible gateway. This ensures complete data privacy with no cloud dependencies, accounts, or API keys.

Magic Context: Unbounded, Self-Managing Memory for AI Coding Agents
September 2, 2026
Magic Context is a powerful GitHub repository that provides unbounded, self-managing memory for AI coding agents. Acting as the 'hippocampus' for agents, it ensures continuous learning and recall across sessions without disruptive context compaction. This tool, part of CortexKit, allows agents to build lasting project knowledge and maintain context efficiently.
Source repository
Open the original repository on GitHub.
19 counted GitHub visits