OpenSource-Hub

codegraph

CLI 도구

colbymchenry/codegraph

사전 인덱싱된 코드 지식 그래프로 Claude Code 효율성을 향상시킵니다.

개요

CodeGraph는 코드베이스에 사전 인덱싱된 지식 그래프를 구축하여 Claude Code의 탐색 에이전트가 파일을 스캔하지 않고도 기호 관계를 빠르게 조회할 수 있도록 합니다. 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

FAQ (4)

feature_inquiry
Codegraph가 코드 변경 후 자동으로 동기화되나요?

네, Codegraph는 MCP 서버가 실행 중일 때 버전 0.9.4부터 모든 파일 변경 시 자동으로 동기화됩니다. 내장된 FileWatcher를 사용하여 약 3초 이내에 심볼과 엣지를 증분 재인덱싱하며, 수동으로 codegraph sync 또는 codegraph index 명령을 실행할 필요가 없습니다. 이전 버전에서는 코드 변경 후 수동으로 codegraph index를 실행하여 업데이트해야 했습니다.

원본 Issue #393
문제 해결
코드그래프가 배럴 재내보내기를 통해 가져온 컴포넌트에 대해 호출자 0명을 표시하는 이유는 무엇인가요?

이것은 codegraph v0.9.8 및 이전 버전에서 특정 배럴 형식이 해결되지 않아 라이브 컴포넌트에 대해 누락된 엣지와 잘못된 0 callers/impact를 초래하는 알려진 버그입니다. 영향을 받는 형식: export { default as X } from './X.svelte', 베어 import from './' 또는 from '.', 그리고 워크스페이스 패키지-서브패스 임포트(@scope/pkg/sub). 수정(PRs #657, #659)은 이미 병합되었으며 v0.9.8 이후 다음 릴리스에 포함됩니다. 해결하려면 최신 버전(v0.9.9+)으로 업그레이드하세요. 임시 확인 방법으로 codegraph callees <file>를 사용하여 임포트가 원시/미해결 노드로 나타나는지 확인하세요.

원본 Issue #629
문제 해결
Windows에서 codegraph daemon을 시작하거나 브랜치를 전환할 때 콘솔 창이 깜빡이는 이유는 무엇인가요?

코드그래프 v0.9.7 이상으로 업그레이드하세요. v0.9.6의 이 버그로 인해 git.exe 스폰(예: git ls-files, git rev-parse)이 windowsHide: true 없이 실행되어 cmd 창이 보였습니다. v0.9.7의 수정에서는 모든 git/npm 자식 프로세스에 windowsHide를 추가하여 깜빡임을 제거했습니다.

원본 Issue #612
방법
기본 CodeGraph 인덱스 디렉토리를 .codegraph에서 사용자 지정 경로로 변경하는 방법은?

CodeGraph를 실행할 때 --data-dir 플래그를 사용하여 사용자 정의 인덱스 디렉터리를 지정하세요. 예: codegraph --data-dir /path/to/custom/dir. 이 기능은 PR #568을 통해 추가되고 있습니다.

원본 Issue #672