colbymchenry/codegraph
Pre-indexed code knowledge graph, auto syncs on code changes, for Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, CoPilot, and Hermes Agent — fewer tokens, fewer tool calls, 100% local
C · ★ 73,075 · Fork 4,688 · 在 GitHub 查看
在手机上浏览源码、订阅每日 AI 趋势日报与项目架构深度解读:获取 CopoHub 客户端(iOS & HarmonyOS)→
GitHub Trending 上榜记录
colbymchenry/codegraph 已在 GitHub Trending 每日榜单上榜 15 天,最高排名第 1,首次上榜 2026-05-16,最近一次上榜 2026-10-03。
| 日期 | 排名 | Star | 当日增长 |
|---|---|---|---|
| 2026-10-03 | #13 | 73,075 | +98 |
| 2026-10-02 | #13 | 72,923 | +241 |
| 2026-10-01 | #14 | 72,711 | +118 |
| 2026-09-30 | #14 | 72,569 | +159 |
| 2026-05-26 | #6 | 26,630 | +3,161 |
| 2026-05-25 | #6 | 24,760 | +3,171 |
| 2026-05-24 | #3 | 21,786 | +2,993 |
| 2026-05-23 | #2 | 19,240 | +3,684 |
| 2026-05-22 | #2 | 16,370 | +4,294 |
| 2026-05-21 | #1 | 13,172 | +4,222 |
| 2026-05-20 | #1 | 9,251 | +1,910 |
| 2026-05-19 | #10 | 6,459 | +1,869 |
| 2026-05-18 | #17 | 3,836 | +857 |
| 2026-05-17 | #8 | 3,233 | +860 |
| 2026-05-16 | #8 | 2,446 | +397 |
同期上榜的项目
- DietrichGebert/ponytail – Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
- pbakaus/impeccable – The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.
- affaan-m/ECC – The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
- Effect-TS/effect – Build production-ready applications in TypeScript
- JuliusBrussee/caveman – why use many token when few token do trick. Skill + local proxy for coding agents: shorter answers, smaller tool output, every original recoverable.
- Panniantong/Agent-Reach – Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
CodeGraph 项目深度剖析与商业评估报告
CodeGraph 项目深度剖析与商业评估报告
1. 核心定位与商业落地价值
根本痛点解决 CodeGraph 精准切中了当前 AI 辅助编码工具(特别是 Claude Code)在大型代码库探索中的核心效率瓶颈:工具调用爆炸与上下文窗口污染。传统模式下,AI Agent 通过 grep、glob、Read 等工具逐文件扫描,导致: 大量 token 消耗在文件发现而非语义理解上 工具调用次数随代码库规模线性增长(VS Code 案例中从 3 次飙升至 52 次) 文件读取的 I/O 延迟累积(Swift Compiler 案例中从 35s 增至 2m 8s)
企业级商业落地场景 1. 大型遗留系统现代化改造:企业维护百万行级别的 monorepo 时,CodeGraph 的预索引知识图使 AI Agent 能快速理解跨模块调用链,降低新成员 onboarding 成本 70%+ 2. CI/CD 智能测试选择:codegraph affected 命令通过依赖图追溯变更影响范围,可直接集成到 Git hooks 中实现精准测试用例选择,减少 80%+ 的无效测试执行 3. 安全审计与合规检查:框架感知的路由分析能力可自动构建攻击面地图,配合 codegraphimpact 实现变更前的安全影响评估 4. 跨语言微服务治理:支持 19+ 语言的跨语言调用链追踪,在异构微服务架构中提供统一的依赖视图
竞品差异化与护城河 vs. Sourcegraph:CodeGraph 完全本地化,无数据外泄风险,适合金融、医疗等强合规行业;Sourcegraph 的代码导航依赖云端索引,延迟更高 vs. 传统 LSP:LSP 提供单文件级别的符号跳转,而 CodeGraph 构建的是跨文件的语义关系图(调用链、继承树、路由绑定),支持图遍历查询 vs. 通用向量数据库:CodeGraph 使用结构化图数据库(SQLite + FTS5)而非向量嵌入,避免了 embedding 的精度损失和计算成本,查询结果确定性 100%
2. 核心架构设计与技术深度
模块拆解思想 ┌─────────────────────────────────────────────────────┐ │ CLI Layer │ │ init/index/sync/query/affected/serve --mcp │ ├─────────────────────────────────────────────────────┤ │ MCP Server │ │ 8 个 MCP 工具:search/context/callers/callees/... │ ├─────────────────────────────────────────────────────┤ │ Core Engine │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ Parser │ │ Resolver │ │ Builder │ │ │ │ (tree- │ │ (ref │ │ (context │ │ │ │ sitter) │ │ graph) │ │ builder)│ │ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ │ │ │ │ │ │ ┌────▼────────────▼────────────▼─────┐ │ │ │ Storage Layer │ │ │ │ SQLite (native/WASM fallback) │ │ │ │ FTS5 full-text index │ │ │ └────────────────────────────────────┘ │ ├─────────────────────────────────────────────────────┤ │ File Watcher │ │ FSEvents / inotify / ReadDirectoryChangesW │ │ + 2s debounce + incremental sync │ └─────────────────────────────────────────────────────┘
关键设计模式 1. Plugin-based Parser Architecture:每个语言对应独立的 tree-sitter 查询文件,通过统一的 Node/Edge 接口抽象,新增语言只需提供 grammar 和 query 文件 2. Incremental Graph Update:文件变更时仅重新解析变更文件,通过引用图增量更新,避免全量重建(O(n) → O(Δ)) 3. MCP Tool as Facade:8 个 MCP 工具对 Core Engine 的复杂查询进行封装,提供简洁的语义接口给 Claude Code Agent
在 README 中展示上榜徽章
[](https://github.fq6825.top/repo/colbymchenry/codegraph)