GitNexus: Graph-Powered Code Intelligence Without Servers

The Problem

Ever tried using an AI assistant like Claude or Cursor to refactor code, only for it to ship edits that break half the project? AI tools are great at syntax but blind to architecture. They miss dependencies, botch call chains, and will happily delete a function that’s referenced three layers deep. Developers need smarter tools that actually understand their codebases.

What This Does

GitNexus indexes your codebase as a knowledge graph — every function, dependency, and execution flow mapped out — and makes it accessible in two ways: via a browser-based Web UI (gitnexus-web/) or a CLI with MCP server (gitnexus/).

Under the hood, the heavy lifting happens in gitnexus-web/src/core/ingestion/, which uses Tree-Sitter to parse your code into an abstract syntax tree (AST). This feeds into KuzuDB for graph storage, enabling both in-browser exploration and persistent local indexing. The CLI (gitnexus/src/cli/) connects AI agents like Claude Code directly to this graph, equipping them with deep architectural context. No more blind edits or missed dependencies.

For convenience, the Web UI (gitnexus-web/src/App.tsx) lets you upload repos or ZIPs and explore the graph visually — perfect for quick analysis or demos. But for serious work, use the CLI: npx gitnexus analyze indexes your repo, auto-generates context files like AGENTS.md, and sets up an MCP server for your AI tools.

Real-World Use

Say you’re debugging a spaghetti mess in a legacy codebase. Start by running npx gitnexus analyze in the repo root. This creates a graph showing function relationships, dependencies, and execution flows. Open AGENTS.md for a human-readable summary, connect your AI agent to the MCP server, and let it navigate the graph. Want to visualize the graph? Spin up the Web UI with gitnexus serve to explore the same indexed data interactively.

Here’s the kicker: GitNexus doesn’t need a backend. The Web UI runs entirely in your browser using KuzuDB WASM, and the CLI operates locally with native bindings. Your code stays private. No uploading required.

The Bottom Line

GitNexus is a clever tool for making AI agents less dumb about codebases. The browser-based UI is great for quick exploration, while the CLI + MCP server is a powerful (but slightly complex) setup for integrating with your AI tools. If you’re working on large or messy projects and need smarter AI, it’s worth trying. For small repos? Honestly, this might be overkill.