CodeGraph 31K⭐ — The AI Coding Assistant That Cuts Your Token Costs by Half
TL;DR: CodeGraph pre-indexes your codebase into a knowledge graph, so your AI coding agent gets exactly what it needs in one tool call instead of scanning 100 files. Average result: 52% cost reduction, 78% fewer tokens, 46% faster.
The Problem
You're using Claude Code, Cursor, or Codex CLI. You ask it to fix a bug.
What happens next:
- Agent reads the directory structure (1 call)
- Agent opens your main file (1 call)
- Agent reads imports, follows dependencies (5-10 calls)
- Agent opens related files one by one (15-30 calls)
- Only then does it understand the context enough to write code
That's 20-50 tool calls per task. On a 10,000-file codebase like VS Code, this is painfully slow and expensive.
That's where CodeGraph steps in.
What CodeGraph Does
Before your agent starts, CodeGraph pre-indexes your entire codebase into a SQLite-backed knowledge graph.
When the agent asks "what's related to this function?", CodeGraph returns:
- The entry point and all exported symbols
- Related code snippets
- Caller/caller relationships (influence analysis)
All in one single tool call. Not 20. Not 50. One.
The Numbers (Real Benchmarks)
| Codebase | Files | Cost Saved | Token Saved | Speed |
|---|---|---|---|---|
| VS Code | 10,000 | 26% | 78% | 52% faster |
| Excalidraw | 640 | 52% | 90% | 73% faster |
| Alamofire | 110 | 47% | 89% | 65% faster |
Quick Start
# Install
npm install -g @colbymchenry/codegraph
# Init in your project folder
cd your-project
codegraph init -i
# Your AI agent now uses it automatically
Why I Like This Project
- 🎯 Does one thing (knowledge graph indexing)
- ✅ Does it well (proven 52-78% cost reduction)
- 🔌 Composable (works with any MCP-compatible agent)
- U0001fab6 Lightweight (SQLite, runs in background)
Final Thought
If you're using any AI coding agent on a codebase larger than 100 files, try CodeGraph. The ROI is instant — reduce token costs by 50%+ starting from your first task.
Top comments (0)