homegraph 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +709 -0
  3. package/dist/bin/codegraph.d.ts +26 -0
  4. package/dist/bin/codegraph.d.ts.map +1 -0
  5. package/dist/bin/codegraph.js +1572 -0
  6. package/dist/bin/codegraph.js.map +1 -0
  7. package/dist/bin/homegraph.d.ts +26 -0
  8. package/dist/bin/homegraph.d.ts.map +1 -0
  9. package/dist/bin/homegraph.js +1572 -0
  10. package/dist/bin/homegraph.js.map +1 -0
  11. package/dist/bin/node-version-check.d.ts +37 -0
  12. package/dist/bin/node-version-check.d.ts.map +1 -0
  13. package/dist/bin/node-version-check.js +79 -0
  14. package/dist/bin/node-version-check.js.map +1 -0
  15. package/dist/bin/uninstall.d.ts +14 -0
  16. package/dist/bin/uninstall.d.ts.map +1 -0
  17. package/dist/bin/uninstall.js +36 -0
  18. package/dist/bin/uninstall.js.map +1 -0
  19. package/dist/context/formatter.d.ts +30 -0
  20. package/dist/context/formatter.d.ts.map +1 -0
  21. package/dist/context/formatter.js +263 -0
  22. package/dist/context/formatter.js.map +1 -0
  23. package/dist/context/index.d.ts +119 -0
  24. package/dist/context/index.d.ts.map +1 -0
  25. package/dist/context/index.js +1289 -0
  26. package/dist/context/index.js.map +1 -0
  27. package/dist/context/markers.d.ts +19 -0
  28. package/dist/context/markers.d.ts.map +1 -0
  29. package/dist/context/markers.js +22 -0
  30. package/dist/context/markers.js.map +1 -0
  31. package/dist/db/index.d.ts +101 -0
  32. package/dist/db/index.d.ts.map +1 -0
  33. package/dist/db/index.js +250 -0
  34. package/dist/db/index.js.map +1 -0
  35. package/dist/db/migrations.d.ts +44 -0
  36. package/dist/db/migrations.d.ts.map +1 -0
  37. package/dist/db/migrations.js +131 -0
  38. package/dist/db/migrations.js.map +1 -0
  39. package/dist/db/queries.d.ts +386 -0
  40. package/dist/db/queries.d.ts.map +1 -0
  41. package/dist/db/queries.js +1562 -0
  42. package/dist/db/queries.js.map +1 -0
  43. package/dist/db/schema.sql +151 -0
  44. package/dist/db/sqlite-adapter.d.ts +53 -0
  45. package/dist/db/sqlite-adapter.d.ts.map +1 -0
  46. package/dist/db/sqlite-adapter.js +117 -0
  47. package/dist/db/sqlite-adapter.js.map +1 -0
  48. package/dist/directory.d.ts +57 -0
  49. package/dist/directory.d.ts.map +1 -0
  50. package/dist/directory.js +253 -0
  51. package/dist/directory.js.map +1 -0
  52. package/dist/errors.d.ts +136 -0
  53. package/dist/errors.d.ts.map +1 -0
  54. package/dist/errors.js +219 -0
  55. package/dist/errors.js.map +1 -0
  56. package/dist/extraction/arkanalyzer-extractor.d.ts +6 -0
  57. package/dist/extraction/arkanalyzer-extractor.d.ts.map +1 -0
  58. package/dist/extraction/arkanalyzer-extractor.js +11 -0
  59. package/dist/extraction/arkanalyzer-extractor.js.map +1 -0
  60. package/dist/extraction/arkanalyzer-project.d.ts +20 -0
  61. package/dist/extraction/arkanalyzer-project.d.ts.map +1 -0
  62. package/dist/extraction/arkanalyzer-project.js +596 -0
  63. package/dist/extraction/arkanalyzer-project.js.map +1 -0
  64. package/dist/extraction/context.d.ts +12 -0
  65. package/dist/extraction/context.d.ts.map +1 -0
  66. package/dist/extraction/context.js +29 -0
  67. package/dist/extraction/context.js.map +1 -0
  68. package/dist/extraction/dfm-extractor.d.ts +31 -0
  69. package/dist/extraction/dfm-extractor.d.ts.map +1 -0
  70. package/dist/extraction/dfm-extractor.js +151 -0
  71. package/dist/extraction/dfm-extractor.js.map +1 -0
  72. package/dist/extraction/extraction-version.d.ts +25 -0
  73. package/dist/extraction/extraction-version.d.ts.map +1 -0
  74. package/dist/extraction/extraction-version.js +28 -0
  75. package/dist/extraction/extraction-version.js.map +1 -0
  76. package/dist/extraction/generated-detection.d.ts +30 -0
  77. package/dist/extraction/generated-detection.d.ts.map +1 -0
  78. package/dist/extraction/generated-detection.js +80 -0
  79. package/dist/extraction/generated-detection.js.map +1 -0
  80. package/dist/extraction/grammars.d.ts +108 -0
  81. package/dist/extraction/grammars.d.ts.map +1 -0
  82. package/dist/extraction/grammars.js +465 -0
  83. package/dist/extraction/grammars.js.map +1 -0
  84. package/dist/extraction/index.d.ts +138 -0
  85. package/dist/extraction/index.d.ts.map +1 -0
  86. package/dist/extraction/index.js +1396 -0
  87. package/dist/extraction/index.js.map +1 -0
  88. package/dist/extraction/languages/arkts.d.ts +18 -0
  89. package/dist/extraction/languages/arkts.d.ts.map +1 -0
  90. package/dist/extraction/languages/arkts.js +878 -0
  91. package/dist/extraction/languages/arkts.js.map +1 -0
  92. package/dist/extraction/languages/c-cpp.d.ts +4 -0
  93. package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
  94. package/dist/extraction/languages/c-cpp.js +173 -0
  95. package/dist/extraction/languages/c-cpp.js.map +1 -0
  96. package/dist/extraction/languages/csharp.d.ts +25 -0
  97. package/dist/extraction/languages/csharp.d.ts.map +1 -0
  98. package/dist/extraction/languages/csharp.js +120 -0
  99. package/dist/extraction/languages/csharp.js.map +1 -0
  100. package/dist/extraction/languages/dart.d.ts +3 -0
  101. package/dist/extraction/languages/dart.d.ts.map +1 -0
  102. package/dist/extraction/languages/dart.js +192 -0
  103. package/dist/extraction/languages/dart.js.map +1 -0
  104. package/dist/extraction/languages/go.d.ts +3 -0
  105. package/dist/extraction/languages/go.d.ts.map +1 -0
  106. package/dist/extraction/languages/go.js +74 -0
  107. package/dist/extraction/languages/go.js.map +1 -0
  108. package/dist/extraction/languages/index.d.ts +10 -0
  109. package/dist/extraction/languages/index.d.ts.map +1 -0
  110. package/dist/extraction/languages/index.js +51 -0
  111. package/dist/extraction/languages/index.js.map +1 -0
  112. package/dist/extraction/languages/java.d.ts +3 -0
  113. package/dist/extraction/languages/java.d.ts.map +1 -0
  114. package/dist/extraction/languages/java.js +74 -0
  115. package/dist/extraction/languages/java.js.map +1 -0
  116. package/dist/extraction/languages/javascript.d.ts +3 -0
  117. package/dist/extraction/languages/javascript.d.ts.map +1 -0
  118. package/dist/extraction/languages/javascript.js +90 -0
  119. package/dist/extraction/languages/javascript.js.map +1 -0
  120. package/dist/extraction/languages/kotlin.d.ts +3 -0
  121. package/dist/extraction/languages/kotlin.d.ts.map +1 -0
  122. package/dist/extraction/languages/kotlin.js +285 -0
  123. package/dist/extraction/languages/kotlin.js.map +1 -0
  124. package/dist/extraction/languages/lua.d.ts +3 -0
  125. package/dist/extraction/languages/lua.d.ts.map +1 -0
  126. package/dist/extraction/languages/lua.js +150 -0
  127. package/dist/extraction/languages/lua.js.map +1 -0
  128. package/dist/extraction/languages/luau.d.ts +3 -0
  129. package/dist/extraction/languages/luau.d.ts.map +1 -0
  130. package/dist/extraction/languages/luau.js +37 -0
  131. package/dist/extraction/languages/luau.js.map +1 -0
  132. package/dist/extraction/languages/objc.d.ts +3 -0
  133. package/dist/extraction/languages/objc.d.ts.map +1 -0
  134. package/dist/extraction/languages/objc.js +133 -0
  135. package/dist/extraction/languages/objc.js.map +1 -0
  136. package/dist/extraction/languages/pascal.d.ts +3 -0
  137. package/dist/extraction/languages/pascal.d.ts.map +1 -0
  138. package/dist/extraction/languages/pascal.js +66 -0
  139. package/dist/extraction/languages/pascal.js.map +1 -0
  140. package/dist/extraction/languages/php.d.ts +3 -0
  141. package/dist/extraction/languages/php.d.ts.map +1 -0
  142. package/dist/extraction/languages/php.js +120 -0
  143. package/dist/extraction/languages/php.js.map +1 -0
  144. package/dist/extraction/languages/python.d.ts +3 -0
  145. package/dist/extraction/languages/python.d.ts.map +1 -0
  146. package/dist/extraction/languages/python.js +56 -0
  147. package/dist/extraction/languages/python.js.map +1 -0
  148. package/dist/extraction/languages/ruby.d.ts +3 -0
  149. package/dist/extraction/languages/ruby.d.ts.map +1 -0
  150. package/dist/extraction/languages/ruby.js +149 -0
  151. package/dist/extraction/languages/ruby.js.map +1 -0
  152. package/dist/extraction/languages/rust.d.ts +3 -0
  153. package/dist/extraction/languages/rust.d.ts.map +1 -0
  154. package/dist/extraction/languages/rust.js +113 -0
  155. package/dist/extraction/languages/rust.js.map +1 -0
  156. package/dist/extraction/languages/scala.d.ts +3 -0
  157. package/dist/extraction/languages/scala.d.ts.map +1 -0
  158. package/dist/extraction/languages/scala.js +174 -0
  159. package/dist/extraction/languages/scala.js.map +1 -0
  160. package/dist/extraction/languages/swift.d.ts +3 -0
  161. package/dist/extraction/languages/swift.d.ts.map +1 -0
  162. package/dist/extraction/languages/swift.js +91 -0
  163. package/dist/extraction/languages/swift.js.map +1 -0
  164. package/dist/extraction/languages/typescript.d.ts +3 -0
  165. package/dist/extraction/languages/typescript.d.ts.map +1 -0
  166. package/dist/extraction/languages/typescript.js +129 -0
  167. package/dist/extraction/languages/typescript.js.map +1 -0
  168. package/dist/extraction/liquid-extractor.d.ts +59 -0
  169. package/dist/extraction/liquid-extractor.d.ts.map +1 -0
  170. package/dist/extraction/liquid-extractor.js +354 -0
  171. package/dist/extraction/liquid-extractor.js.map +1 -0
  172. package/dist/extraction/mybatis-extractor.d.ts +48 -0
  173. package/dist/extraction/mybatis-extractor.d.ts.map +1 -0
  174. package/dist/extraction/mybatis-extractor.js +198 -0
  175. package/dist/extraction/mybatis-extractor.js.map +1 -0
  176. package/dist/extraction/parse-worker.d.ts +8 -0
  177. package/dist/extraction/parse-worker.d.ts.map +1 -0
  178. package/dist/extraction/parse-worker.js +94 -0
  179. package/dist/extraction/parse-worker.js.map +1 -0
  180. package/dist/extraction/razor-extractor.d.ts +42 -0
  181. package/dist/extraction/razor-extractor.d.ts.map +1 -0
  182. package/dist/extraction/razor-extractor.js +285 -0
  183. package/dist/extraction/razor-extractor.js.map +1 -0
  184. package/dist/extraction/svelte-extractor.d.ts +56 -0
  185. package/dist/extraction/svelte-extractor.d.ts.map +1 -0
  186. package/dist/extraction/svelte-extractor.js +272 -0
  187. package/dist/extraction/svelte-extractor.js.map +1 -0
  188. package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
  189. package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
  190. package/dist/extraction/tree-sitter-helpers.js +103 -0
  191. package/dist/extraction/tree-sitter-helpers.js.map +1 -0
  192. package/dist/extraction/tree-sitter-types.d.ts +210 -0
  193. package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
  194. package/dist/extraction/tree-sitter-types.js +10 -0
  195. package/dist/extraction/tree-sitter-types.js.map +1 -0
  196. package/dist/extraction/tree-sitter.d.ts +455 -0
  197. package/dist/extraction/tree-sitter.d.ts.map +1 -0
  198. package/dist/extraction/tree-sitter.js +4089 -0
  199. package/dist/extraction/tree-sitter.js.map +1 -0
  200. package/dist/extraction/vue-extractor.d.ts +51 -0
  201. package/dist/extraction/vue-extractor.d.ts.map +1 -0
  202. package/dist/extraction/vue-extractor.js +251 -0
  203. package/dist/extraction/vue-extractor.js.map +1 -0
  204. package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  205. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  206. package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
  207. package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  208. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  209. package/dist/extraction/wasm-runtime-flags.d.ts +38 -0
  210. package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
  211. package/dist/extraction/wasm-runtime-flags.js +106 -0
  212. package/dist/extraction/wasm-runtime-flags.js.map +1 -0
  213. package/dist/graph/index.d.ts +8 -0
  214. package/dist/graph/index.d.ts.map +1 -0
  215. package/dist/graph/index.js +13 -0
  216. package/dist/graph/index.js.map +1 -0
  217. package/dist/graph/queries.d.ts +106 -0
  218. package/dist/graph/queries.d.ts.map +1 -0
  219. package/dist/graph/queries.js +339 -0
  220. package/dist/graph/queries.js.map +1 -0
  221. package/dist/graph/traversal.d.ts +127 -0
  222. package/dist/graph/traversal.d.ts.map +1 -0
  223. package/dist/graph/traversal.js +531 -0
  224. package/dist/graph/traversal.js.map +1 -0
  225. package/dist/index.d.ts +522 -0
  226. package/dist/index.d.ts.map +1 -0
  227. package/dist/index.js +947 -0
  228. package/dist/index.js.map +1 -0
  229. package/dist/installer/config-writer.d.ts +28 -0
  230. package/dist/installer/config-writer.d.ts.map +1 -0
  231. package/dist/installer/config-writer.js +91 -0
  232. package/dist/installer/config-writer.js.map +1 -0
  233. package/dist/installer/index.d.ts +100 -0
  234. package/dist/installer/index.d.ts.map +1 -0
  235. package/dist/installer/index.js +497 -0
  236. package/dist/installer/index.js.map +1 -0
  237. package/dist/installer/instructions-template.d.ts +18 -0
  238. package/dist/installer/instructions-template.d.ts.map +1 -0
  239. package/dist/installer/instructions-template.js +21 -0
  240. package/dist/installer/instructions-template.js.map +1 -0
  241. package/dist/installer/targets/antigravity.d.ts +57 -0
  242. package/dist/installer/targets/antigravity.d.ts.map +1 -0
  243. package/dist/installer/targets/antigravity.js +308 -0
  244. package/dist/installer/targets/antigravity.js.map +1 -0
  245. package/dist/installer/targets/claude.d.ts +56 -0
  246. package/dist/installer/targets/claude.d.ts.map +1 -0
  247. package/dist/installer/targets/claude.js +388 -0
  248. package/dist/installer/targets/claude.js.map +1 -0
  249. package/dist/installer/targets/codex.d.ts +18 -0
  250. package/dist/installer/targets/codex.d.ts.map +1 -0
  251. package/dist/installer/targets/codex.js +187 -0
  252. package/dist/installer/targets/codex.js.map +1 -0
  253. package/dist/installer/targets/cursor.d.ts +35 -0
  254. package/dist/installer/targets/cursor.d.ts.map +1 -0
  255. package/dist/installer/targets/cursor.js +254 -0
  256. package/dist/installer/targets/cursor.js.map +1 -0
  257. package/dist/installer/targets/gemini.d.ts +26 -0
  258. package/dist/installer/targets/gemini.d.ts.map +1 -0
  259. package/dist/installer/targets/gemini.js +167 -0
  260. package/dist/installer/targets/gemini.js.map +1 -0
  261. package/dist/installer/targets/hermes.d.ts +18 -0
  262. package/dist/installer/targets/hermes.d.ts.map +1 -0
  263. package/dist/installer/targets/hermes.js +359 -0
  264. package/dist/installer/targets/hermes.js.map +1 -0
  265. package/dist/installer/targets/kiro.d.ts +27 -0
  266. package/dist/installer/targets/kiro.d.ts.map +1 -0
  267. package/dist/installer/targets/kiro.js +178 -0
  268. package/dist/installer/targets/kiro.js.map +1 -0
  269. package/dist/installer/targets/opencode.d.ts +30 -0
  270. package/dist/installer/targets/opencode.d.ts.map +1 -0
  271. package/dist/installer/targets/opencode.js +237 -0
  272. package/dist/installer/targets/opencode.js.map +1 -0
  273. package/dist/installer/targets/registry.d.ts +35 -0
  274. package/dist/installer/targets/registry.d.ts.map +1 -0
  275. package/dist/installer/targets/registry.js +91 -0
  276. package/dist/installer/targets/registry.js.map +1 -0
  277. package/dist/installer/targets/shared.d.ts +77 -0
  278. package/dist/installer/targets/shared.d.ts.map +1 -0
  279. package/dist/installer/targets/shared.js +247 -0
  280. package/dist/installer/targets/shared.js.map +1 -0
  281. package/dist/installer/targets/toml.d.ts +52 -0
  282. package/dist/installer/targets/toml.d.ts.map +1 -0
  283. package/dist/installer/targets/toml.js +147 -0
  284. package/dist/installer/targets/toml.js.map +1 -0
  285. package/dist/installer/targets/types.d.ts +101 -0
  286. package/dist/installer/targets/types.d.ts.map +1 -0
  287. package/dist/installer/targets/types.js +16 -0
  288. package/dist/installer/targets/types.js.map +1 -0
  289. package/dist/mcp/daemon-paths.d.ts +46 -0
  290. package/dist/mcp/daemon-paths.d.ts.map +1 -0
  291. package/dist/mcp/daemon-paths.js +125 -0
  292. package/dist/mcp/daemon-paths.js.map +1 -0
  293. package/dist/mcp/daemon.d.ts +220 -0
  294. package/dist/mcp/daemon.d.ts.map +1 -0
  295. package/dist/mcp/daemon.js +616 -0
  296. package/dist/mcp/daemon.js.map +1 -0
  297. package/dist/mcp/engine.d.ts +105 -0
  298. package/dist/mcp/engine.d.ts.map +1 -0
  299. package/dist/mcp/engine.js +270 -0
  300. package/dist/mcp/engine.js.map +1 -0
  301. package/dist/mcp/index.d.ts +112 -0
  302. package/dist/mcp/index.d.ts.map +1 -0
  303. package/dist/mcp/index.js +478 -0
  304. package/dist/mcp/index.js.map +1 -0
  305. package/dist/mcp/ppid-watchdog.d.ts +44 -0
  306. package/dist/mcp/ppid-watchdog.d.ts.map +1 -0
  307. package/dist/mcp/ppid-watchdog.js +27 -0
  308. package/dist/mcp/ppid-watchdog.js.map +1 -0
  309. package/dist/mcp/proxy.d.ts +81 -0
  310. package/dist/mcp/proxy.d.ts.map +1 -0
  311. package/dist/mcp/proxy.js +584 -0
  312. package/dist/mcp/proxy.js.map +1 -0
  313. package/dist/mcp/server-instructions.d.ts +19 -0
  314. package/dist/mcp/server-instructions.d.ts.map +1 -0
  315. package/dist/mcp/server-instructions.js +74 -0
  316. package/dist/mcp/server-instructions.js.map +1 -0
  317. package/dist/mcp/session.d.ts +77 -0
  318. package/dist/mcp/session.d.ts.map +1 -0
  319. package/dist/mcp/session.js +294 -0
  320. package/dist/mcp/session.js.map +1 -0
  321. package/dist/mcp/tools.d.ts +413 -0
  322. package/dist/mcp/tools.d.ts.map +1 -0
  323. package/dist/mcp/tools.js +3049 -0
  324. package/dist/mcp/tools.js.map +1 -0
  325. package/dist/mcp/transport.d.ts +188 -0
  326. package/dist/mcp/transport.d.ts.map +1 -0
  327. package/dist/mcp/transport.js +343 -0
  328. package/dist/mcp/transport.js.map +1 -0
  329. package/dist/mcp/version.d.ts +19 -0
  330. package/dist/mcp/version.d.ts.map +1 -0
  331. package/dist/mcp/version.js +71 -0
  332. package/dist/mcp/version.js.map +1 -0
  333. package/dist/resolution/callback-synthesizer.d.ts +10 -0
  334. package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
  335. package/dist/resolution/callback-synthesizer.js +1818 -0
  336. package/dist/resolution/callback-synthesizer.js.map +1 -0
  337. package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  338. package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  339. package/dist/resolution/frameworks/cargo-workspace.js +225 -0
  340. package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  341. package/dist/resolution/frameworks/csharp.d.ts +8 -0
  342. package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
  343. package/dist/resolution/frameworks/csharp.js +241 -0
  344. package/dist/resolution/frameworks/csharp.js.map +1 -0
  345. package/dist/resolution/frameworks/drupal.d.ts +51 -0
  346. package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
  347. package/dist/resolution/frameworks/drupal.js +367 -0
  348. package/dist/resolution/frameworks/drupal.js.map +1 -0
  349. package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  350. package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  351. package/dist/resolution/frameworks/expo-modules.js +148 -0
  352. package/dist/resolution/frameworks/expo-modules.js.map +1 -0
  353. package/dist/resolution/frameworks/express.d.ts +8 -0
  354. package/dist/resolution/frameworks/express.d.ts.map +1 -0
  355. package/dist/resolution/frameworks/express.js +308 -0
  356. package/dist/resolution/frameworks/express.js.map +1 -0
  357. package/dist/resolution/frameworks/fabric.d.ts +3 -0
  358. package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  359. package/dist/resolution/frameworks/fabric.js +354 -0
  360. package/dist/resolution/frameworks/fabric.js.map +1 -0
  361. package/dist/resolution/frameworks/go.d.ts +8 -0
  362. package/dist/resolution/frameworks/go.d.ts.map +1 -0
  363. package/dist/resolution/frameworks/go.js +161 -0
  364. package/dist/resolution/frameworks/go.js.map +1 -0
  365. package/dist/resolution/frameworks/index.d.ts +48 -0
  366. package/dist/resolution/frameworks/index.d.ts.map +1 -0
  367. package/dist/resolution/frameworks/index.js +161 -0
  368. package/dist/resolution/frameworks/index.js.map +1 -0
  369. package/dist/resolution/frameworks/java.d.ts +8 -0
  370. package/dist/resolution/frameworks/java.d.ts.map +1 -0
  371. package/dist/resolution/frameworks/java.js +504 -0
  372. package/dist/resolution/frameworks/java.js.map +1 -0
  373. package/dist/resolution/frameworks/laravel.d.ts +13 -0
  374. package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
  375. package/dist/resolution/frameworks/laravel.js +257 -0
  376. package/dist/resolution/frameworks/laravel.js.map +1 -0
  377. package/dist/resolution/frameworks/nestjs.d.ts +26 -0
  378. package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
  379. package/dist/resolution/frameworks/nestjs.js +698 -0
  380. package/dist/resolution/frameworks/nestjs.js.map +1 -0
  381. package/dist/resolution/frameworks/play.d.ts +19 -0
  382. package/dist/resolution/frameworks/play.d.ts.map +1 -0
  383. package/dist/resolution/frameworks/play.js +111 -0
  384. package/dist/resolution/frameworks/play.js.map +1 -0
  385. package/dist/resolution/frameworks/python.d.ts +10 -0
  386. package/dist/resolution/frameworks/python.d.ts.map +1 -0
  387. package/dist/resolution/frameworks/python.js +400 -0
  388. package/dist/resolution/frameworks/python.js.map +1 -0
  389. package/dist/resolution/frameworks/react-native.d.ts +3 -0
  390. package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  391. package/dist/resolution/frameworks/react-native.js +410 -0
  392. package/dist/resolution/frameworks/react-native.js.map +1 -0
  393. package/dist/resolution/frameworks/react.d.ts +8 -0
  394. package/dist/resolution/frameworks/react.d.ts.map +1 -0
  395. package/dist/resolution/frameworks/react.js +365 -0
  396. package/dist/resolution/frameworks/react.js.map +1 -0
  397. package/dist/resolution/frameworks/ruby.d.ts +8 -0
  398. package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
  399. package/dist/resolution/frameworks/ruby.js +302 -0
  400. package/dist/resolution/frameworks/ruby.js.map +1 -0
  401. package/dist/resolution/frameworks/rust.d.ts +8 -0
  402. package/dist/resolution/frameworks/rust.d.ts.map +1 -0
  403. package/dist/resolution/frameworks/rust.js +304 -0
  404. package/dist/resolution/frameworks/rust.js.map +1 -0
  405. package/dist/resolution/frameworks/svelte.d.ts +9 -0
  406. package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
  407. package/dist/resolution/frameworks/svelte.js +249 -0
  408. package/dist/resolution/frameworks/svelte.js.map +1 -0
  409. package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  410. package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  411. package/dist/resolution/frameworks/swift-objc.js +252 -0
  412. package/dist/resolution/frameworks/swift-objc.js.map +1 -0
  413. package/dist/resolution/frameworks/swift.d.ts +10 -0
  414. package/dist/resolution/frameworks/swift.d.ts.map +1 -0
  415. package/dist/resolution/frameworks/swift.js +400 -0
  416. package/dist/resolution/frameworks/swift.js.map +1 -0
  417. package/dist/resolution/frameworks/vue.d.ts +9 -0
  418. package/dist/resolution/frameworks/vue.d.ts.map +1 -0
  419. package/dist/resolution/frameworks/vue.js +306 -0
  420. package/dist/resolution/frameworks/vue.js.map +1 -0
  421. package/dist/resolution/go-module.d.ts +26 -0
  422. package/dist/resolution/go-module.d.ts.map +1 -0
  423. package/dist/resolution/go-module.js +78 -0
  424. package/dist/resolution/go-module.js.map +1 -0
  425. package/dist/resolution/import-resolver.d.ts +68 -0
  426. package/dist/resolution/import-resolver.d.ts.map +1 -0
  427. package/dist/resolution/import-resolver.js +1726 -0
  428. package/dist/resolution/import-resolver.js.map +1 -0
  429. package/dist/resolution/index.d.ts +159 -0
  430. package/dist/resolution/index.d.ts.map +1 -0
  431. package/dist/resolution/index.js +1025 -0
  432. package/dist/resolution/index.js.map +1 -0
  433. package/dist/resolution/lru-cache.d.ts +24 -0
  434. package/dist/resolution/lru-cache.d.ts.map +1 -0
  435. package/dist/resolution/lru-cache.js +62 -0
  436. package/dist/resolution/lru-cache.js.map +1 -0
  437. package/dist/resolution/name-matcher.d.ts +52 -0
  438. package/dist/resolution/name-matcher.d.ts.map +1 -0
  439. package/dist/resolution/name-matcher.js +707 -0
  440. package/dist/resolution/name-matcher.js.map +1 -0
  441. package/dist/resolution/path-aliases.d.ts +68 -0
  442. package/dist/resolution/path-aliases.d.ts.map +1 -0
  443. package/dist/resolution/path-aliases.js +238 -0
  444. package/dist/resolution/path-aliases.js.map +1 -0
  445. package/dist/resolution/strip-comments.d.ts +27 -0
  446. package/dist/resolution/strip-comments.d.ts.map +1 -0
  447. package/dist/resolution/strip-comments.js +441 -0
  448. package/dist/resolution/strip-comments.js.map +1 -0
  449. package/dist/resolution/swift-objc-bridge.d.ts +134 -0
  450. package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  451. package/dist/resolution/swift-objc-bridge.js +256 -0
  452. package/dist/resolution/swift-objc-bridge.js.map +1 -0
  453. package/dist/resolution/types.d.ts +216 -0
  454. package/dist/resolution/types.d.ts.map +1 -0
  455. package/dist/resolution/types.js +8 -0
  456. package/dist/resolution/types.js.map +1 -0
  457. package/dist/resolution/workspace-packages.d.ts +48 -0
  458. package/dist/resolution/workspace-packages.d.ts.map +1 -0
  459. package/dist/resolution/workspace-packages.js +208 -0
  460. package/dist/resolution/workspace-packages.js.map +1 -0
  461. package/dist/search/query-parser.d.ts +57 -0
  462. package/dist/search/query-parser.d.ts.map +1 -0
  463. package/dist/search/query-parser.js +177 -0
  464. package/dist/search/query-parser.js.map +1 -0
  465. package/dist/search/query-utils.d.ts +71 -0
  466. package/dist/search/query-utils.d.ts.map +1 -0
  467. package/dist/search/query-utils.js +380 -0
  468. package/dist/search/query-utils.js.map +1 -0
  469. package/dist/sync/git-hooks.d.ts +45 -0
  470. package/dist/sync/git-hooks.d.ts.map +1 -0
  471. package/dist/sync/git-hooks.js +225 -0
  472. package/dist/sync/git-hooks.js.map +1 -0
  473. package/dist/sync/index.d.ts +19 -0
  474. package/dist/sync/index.d.ts.map +1 -0
  475. package/dist/sync/index.js +35 -0
  476. package/dist/sync/index.js.map +1 -0
  477. package/dist/sync/watch-policy.d.ts +48 -0
  478. package/dist/sync/watch-policy.d.ts.map +1 -0
  479. package/dist/sync/watch-policy.js +124 -0
  480. package/dist/sync/watch-policy.js.map +1 -0
  481. package/dist/sync/watcher.d.ts +283 -0
  482. package/dist/sync/watcher.d.ts.map +1 -0
  483. package/dist/sync/watcher.js +606 -0
  484. package/dist/sync/watcher.js.map +1 -0
  485. package/dist/sync/worktree.d.ts +54 -0
  486. package/dist/sync/worktree.d.ts.map +1 -0
  487. package/dist/sync/worktree.js +137 -0
  488. package/dist/sync/worktree.js.map +1 -0
  489. package/dist/types.d.ts +377 -0
  490. package/dist/types.d.ts.map +1 -0
  491. package/dist/types.js +80 -0
  492. package/dist/types.js.map +1 -0
  493. package/dist/ui/glyphs.d.ts +42 -0
  494. package/dist/ui/glyphs.d.ts.map +1 -0
  495. package/dist/ui/glyphs.js +78 -0
  496. package/dist/ui/glyphs.js.map +1 -0
  497. package/dist/ui/shimmer-progress.d.ts +11 -0
  498. package/dist/ui/shimmer-progress.d.ts.map +1 -0
  499. package/dist/ui/shimmer-progress.js +90 -0
  500. package/dist/ui/shimmer-progress.js.map +1 -0
  501. package/dist/ui/shimmer-worker.d.ts +2 -0
  502. package/dist/ui/shimmer-worker.d.ts.map +1 -0
  503. package/dist/ui/shimmer-worker.js +118 -0
  504. package/dist/ui/shimmer-worker.js.map +1 -0
  505. package/dist/ui/types.d.ts +17 -0
  506. package/dist/ui/types.d.ts.map +1 -0
  507. package/dist/ui/types.js +3 -0
  508. package/dist/ui/types.js.map +1 -0
  509. package/dist/upgrade/index.d.ts +132 -0
  510. package/dist/upgrade/index.d.ts.map +1 -0
  511. package/dist/upgrade/index.js +462 -0
  512. package/dist/upgrade/index.js.map +1 -0
  513. package/dist/utils.d.ts +205 -0
  514. package/dist/utils.d.ts.map +1 -0
  515. package/dist/utils.js +549 -0
  516. package/dist/utils.js.map +1 -0
  517. package/package.json +57 -0
  518. package/scripts/add-lang/bench.sh +60 -0
  519. package/scripts/add-lang/check-grammar.mjs +75 -0
  520. package/scripts/add-lang/dump-ast.mjs +103 -0
  521. package/scripts/add-lang/verify-extraction.mjs +70 -0
  522. package/scripts/agent-eval/arms-F.sh +21 -0
  523. package/scripts/agent-eval/arms-matrix.sh +37 -0
  524. package/scripts/agent-eval/audit.sh +68 -0
  525. package/scripts/agent-eval/bench-readme.sh +28 -0
  526. package/scripts/agent-eval/bench-why-repo.sh +22 -0
  527. package/scripts/agent-eval/block-read-hook.sh +19 -0
  528. package/scripts/agent-eval/hook-settings.json +15 -0
  529. package/scripts/agent-eval/itrun.sh +120 -0
  530. package/scripts/agent-eval/parse-arms.mjs +116 -0
  531. package/scripts/agent-eval/parse-bench-readme.mjs +84 -0
  532. package/scripts/agent-eval/parse-run.mjs +45 -0
  533. package/scripts/agent-eval/parse-session.mjs +93 -0
  534. package/scripts/agent-eval/probe-context.mjs +21 -0
  535. package/scripts/agent-eval/probe-explore.mjs +40 -0
  536. package/scripts/agent-eval/probe-node.mjs +20 -0
  537. package/scripts/agent-eval/probe-sweep.mjs +119 -0
  538. package/scripts/agent-eval/probe-trace.mjs +20 -0
  539. package/scripts/agent-eval/run-agent.sh +34 -0
  540. package/scripts/agent-eval/run-all.sh +67 -0
  541. package/scripts/agent-eval/run-arms.sh +56 -0
  542. package/scripts/agent-eval/seq-matrix.mjs +137 -0
  543. package/scripts/build-bundle.sh +118 -0
  544. package/scripts/extract-release-notes.mjs +130 -0
  545. package/scripts/local-install.sh +41 -0
  546. package/scripts/npm-sdk.js +75 -0
  547. package/scripts/npm-shim.js +246 -0
  548. package/scripts/pack-npm.sh +119 -0
  549. package/scripts/prepare-release.mjs +270 -0
