OpenSource-Hub

codegraph

CLI ツール

colbymchenry/codegraph

プリインデックスされたコード知識グラフでClaude Codeの効率性を向上させます。

概要

CodeGraph は、コード ライブラリの先行インデックス知識グラフを構築し、クロード コード エクスペリエンス エージェントがファイルをスキャンする必要がなく、シンボル関係を迅速にクエリできます。 19 以上の言語とフレームワークのルーティング認識をサポートし、完全にローカルで動作し、ツール呼び出しを 96% まで削減し、検索速度を 70% 以上向上させます。

README プレビュー

\n\n# CodeGraph\n\n### Supercharge Claude Code with Semantic Code Intelligence\n\n**94% fewer tool calls · 77% faster exploration · 100% local**\n\n[](https://www.npmjs.com/package/@colbymchenry/codegraph)\n[](https://opensource.org/licenses/MIT)\n[](https://nodejs.org/)\n\n[](#)\n[](#)\n[](#)\n\n\n\n### Get Started\n\n```bash\nnpx @colbymchenry/codegraph\n```\n\nInteractive installer configures Claude Code automatically\n\n#### Initialize Projects\n\n```bash\ncd your-project\ncodegraph init -i\n```\n\n\n\n\n\n---\n\n## Why CodeGraph?\n\nWhen Claude Code explores a codebase, it spawns **Explore agents** that scan files with grep, glob, and Read — consuming tokens on every tool call.\n\n**CodeGraph gives those agents a pre-indexed knowledge graph** — symbol relationships, call graphs, and code structure. Agents query the graph instantly instead of scanning files.\n\n### Benchmark Results\n\nTested across 6 real-world codebases comparing Claude Code's Explore agent **with** and **without** CodeGraph:\n\n> **Average: 92% fewer tool calls · 71% faster**\n\n| Codebase | With CG | Without CG | Improvement |\n|----------|---------|------------|-------------|\n| **VS Code** · TypeScript | 3 calls, 17s | 52 calls, 1m 37s | **94% fewer · 82% faster** |\n| **Excalidraw** · TypeScript | 3 calls, 29s | 47 calls, 1m 45s | **94% fewer · 72% faster** |\n| **Claude Code** · Python + Rust | 3 calls, 39s | 40 calls, 1m 8s | **93% fewer · 43% faster** |\n| **Claude Code** · Java | 1 call, 19s | 26 calls, 1m 22s | **96% fewer · 77% faster** |\n| **Alamofire** · Swift | 3 calls, 22s | 32 calls, 1m 39s | **91% fewer · 78% faster** |\n| **Swift Compiler** · Swift/C++ | 6 calls, 35s | 37 calls, 2m 8s | **84% fewer · 73% faster** |\n\n\nFull benchmark details\n\nAll tests used Claude Opus 4.6 (1M context) with Claude Code v2.1.91. Each test spawned a single Explore agent with the same question.\n\n**Queries used:**\n| Codebase | Query |\n|----------|-------|\n| VS Code | "How does the extens