codegraph icon indicating copy to clipboard operation
codegraph copied to clipboard

What's the differcence between gitnexus and codegraph?

Open 0DennisLee0 opened this issue 6 months ago β€’ 5 comments

It seems similar to this project https://github.com/abhigyanpatwari/GitNexus

I wonder what's the difference between this two. And in which aspect, current project do better

0DennisLee0 avatar May 23 '26 06:05 0DennisLee0

I also have the same questionπŸ€”

r1ddx2 avatar May 23 '26 14:05 r1ddx2

Well ... I dont know the projects in detail but I guess thats a big difference for lots of users ..

GitNexus: Free for non-commercial use β€’ Commercial licensing available

ontec-xrail avatar May 24 '26 16:05 ontec-xrail

Looks like GitNexus also support RAG.

zl7261 avatar May 26 '26 01:05 zl7261

Good question β€” they're more alike than different at the core, so let me give an honest side-by-side rather than a pitch. (Disclosure: I maintain CodeGraph, so weight accordingly.)

What's the same

Both are tree-sitter-based knowledge graphs of your code, stored in an embedded DB, served to AI agents over MCP. Both ship a CLI installer that writes config into your editor. Both are local-first β€” no LLM at index or query time for the graph itself, and no required cloud service. If you only ever asked "what calls X" or "find symbol Y," you'd be hard-pressed to tell them apart.

Where GitNexus has things CodeGraph doesn't

  • Pre/PostToolUse agent hooks that inject graph context before the agent's tool calls and auto-flag a stale index after commits. CodeGraph relies on a persistent file watcher + a per-file staleness banner in MCP responses β€” different model, less proactive.
  • Multi-repo / monorepo "groups" with a contract registry + cross-impact across services.
  • Pre-computed Processes (named execution flows) and Communities (Leiden clusters) as first-class graph entities. CodeGraph computes flows on demand via trace.
  • Arbitrary Cypher as an MCP tool. CodeGraph's tool surface is fixed.
  • LLM-generated wiki docs from the graph (gitnexus wiki).
  • Hybrid BM25 + vector embeddings as an opt-in (analyze --embeddings, downloads a ~90MB ONNX model). CodeGraph is structural + FTS5 only β€” no embeddings.
  • In-browser web UI with graph viz + chat. CodeGraph has nothing comparable.
  • shape_check / api_impact β€” response-shape vs. consumer-property-access mismatch detection across services.

Where CodeGraph has the edge

  • License: MIT. GitNexus is PolyForm Noncommercial 1.0.0 β€” free for personal/non-commercial use, paid commercial license required otherwise. For many teams that's a hard blocker.
  • Runtime: ships a bundled Node 24 via a thin shim, so npm install -g @colbymchenry/codegraph (or curl | sh) just works on any system Node β‰₯ 18 with no toolchain. GitNexus requires Node β‰₯ 22 and a C++ toolchain (python3, make, g++) at install time for its vendor-built grammars (Swift, Dart, Proto).
  • File watcher with sub-second sync vs. git-event-triggered reindex via hooks. If you edit a file and immediately ask the agent about it, CodeGraph's graph is already current.
  • Dynamic-dispatch synthesizers β€” React re-render (setStateβ†’render), JSX child (renderβ†’child component), callback/observer, EventEmitter. Tree-sitter can't see these statically, so without them an agent reads source to reconstruct the flow. GitNexus's "Process" abstraction is computed from static call edges + entry-point heuristics, which won't bridge runtime/reactive dispatch boundaries.
  • 8 agent installer targets (Claude Code, Cursor, Codex, opencode, Kiro, Gemini, Antigravity, Hermes) vs. 6. They've got Windsurf we don't; we've got Hermes/Kiro/Gemini they don't.

How I'd pick between them

  • You want a hookable agent assistant that proactively injects context and is fine paying for commercial use β†’ GitNexus.
  • You're shipping a commercial product, want zero setup friction, and care about a graph that stays current as you type (and follows React/EventEmitter-style dynamic flow) β†’ CodeGraph.
  • You want a browser UI with graph visualization β†’ GitNexus (CodeGraph has none).
  • You want pre-computed clusters / named flows / multi-repo cross-impact out of the box β†’ GitNexus.
  • You want semantic/embedding RAG over your code β†’ GitNexus (opt-in). CodeGraph deliberately stays structural-only.

Both are legitimate projects solving slightly different shapes of the same problem. Closing this since the original question's been answered β€” happy to dig into any specific feature in a follow-up issue.

colbymchenry avatar May 27 '26 04:05 colbymchenry

@colbymchenry can't codegraph add what's "missing"?

ftzi avatar Aug 18 '26 14:08 ftzi