package/README.md ADDED
@@ -0,0 +1,709 @@
1
+ <div align="center">
2
+
3
+ # CodeGraph
4
+
5
+ ### Supercharge Claude Code, Cursor, Codex, OpenCode, Hermes Agent, Gemini, Antigravity, and Kiro with Semantic Code Intelligence
6
+
7
+ **~16% cheaper · ~58% fewer tool calls · 100% local**
8
+
9
+ ### [Documentation & Website →](https://colbymchenry.github.io/codegraph/)
10
+
11
+ [![npm version](https://img.shields.io/npm/v/@colbymchenry/codegraph.svg)](https://www.npmjs.com/package/@colbymchenry/codegraph)
12
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13
+ [![Self-contained](https://img.shields.io/badge/Node.js-bundled%20%C2%B7%20none%20required-brightgreen.svg)](https://nodejs.org/)
14
+
15
+ [![Windows](https://img.shields.io/badge/Windows-supported-blue.svg)](#supported-platforms)
16
+ [![macOS](https://img.shields.io/badge/macOS-supported-blue.svg)](#supported-platforms)
17
+ [![Linux](https://img.shields.io/badge/Linux-supported-blue.svg)](#supported-platforms)
18
+
19
+ [![Claude Code](https://img.shields.io/badge/Claude_Code-supported-blueviolet.svg)](#supported-agents)
20
+ [![Cursor](https://img.shields.io/badge/Cursor-supported-blueviolet.svg)](#supported-agents)
21
+ [![Codex](https://img.shields.io/badge/Codex-supported-blueviolet.svg)](#supported-agents)
22
+ [![opencode](https://img.shields.io/badge/opencode-supported-blueviolet.svg)](#supported-agents)
23
+ [![Hermes Agent](https://img.shields.io/badge/Hermes_Agent-supported-blueviolet.svg)](#supported-agents)
24
+ [![Gemini](https://img.shields.io/badge/Gemini-supported-blueviolet.svg)](#supported-agents)
25
+ [![Antigravity](https://img.shields.io/badge/Antigravity-supported-blueviolet.svg)](#supported-agents)
26
+ [![Kiro](https://img.shields.io/badge/Kiro-supported-blueviolet.svg)](#supported-agents)
27
+
28
+ <br>
29
+
30
+ **The CodeGraph platform is coming** — for every PR, know exactly what to test, what could break, which flows are affected, and whether business logic is compromised.
31
+
32
+ <a href="https://getcodegraph.com"><img alt="Join the waitlist for early beta access" src="https://raw.githubusercontent.com/colbymchenry/codegraph/main/assets/waitlist.svg?v=2" height="52"></a>
33
+
34
+ <sub>Get <b>early beta access</b> to the hosted product · <a href="https://getcodegraph.com">getcodegraph.com</a></sub>
35
+
36
+ </div>
37
+
38
+ ## Get Started
39
+
40
+ ### 1. Install the CLI
41
+
42
+ **No Node.js required** — one command grabs the right build for your OS:
43
+
44
+ ```bash
45
+ # macOS / Linux
46
+ curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
47
+
48
+ # Windows (PowerShell)
49
+ irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex
50
+ ```
51
+
52
+ Already have Node? Use npm instead (works on any version):
53
+
54
+ ```bash
55
+ npm i -g @colbymchenry/codegraph
56
+ ```
57
+
58
+ <sub>CodeGraph bundles its own runtime — nothing to compile, no native build, works the same everywhere. The installer puts `codegraph` on your PATH but **doesn't change your current shell** — open a new terminal before the next step so the command resolves.</sub>
59
+
60
+ <sub>**Upgrade any time** with `codegraph upgrade` — it detects how you installed (bundle, npm, or npx) and updates in place. Add `--check` to see if an update is available, or `codegraph upgrade <version>` to pin one.</sub>
61
+
62
+ ### 2. Wire up your agent(s)
63
+
64
+ In a **new terminal**, run the installer to connect CodeGraph to the agents you use:
65
+
66
+ ```bash
67
+ codegraph install
68
+ ```
69
+
70
+ <sub>Detects and auto-configures Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro — wiring the CodeGraph MCP server into each. **This is the step that connects CodeGraph to your agent;** installing the CLI in step 1 does not do it on its own. (Shortcut: `npx @colbymchenry/codegraph` downloads and runs this in one go.)</sub>
71
+
72
+ ### 3. Initialize each project
73
+
74
+ ```bash
75
+ cd your-project
76
+ codegraph init -i
77
+ ```
78
+
79
+ <sub>`codegraph init` just creates the local `.codegraph/` index directory; adding `-i` (`--index`) also builds the initial graph in the same step. Without `-i`, run `codegraph index` afterwards to populate it.</sub>
80
+
81
+ <div align="center">
82
+
83
+ ![1_C_VYnhpys0UHrOuOgpgoyw](https://github.com/user-attachments/assets/f168182f-4d9a-44e0-94d7-08d018cc8a3a)
84
+
85
+ </div>
86
+
87
+ ### Uninstall
88
+
89
+ Changed your mind? One command removes CodeGraph from every agent it configured:
90
+
91
+ ```bash
92
+ codegraph uninstall
93
+ ```
94
+
95
+ <sub>Reverses the installer — strips CodeGraph's MCP server config, instructions, and permissions from each configured agent. Your project indexes (`.codegraph/`) are left untouched; remove those per-project with `codegraph uninit`. Use `--target` to remove from specific agents, or `--yes` to run non-interactively.</sub>
96
+
97
+ ---
98
+
99
+ ## Why CodeGraph?
100
+
101
+ When Claude Code explores a codebase, it spawns **Explore agents** that scan files with grep, glob, and Read — consuming tokens on every tool call.
102
+
103
+ **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.
104
+
105
+ ### Benchmark Results
106
+
107
+ Tested across **7 real-world open-source codebases** spanning 7 languages, comparing an agent (Claude Code, headless) answering one architecture question **with** and **without** CodeGraph. Each cell is the savings at the **median of 4 runs per arm**. _Re-validated on Opus 4.8 (2026-06-02), on the current build (`codegraph_explore` as the primary tool)._
108
+
109
+ > **Average: 16% cheaper · 47% fewer tokens · 22% faster · 58% fewer tool calls**
110
+
111
+ | Codebase | Language | Cost | Tokens | Time | Tool calls |
112
+ |----------|----------|------|--------|------|------------|
113
+ | **VS Code** | TypeScript · ~10k files | 18% cheaper | 64% fewer | 11% faster | 81% fewer |
114
+ | **Excalidraw** | TypeScript · ~640 | even | 25% fewer | 27% faster | 40% fewer |
115
+ | **Django** | Python · ~3k | 8% cheaper | 60% fewer | 13% faster | 77% fewer |
116
+ | **Tokio** | Rust · ~790 | even | 38% fewer | 18% faster | 57% fewer |
117
+ | **OkHttp** | Java · ~645 | 25% cheaper | 54% fewer | 31% faster | 50% fewer |
118
+ | **Gin** | Go · ~110 | 19% cheaper | 23% fewer | 24% faster | 44% fewer |
119
+ | **Alamofire** | Swift · ~110 | 40% cheaper | 64% fewer | 33% faster | 58% fewer |
120
+
121
+ CodeGraph cuts **tokens, tool calls, and wall-clock time on every repo** — across small, medium, and large codebases — and answers them with **near-zero file reads**, while the no-CodeGraph agent spends its budget on grep/find/Read discovery. `codegraph_explore` shows the answer in full — the mechanism plus the exact methods you asked about, even when they're buried in a multi-thousand-line file — while collapsing redundant interchangeable implementations to signatures, so the response is sized to the *answer* rather than the file count. **Cost stays flat-to-cheaper everywhere** — largest on the small repos (Alamofire, OkHttp), roughly break-even on the most response-heavy ones (Excalidraw, Tokio), where CodeGraph trades the no-CodeGraph agent's many small grep/read round-trips for a few large, cache-heavy tool responses.
122
+
123
+ <details>
124
+ <summary><strong>Per-repo breakdown — WITH vs WITHOUT (median of 4)</strong></summary>
125
+
126
+ **VS Code** · ~10k files
127
+ | Metric | WITH cg | WITHOUT cg | Δ |
128
+ |---|---|---|---|
129
+ | Time | 1m 59s | 2m 13s | 11% faster |
130
+ | File Reads | 0 | 9 | −9 |
131
+ | Grep/Bash | 0 | 11 | −11 |
132
+ | Tool calls | 4 | 21 | 81% fewer |
133
+ | Total tokens | 640k | 1.79M | 64% fewer |
134
+ | Cost | $0.68 | $0.83 | 18% cheaper |
135
+
136
+ **Excalidraw** · ~640 files
137
+ | Metric | WITH cg | WITHOUT cg | Δ |
138
+ |---|---|---|---|
139
+ | Time | 1m 32s | 2m 6s | 27% faster |
140
+ | File Reads | 0 | 7 | −7 |
141
+ | Grep/Bash | 1 | 8 | −7 |
142
+ | Tool calls | 9 | 15 | 40% fewer |
143
+ | Total tokens | 1.27M | 1.69M | 25% fewer |
144
+ | Cost | $0.78 | $0.78 | even |
145
+
146
+ **Django** · ~3k files
147
+ | Metric | WITH cg | WITHOUT cg | Δ |
148
+ |---|---|---|---|
149
+ | Time | 1m 43s | 1m 58s | 13% faster |
150
+ | File Reads | 0 | 9 | −9 |
151
+ | Grep/Bash | 0 | 5 | −5 |
152
+ | Tool calls | 3 | 13 | 77% fewer |
153
+ | Total tokens | 559k | 1.41M | 60% fewer |
154
+ | Cost | $0.57 | $0.62 | 8% cheaper |
155
+
156
+ **Tokio** · ~790 files
157
+ | Metric | WITH cg | WITHOUT cg | Δ |
158
+ |---|---|---|---|
159
+ | Time | 1m 55s | 2m 20s | 18% faster |
160
+ | File Reads | 0 | 8 | −8 |
161
+ | Grep/Bash | 0 | 6 | −6 |
162
+ | Tool calls | 6 | 14 | 57% fewer |
163
+ | Total tokens | 1.08M | 1.73M | 38% fewer |
164
+ | Cost | $0.82 | $0.82 | even |
165
+
166
+ **OkHttp** · ~645 files
167
+ | Metric | WITH cg | WITHOUT cg | Δ |
168
+ |---|---|---|---|
169
+ | Time | 1m 1s | 1m 29s | 31% faster |
170
+ | File Reads | 0 | 4 | −4 |
171
+ | Grep/Bash | 2 | 6 | −4 |
172
+ | Tool calls | 5 | 10 | 50% fewer |
173
+ | Total tokens | 502k | 1.10M | 54% fewer |
174
+ | Cost | $0.41 | $0.55 | 25% cheaper |
175
+
176
+ **Gin** · ~110 files
177
+ | Metric | WITH cg | WITHOUT cg | Δ |
178
+ |---|---|---|---|
179
+ | Time | 1m 14s | 1m 37s | 24% faster |
180
+ | File Reads | 1 | 6 | −5 |
181
+ | Grep/Bash | 1 | 2 | −1 |
182
+ | Tool calls | 5 | 9 | 44% fewer |
183
+ | Total tokens | 651k | 847k | 23% fewer |
184
+ | Cost | $0.46 | $0.57 | 19% cheaper |
185
+
186
+ **Alamofire** · ~110 files
187
+ | Metric | WITH cg | WITHOUT cg | Δ |
188
+ |---|---|---|---|
189
+ | Time | 1m 35s | 2m 21s | 33% faster |
190
+ | File Reads | 0 | 9 | −9 |
191
+ | Grep/Bash | 0 | 4 | −4 |
192
+ | Tool calls | 5 | 12 | 58% fewer |
193
+ | Total tokens | 766k | 2.10M | 64% fewer |
194
+ | Cost | $0.57 | $0.95 | 40% cheaper |
195
+
196
+ </details>
197
+
198
+ <details>
199
+ <summary><strong>Full benchmark details</strong></summary>
200
+
201
+ **Methodology.** Each arm is `claude -p` (Claude Opus 4.8) run headlessly against the repo with `--strict-mcp-config`: **WITH** = CodeGraph's MCP server enabled, **WITHOUT** = an empty MCP config. Built-in Read/Grep/Bash stay available to both. Same question per repo, **4 runs per arm, median reported**. Cost = the run's `total_cost_usd`; Tokens = total tokens processed (input incl. cached + output); Time = wall-clock; Tool calls = every tool invocation, including those inside any sub-agents the model spawns. Repos cloned at `--depth 1` and indexed by the same CodeGraph build that served them. Re-validated 2026-06-02 on the current build. These numbers are lower than the prior Opus 4.7 validation — not a CodeGraph regression but a stronger native baseline: Opus 4.8 greps/reads efficiently on the main thread instead of fanning out into large Explore-subagent sweeps, so the no-CodeGraph arm is leaner than it used to be. Per-repo numbers move run-to-run with how hard the without-arm thrashes (the median-of-4 smooths it, but tails remain — e.g. Django's without-arm hit $2.71/14m one batch).
202
+
203
+ **Queries:**
204
+ | Codebase | Query |
205
+ |----------|-------|
206
+ | VS Code | "How does the extension host communicate with the main process?" |
207
+ | Excalidraw | "How does Excalidraw render and update canvas elements?" |
208
+ | Django | "How does Django's ORM build and execute a query from a QuerySet?" |
209
+ | Tokio | "How does tokio schedule and run async tasks on its runtime?" |
210
+ | OkHttp | "How does OkHttp process a request through its interceptor chain?" |
211
+ | Gin | "How does gin route requests through its middleware chain?" |
212
+ | Alamofire | "How does Alamofire build, send, and validate a request?" |
213
+
214
+ **Why CodeGraph wins:** with the index available, the agent answers directly — usually one `codegraph_explore` returns the relevant source — and stops, usually with zero file reads. Without it, the agent spends most of its budget on discovery (find/ls/grep) before reading the right code. CodeGraph only helps when queried *directly*, so its instructions steer agents to answer directly rather than delegate exploration to file-reading sub-agents — otherwise a sub-agent reads files regardless and CodeGraph becomes overhead.
215
+
216
+ </details>
217
+
218
+ ---
219
+
220
+ ## Key Features
221
+
222
+ | | |
223
+ |---|---|
224
+ | **Smart Context Building** | One tool call returns entry points, related symbols, and code snippets — no expensive exploration agents |
225
+ | **Full-Text Search** | Find code by name instantly across your entire codebase, powered by FTS5 |
226
+ | **Impact Analysis** | Trace callers, callees, and the full impact radius of any symbol before making changes |
227
+ | **Always Fresh** | File watcher uses native OS events (FSEvents/inotify/ReadDirectoryChangesW) with debounced auto-sync — the graph stays current as you code, zero config |
228
+ | **20+ Languages** | TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C, C++, Objective-C, Swift, Kotlin, Dart, Lua, Luau, Svelte, Liquid, Pascal/Delphi |
229
+ | **Framework-aware Routes** | Recognizes web-framework routing files and links URL patterns to their handlers across 14 frameworks |
230
+ | **Mixed iOS / React Native / Expo** | Closes cross-language flows that static parsing misses: Swift ↔ ObjC bridging, React Native legacy bridge + TurboModules + Fabric view components, native → JS event emitters, Expo Modules |
231
+ | **100% Local** | No data leaves your machine. No API keys. No external services. SQLite database only |
232
+
233
+ <details>
234
+ <summary><strong>How auto-syncing works — and why you don't need to run <code>codegraph sync</code> manually</strong></summary>
235
+
236
+ When your agent (Claude Code, Cursor, Codex, opencode) launches `codegraph serve --mcp`, three layers keep the index in step with your code — and make sure the agent never gets a silent wrong answer in the brief window between an edit and the next sync:
237
+
238
+ 1. **File watcher with debounced auto-sync.** A native FSEvents / inotify / ReadDirectoryChangesW watcher captures every source-file create / modify / delete and triggers a re-index after a debounce window (default `2000ms`, tunable via `CODEGRAPH_WATCH_DEBOUNCE_MS`, clamped to `[100ms, 60s]`). Bursts of edits collapse into a single sync.
239
+
240
+ 2. **Per-file staleness banner.** During the brief debounce window, MCP tool responses that would reference a still-pending file prepend a `⚠️` banner naming it and telling the agent to `Read` it directly. Pending files NOT referenced by the response surface as a small footer instead. Either way, the agent gets an explicit signal — validated with Claude Code, where the agent literally says "Reading the file directly for the live content" before opening it.
241
+
242
+ 3. **Connect-time catch-up.** When the MCP server (re)connects, codegraph runs a fast `(size, mtime)` + content-hash reconciliation against the working tree before answering the first query — so edits made while no MCP server was running (a `git pull` from the terminal, edits from another editor, a previous agent session that exited) get absorbed on the next session's first tool call.
243
+
244
+ ```
245
+ agent writes src/Widget.ts
246
+ → watcher fires (<100ms)
247
+ → debounce (default 2s)
248
+ → sync; Widget.ts is in the index
249
+ → next agent query sees it
250
+ ```
251
+
252
+ **Verify any time** with `codegraph_status` (via MCP) or `codegraph status` (CLI). If anything is pending, you'll see a `### Pending sync:` section naming the files and their edit age.
253
+
254
+ The handful of cases where manual `codegraph sync` makes sense: the watcher is disabled (sandboxed environments, or `CODEGRAPH_NO_DAEMON=1`), or you're scripting against the index outside an agent session and want a pre-flight sync at the start of your script.
255
+
256
+ → Full deep-dive in [Guides → Indexing a Project](https://colbymchenry.github.io/codegraph/guides/indexing/#stay-fresh-automatically).
257
+
258
+ </details>
259
+
260
+ ---
261
+
262
+ ## Framework-aware Routes
263
+
264
+ CodeGraph detects web-framework routing files and emits `route` nodes linked by `references` edges to their handler classes or functions. Querying callers of a view/controller now surfaces the URL pattern that binds it.
265
+
266
+ | Framework | Shapes recognized |
267
+ |---|---|
268
+ | **Django** | `path()`, `re_path()`, `url()`, `include()` in `urls.py` (CBV `.as_view()`, dotted paths) |
269
+ | **Flask** | `@app.route('/path', methods=[...])`, blueprint routes |
270
+ | **FastAPI** | `@app.get(...)`, `@router.post(...)`, all standard methods |
271
+ | **Express** | `app.get(...)`, `router.post(...)` with middleware chains |
272
+ | **NestJS** | `@Controller` + `@Get/@Post/...`, GraphQL `@Resolver` + `@Query/@Mutation`, `@MessagePattern`/`@EventPattern`, `@SubscribeMessage` |
273
+ | **Laravel** | `Route::get()`, `Route::resource()`, `Controller@action`, tuple syntax |
274
+ | **Drupal** | `*.routing.yml` routes (`_controller`, `_form`, entity handlers); `hook_*` implementations in `.module`/`.theme`/`.install`/`.inc` |
275
+ | **Rails** | `get '/x', to: 'users#index'`, hash-rocket `=>` syntax |
276
+ | **Spring** | `@GetMapping`, `@PostMapping`, `@RequestMapping` on methods |
277
+ | **Gin / chi / gorilla / mux** | `r.GET(...)`, `router.HandleFunc(...)` |
278
+ | **Axum / actix / Rocket** | `.route("/x", get(handler))` |
279
+ | **ASP.NET** | `[HttpGet("/x")]` attributes on action methods |
280
+ | **Vapor** | `app.get("x", use: handler)` |
281
+ | **React Router** / **SvelteKit** | Route component nodes |
282
+
283
+ ---
284
+
285
+ ## Mixed iOS / React Native / Expo bridging
286
+
287
+ Real iOS and React Native codebases live across multiple languages — a Swift caller invokes an Objective-C selector that's been auto-bridged, a JS file calls into a native module via the React Native bridge, a JSX component delegates to a native view manager. Static tree-sitter extraction stops at each language boundary. CodeGraph bridges them so `trace`, `callers`, `callees`, and `impact` connect end-to-end across the gap.
288
+
289
+ | Boundary | JS / Swift side | Native side | How |
290
+ |---|---|---|---|
291
+ | **Swift → ObjC** | Swift `obj.foo(bar:)` | ObjC selector `-fooWithBar:` | `@objc` auto-bridging rules (including init/property/protocol forms) + Cocoa preposition prefixes (`With`/`For`/`By`/`In`/`On`/`At`/…) |
292
+ | **ObjC → Swift** | ObjC `[obj fooWithBar:]` | Swift `@objc func foo(bar:)` | Reverse-bridge name candidates; verifies `@objc` exposure from source |
293
+ | **React Native legacy bridge** | JS `NativeModules.X.fn(...)` | ObjC `RCT_EXPORT_METHOD` / `RCT_REMAP_METHOD` · Java/Kotlin `@ReactMethod` | Parses macro/annotation declarations to build a JS-name → native-method map |
294
+ | **React Native TurboModules** | JS `import M from './NativeM'; M.fn(...)` | Native impl matching the Codegen spec | Treats the `Native<X>.ts` spec interface as ground truth |
295
+ | **RN native → JS events** | JS `new NativeEventEmitter(...).addListener('e', cb)` | ObjC `[self sendEventWithName:@"e" body:...]` · Swift `sendEvent(withName: "e", ...)` · Java/Kotlin `.emit("e", ...)` | Synthesized cross-language event channel keyed by literal event name |
296
+ | **Expo Modules** | JS `requireNativeModule('X').fn(...)` | Swift / Kotlin `Module { Name("X"); AsyncFunction("fn") { ... } }` | Parses the Expo DSL literals; synthetic method nodes resolve via existing name-match |
297
+ | **Fabric view components** | JSX `<MyView prop={v}/>` | TS Codegen spec + native impl class | Spec → `component` node; convention-based name+suffix lookup (`View`/`ComponentView`/`Manager`/`ViewManager`) bridges to native |
298
+ | **Legacy Paper view managers** | JSX `<MyView prop={v}/>` | ObjC `RCT_EXPORT_VIEW_PROPERTY` · Java/Kotlin `@ReactProp` | Same as Fabric — Paper-era declarations also produce `component` + `property` nodes |
299
+
300
+ **Validated on real codebases** (small + medium + large for each bridge):
301
+
302
+ | Bridge | Small | Medium | Large |
303
+ |---|---|---|---|
304
+ | Swift ↔ ObjC | [Charts](https://github.com/danielgindi/Charts) | [realm-swift](https://github.com/realm/realm-swift) | [Wikipedia-iOS](https://github.com/wikimedia/wikipedia-ios) |
305
+ | RN legacy bridge | [AsyncStorage](https://github.com/react-native-async-storage/async-storage) | [react-native-svg](https://github.com/software-mansion/react-native-svg) | [react-native-firebase](https://github.com/invertase/react-native-firebase) |
306
+ | RN native → JS events | [RNGeolocation](https://github.com/Agontuk/react-native-geolocation-service) | — | react-native-firebase |
307
+ | Expo Modules | expo-haptics | expo-camera | expo SDK sweep (7 packages) |
308
+ | Fabric / Paper views | [react-native-segmented-control](https://github.com/react-native-segmented-control/segmented-control) | [react-native-screens](https://github.com/software-mansion/react-native-screens) | [react-native-skia](https://github.com/Shopify/react-native-skia) |
309
+
310
+ Each bridge emits edges tagged `provenance:'heuristic'` with `metadata.synthesizedBy:` set to a stable channel name (e.g. `swift-objc-bridge`, `rn-event-channel`, `fabric-native-impl`, `expo-module-extract`), so the agent can tell at a glance how a hop got into the graph.
311
+
312
+ ---
313
+
314
+ ## Quick Start
315
+
316
+ ### 1. Run the Installer
317
+
318
+ ```bash
319
+ npx @colbymchenry/codegraph
320
+ ```
321
+
322
+ The installer will:
323
+ - Ask which agent(s) to configure — auto-detects installed ones from: **Claude Code**, **Cursor**, **Codex CLI**, **opencode**, **Hermes Agent**, **Gemini CLI**, **Antigravity IDE**, **Kiro**
324
+ - Prompt to install `codegraph` on your PATH (so agents can launch the MCP server)
325
+ - Ask whether configs apply to all your projects or just this one
326
+ - Write each chosen agent's MCP server config (the codegraph usage guide is delivered by the MCP server itself, so no instructions file is added to `CLAUDE.md` / `AGENTS.md` / etc.)
327
+ - Set up auto-allow permissions when Claude Code is one of the targets
328
+ - Initialize your current project (local installs only)
329
+
330
+ **Non-interactive (scripting / CI):**
331
+
332
+ ```bash
333
+ codegraph install --yes # auto-detect agents, install global
334
+ codegraph install --target=cursor,claude --yes # explicit target list
335
+ codegraph install --target=auto --location=local # detected agents, project-local
336
+ codegraph install --print-config codex # print snippet, no file writes
337
+ ```
338
+
339
+ | Flag | Values | Default |
340
+ |---|---|---|
341
+ | `--target` | `auto`, `all`, `none`, or csv (`claude,cursor,...`) | prompt |
342
+ | `--location` | `global`, `local` | prompt |
343
+ | `--yes` | (boolean) | prompt every step |
344
+ | `--no-permissions` | (boolean) skip Claude auto-allow list | permissions on |
345
+ | `--print-config <id>` | dump snippet for one agent and exit | — |
346
+
347
+ ### 2. Restart Your Agent
348
+
349
+ Restart your agent (Claude Code / Cursor / Codex CLI / opencode / Hermes Agent / Gemini CLI / Antigravity IDE / Kiro) for the MCP server to load.
350
+
351
+ ### 3. Initialize Projects
352
+
353
+ ```bash
354
+ cd your-project
355
+ codegraph init -i
356
+ ```
357
+
358
+ Builds the per-project knowledge graph index. A single global `codegraph install` works in every project you open — no need to re-run the installer per project.
359
+
360
+ That's it — your agent will use CodeGraph tools automatically when a `.codegraph/` directory exists.
361
+
362
+ <details>
363
+ <summary><strong>Manual Setup (Alternative)</strong></summary>
364
+
365
+ **Install globally:**
366
+ ```bash
367
+ npm install -g @colbymchenry/codegraph
368
+ ```
369
+
370
+ **Add to `~/.claude.json`:**
371
+ ```json
372
+ {
373
+ "mcpServers": {
374
+ "codegraph": {
375
+ "type": "stdio",
376
+ "command": "codegraph",
377
+ "args": ["serve", "--mcp"]
378
+ }
379
+ }
380
+ }
381
+ ```
382
+
383
+ **Add to `~/.claude/settings.json` (optional, for auto-allow):**
384
+ ```json
385
+ {
386
+ "permissions": {
387
+ "allow": [
388
+ "mcp__codegraph__codegraph_search",
389
+ "mcp__codegraph__codegraph_explore",
390
+ "mcp__codegraph__codegraph_callers",
391
+ "mcp__codegraph__codegraph_callees",
392
+ "mcp__codegraph__codegraph_impact",
393
+ "mcp__codegraph__codegraph_node",
394
+ "mcp__codegraph__codegraph_status",
395
+ "mcp__codegraph__codegraph_files"
396
+ ]
397
+ }
398
+ }
399
+ ```
400
+
401
+ </details>
402
+
403
+ <details>
404
+ <summary><strong>Agent Tool Guidance</strong></summary>
405
+
406
+ CodeGraph's MCP server delivers its usage guidance to your agent **automatically**, in the MCP `initialize` response — there's no instructions file to manage and nothing is added to your `CLAUDE.md` / `AGENTS.md` / `GEMINI.md`. In short, it tells the agent to:
407
+
408
+ - **Answer structural questions directly with CodeGraph** — it *is* the pre-built index, so a grep/read loop just repeats work it already did. Treat the returned source as already read.
409
+ - **Pick the tool by intent:** `codegraph_explore` for almost anything — "how does X work", a flow/"how does X reach Y", or surveying an area (one call returns the relevant symbols' source grouped by file); `codegraph_search` to just locate a symbol; `codegraph_callers`/`codegraph_callees` to walk call flow; `codegraph_impact` before editing; `codegraph_node` for one specific symbol's full source (it returns every overload for an ambiguous name).
410
+ - **Trust the results — don't re-verify with grep**, and check the staleness banner after edits.
411
+ - If `.codegraph/` doesn't exist yet, offer to run `codegraph init -i`.
412
+
413
+ The exact text is `src/mcp/server-instructions.ts` — the single source of truth.
414
+
415
+ </details>
416
+
417
+ ---
418
+
419
+ ## How It Works
420
+
421
+ ```
422
+ ┌───────────────────────────────────────────────────────────────────┐
423
+ │ Claude Code │
424
+ │ │
425
+ │ "How does a request reach the database?" │
426
+ │ calls CodeGraph tools directly — no Explore sub-agent │
427
+ │ │ │
428
+ └─────────────────────────────────┬─────────────────────────────────┘
429
+
430
+
431
+ ┌───────────────────────────────────────────────────────────────────┐
432
+ │ CodeGraph MCP Server │
433
+ │ │
434
+ │ explore · search · callers · callees · impact · node │
435
+ │ │ │
436
+ │ ▼ │
437
+ │ SQLite knowledge graph │
438
+ │ symbols · edges · files · FTS5 full-text search │
439
+ └───────────────────────────────────────────────────────────────────┘
440
+ ```
441
+
442
+ 1. **Extraction** — [tree-sitter](https://tree-sitter.github.io/) parses source code into ASTs. Language-specific queries extract nodes (functions, classes, methods) and edges (calls, imports, extends, implements).
443
+
444
+ 2. **Storage** — Everything goes into a local SQLite database (`.codegraph/codegraph.db`) with FTS5 full-text search.
445
+
446
+ 3. **Resolution** — After extraction, references are resolved: function calls → definitions, imports → source files, class inheritance, and framework-specific patterns.
447
+
448
+ 4. **Auto-Sync** — The MCP server watches your project using native OS file events. Changes are debounced (2-second quiet window), filtered to source files only, and incrementally synced. The graph stays fresh as you code — no configuration needed.
449
+
450
+ ---
451
+
452
+ ## CLI Reference
453
+
454
+ ```bash
455
+ codegraph # Run interactive installer
456
+ codegraph install # Run installer (explicit)
457
+ codegraph uninstall # Remove CodeGraph from your agents (inverse of install)
458
+ codegraph init [path] # Initialize in a project (--index to also index)
459
+ codegraph uninit [path] # Remove CodeGraph from a project (--force to skip prompt)
460
+ codegraph index [path] # Full index (--force to re-index, --quiet for less output)
461
+ codegraph sync [path] # Incremental update
462
+ codegraph status [path] # Show statistics
463
+ codegraph query <search> # Search symbols (--kind, --limit, --json)
464
+ codegraph files [path] # Show file structure (--format, --filter, --max-depth, --json)
465
+ codegraph callers <symbol> # Find what calls a function/method (--limit, --json)
466
+ codegraph callees <symbol> # Find what a function/method calls (--limit, --json)
467
+ codegraph impact <symbol> # Analyze what code is affected by changing a symbol (--depth, --json)
468
+ codegraph affected [files...] # Find test files affected by changes (see below)
469
+ codegraph serve --mcp # Start MCP server
470
+ codegraph upgrade [version] # Update to the latest release (--check, --force)
471
+ ```
472
+
473
+ ### `codegraph affected`
474
+
475
+ Traces import dependencies transitively to find which test files are affected by changed source files.
476
+
477
+ ```bash
478
+ codegraph affected src/utils.ts src/api.ts # Pass files as arguments
479
+ git diff --name-only | codegraph affected --stdin # Pipe from git diff
480
+ codegraph affected src/auth.ts --filter "e2e/*" # Custom test file pattern
481
+ ```
482
+
483
+ | Option | Description | Default |
484
+ |--------|-------------|---------|
485
+ | `--stdin` | Read file list from stdin | `false` |
486
+ | `-d, --depth <n>` | Max dependency traversal depth | `5` |
487
+ | `-f, --filter <glob>` | Custom glob to identify test files | auto-detect |
488
+ | `-j, --json` | Output as JSON | `false` |
489
+ | `-q, --quiet` | Output file paths only | `false` |
490
+
491
+ **CI/hook example:**
492
+
493
+ ```bash
494
+ #!/usr/bin/env bash
495
+ AFFECTED=$(git diff --name-only HEAD | codegraph affected --stdin --quiet)
496
+ if [ -n "$AFFECTED" ]; then
497
+ npx vitest run $AFFECTED
498
+ fi
499
+ ```
500
+
501
+ ---
502
+
503
+ ## MCP Tools
504
+
505
+ When running as an MCP server, CodeGraph exposes these tools to Claude Code:
506
+
507
+ | Tool | Purpose |
508
+ |------|---------|
509
+ | `codegraph_explore` | **Primary.** Answer almost any question in one call — "how does X work", a flow ("how does X reach Y"), or surveying an area — returning the relevant symbols' verbatim source grouped by file, plus a relationship map and blast radius. Surfaces dynamic-dispatch hops (callbacks, React re-render, interface→impl) grep can't follow. |
510
+ | `codegraph_search` | Find symbols by name across the codebase |
511
+ | `codegraph_callers` | Find what calls a function |
512
+ | `codegraph_callees` | Find what a function calls |
513
+ | `codegraph_impact` | Analyze what code is affected by changing a symbol |
514
+ | `codegraph_node` | Get one specific symbol's details + full source (returns every overload for an ambiguous name) |
515
+ | `codegraph_files` | Get indexed file structure (faster than filesystem scanning) |
516
+ | `codegraph_status` | Check index health and statistics |
517
+
518
+ ---
519
+
520
+ ## Library Usage
521
+
522
+ CodeGraph can be embedded directly. The npm package re-exports its programmatic
523
+ API, so both `import` and `require` resolve the `CodeGraph` class in your own
524
+ process — handy for embedding it in an app (e.g. an Electron main process).
525
+
526
+ ```typescript
527
+ import CodeGraph from '@colbymchenry/codegraph';
528
+ // CommonJS works too:
529
+ // const { CodeGraph } = require('@colbymchenry/codegraph');
530
+
531
+ const cg = await CodeGraph.init('/path/to/project');
532
+ // Or: const cg = await CodeGraph.open('/path/to/project');
533
+
534
+ await cg.indexAll({
535
+ onProgress: (p) => console.log(`${p.phase}: ${p.current}/${p.total}`)
536
+ });
537
+
538
+ const results = cg.searchNodes('UserService');
539
+ const callers = cg.getCallers(results[0].node.id);
540
+ const context = await cg.buildContext('fix login bug', { maxNodes: 20, includeCode: true, format: 'markdown' });
541
+ const impact = cg.getImpactRadius(results[0].node.id, 2);
542
+
543
+ cg.watch(); // auto-sync on file changes
544
+ cg.unwatch(); // stop watching
545
+ cg.close();
546
+ ```
547
+
548
+ Lower-level building blocks are exported from the same entry point for callers
549
+ that drive the graph directly: `DatabaseConnection`, `QueryBuilder`,
550
+ `getDatabasePath`, `initGrammars` / `loadGrammarsForLanguages`, and `FileLock`.
551
+
552
+ **Embedding requirements**
553
+
554
+ - Install from npm (`npm i @colbymchenry/codegraph`) so the matching
555
+ per-platform package — which carries the compiled library and its
556
+ dependencies — is fetched alongside the shim.
557
+ - The API runs on **your** runtime, so it needs **Node 22.5+** for the built-in
558
+ `node:sqlite` (Electron qualifies when its bundled Node is 22.5+). The CLI and
559
+ MCP server are unaffected — they run on the self-contained bundled runtime.
560
+ - TypeScript types ship with the package. As with any Node-targeting library,
561
+ keep `@types/node` available and `skipLibCheck: true` (the common default).
562
+
563
+ ---
564
+
565
+ ## Configuration
566
+
567
+ There isn't any — CodeGraph is zero-config, with **no config file** to write or
568
+ keep in sync. Language support is automatic from the file extension; there's
569
+ nothing to wire up per language.
570
+
571
+ What it skips out of the box:
572
+
573
+ - **Dependency, build, and cache directories** — `node_modules`, `vendor`,
574
+ `dist`, `build`, `target`, `.venv`, `Pods`, `.next`, and the like across every
575
+ [supported stack](#supported-languages) — so the graph is your code, not
576
+ third-party noise. This holds even with no `.gitignore`.
577
+ - **Anything in your `.gitignore`** — honored in git repos via git, and in
578
+ non-git projects by reading `.gitignore` directly (root and nested).
579
+ - **Files larger than 1 MB** — generated bundles, minified JS, vendored blobs.
580
+
581
+ To keep something else out, add it to `.gitignore`. To pull a default-excluded
582
+ directory back **in** (say you really do want a vendored dependency indexed),
583
+ add a negation — `!vendor/`. The defaults apply uniformly, so committing a
584
+ dependency or build directory doesn't force it into the graph; the `.gitignore`
585
+ negation is the explicit opt-in.
586
+
587
+ ## Supported Platforms
588
+
589
+ Every release ships a self-contained build (bundled Node runtime — nothing to
590
+ compile) for all three desktop OSes, on both Intel/AMD (x64) and ARM (arm64):
591
+
592
+ | Platform | Architectures | Install |
593
+ |----------|---------------|---------|
594
+ | Windows | x64, arm64 | PowerShell installer or npm |
595
+ | macOS | x64, arm64 | shell installer or npm |
596
+ | Linux | x64, arm64 | shell installer or npm |
597
+
598
+ See [Get Started](#get-started) for the one-line install commands.
599
+
600
+ ## Supported Agents
601
+
602
+ The interactive installer auto-detects and configures each of these — wiring up
603
+ the MCP server (which delivers its own usage guidance, so no instructions file
604
+ is written):
605
+
606
+ - **Claude Code**
607
+ - **Cursor**
608
+ - **Codex CLI**
609
+ - **opencode**
610
+ - **Hermes Agent**
611
+ - **Gemini CLI**
612
+ - **Antigravity IDE**
613
+ - **Kiro**
614
+
615
+ ## Supported Languages
616
+
617
+ | Language | Extension | Status |
618
+ |----------|-----------|--------|
619
+ | TypeScript | `.ts`, `.tsx` | Full support |
620
+ | JavaScript | `.js`, `.jsx`, `.mjs` | Full support |
621
+ | Python | `.py` | Full support |
622
+ | Go | `.go` | Full support |
623
+ | Rust | `.rs` | Full support |
624
+ | Java | `.java` | Full support |
625
+ | C# | `.cs` | Full support |
626
+ | PHP | `.php` | Full support |
627
+ | Ruby | `.rb` | Full support |
628
+ | C | `.c`, `.h` | Full support |
629
+ | C++ | `.cpp`, `.hpp`, `.cc` | Full support |
630
+ | Objective-C | `.m`, `.mm`, `.h` | Partial support (classes, protocols, methods, `@property`, `#import`, message sends; `.mm` ObjC++ may parse incompletely) |
631
+ | Swift | `.swift` | Full support |
632
+ | Kotlin | `.kt`, `.kts` | Full support |
633
+ | Scala | `.scala`, `.sc` | Full support (classes, traits, methods, type aliases, Scala 3 enums) |
634
+ | Dart | `.dart` | Full support |
635
+ | Svelte | `.svelte` | Full support (script extraction, Svelte 5 runes, SvelteKit routes) |
636
+ | Vue | `.vue` | Full support (script + script-setup extraction, Nuxt page/API/middleware routes) |
637
+ | Liquid | `.liquid` | Full support |
638
+ | Pascal / Delphi | `.pas`, `.dpr`, `.dpk`, `.lpr` | Full support (classes, records, interfaces, enums, DFM/FMX form files) |
639
+ | Lua | `.lua` | Full support (functions, methods with receivers, local variables, `require` imports, call edges) |
640
+ | Luau | `.luau` | Full support (everything in Lua, plus `type`/`export type` aliases, typed signatures, and Roblox instance-path `require`) |
641
+
642
+ ## Measured cross-file coverage
643
+
644
+ Impact and blast-radius queries are only as good as the dependency graph behind them, so coverage is measured rather than asserted. **Fair coverage** = the share of symbol-bearing source files that have at least one *resolved cross-file dependent* — something that imports, calls, references, or (through a framework convention) routes to them — on a real-world benchmark repo per language. The residual is always a genuine static-analysis frontier (runtime dynamic dispatch, reflection / DI containers, framework-convention entry points, vendored third-party code), never hidden by gaming the denominator.
645
+
646
+ | Language | Benchmark repo | Coverage |
647
+ |---|---|---|
648
+ | TypeScript / JavaScript | this repo | 95.8% |
649
+ | Python | psf/requests | 100% |
650
+ | Go | gin-gonic/gin | 96.6% |
651
+ | Rust | BurntSushi/ripgrep | 86.7% |
652
+ | Java | google/gson | 93.3% |
653
+ | C# | jbogard/MediatR | 85.2% |
654
+ | PHP | guzzle/guzzle | 100% |
655
+ | Ruby | sidekiq/sidekiq | 100% |
656
+ | C | redis/redis | 92.2% |
657
+ | C++ | google/leveldb | 94.8% |
658
+ | Objective-C | SDWebImage | 91.6% |
659
+ | Swift | Alamofire | 95.3% |
660
+ | Kotlin | square/okhttp | 96.2% |
661
+ | Scala | gatling/gatling | 91.2% |
662
+ | Dart | flutter/packages | 92.4% |
663
+ | Svelte / SvelteKit | sveltejs/realworld | 100% |
664
+ | Vue / Nuxt | nuxt/movies | 93.5% |
665
+ | Lua | nvim-telescope/telescope.nvim | 84.2% |
666
+ | Luau | dphfox/Fusion | 92.2% |
667
+ | Liquid | Shopify/dawn | 73.8% |
668
+ | Pascal / Delphi | PascalCoin | 75.7% |
669
+
670
+ Framework routing is validated the same way, on a canonical app per framework: Express 100%, FastAPI 98%, Flask 100%, NestJS 96.8%, Gin 96.5%, Axum 100%, Rocket 93.8%, Vapor 100%, Laravel 92%, Rails 89.6%, React Router 100% — and the convention/reflection-heavy ones at their honest static-analysis ceiling: ASP.NET 83.9%, Spring 83.3%, Drupal 78.9%, Django 74.1%.
671
+
672
+ ## Troubleshooting
673
+
674
+ **"CodeGraph not initialized"** — Run `codegraph init` in your project directory first.
675
+
676
+ **Indexing is slow** — Check that `node_modules` and other large directories are excluded. Use `--quiet` to reduce output overhead.
677
+
678
+ **MCP hits `database is locked`** — current builds shouldn't: CodeGraph bundles its own Node runtime and uses Node's built-in `node:sqlite` in WAL mode, where concurrent reads never block on a writer. If you still see it:
679
+
680
+ - **You're on an old (pre-0.9) install.** Reinstall to get the bundled runtime — `curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh` (macOS/Linux), `irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex` (Windows), or `npm i -g @colbymchenry/codegraph@latest`.
681
+ - **`codegraph status` shows `Journal:` other than `wal`** — WAL couldn't be enabled on this filesystem (common on network shares and WSL2 `/mnt`), so reads can block on writes. Move the project (with its `.codegraph/` folder) onto a local disk.
682
+
683
+ **MCP server not connecting** — Ensure the project is initialized/indexed, verify the path in your MCP config, and check that `codegraph serve --mcp` works from the command line.
684
+
685
+ **Missing symbols** — The MCP server auto-syncs on save (wait a couple seconds). Run `codegraph sync` manually if needed. Check that the file's language is supported and isn't inside a `.gitignore`d or default-excluded directory (e.g. `node_modules`, `dist`).
686
+
687
+ ## Star History
688
+
689
+ <a href="https://www.star-history.com/?repos=colbymchenry%2Fcodegraph&type=date&legend=top-left">
690
+ <picture>
691
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=colbymchenry/codegraph&type=date&theme=dark&legend=top-left" />
692
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=colbymchenry/codegraph&type=date&legend=top-left" />
693
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=colbymchenry/codegraph&type=date&legend=top-left" />
694
+ </picture>
695
+ </a>
696
+
697
+ ## License
698
+
699
+ MIT
700
+
701
+ ---
702
+
703
+ <div align="center">
704
+
705
+ **Made for AI coding agents — Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro**
706
+
707
+ [Report Bug](https://github.com/colbymchenry/codegraph/issues) · [Request Feature](https://github.com/colbymchenry/codegraph/issues)
708
+
709
+ </div>