GitNexus: Graph-Based Code Intelligence That Runs Entirely in Your Browser
Hook
What if your AI coding assistant could see every dependency, call chain, and execution flow in your codebase without sending a single line of code to a server?
Context
AI coding assistants have a fundamental problem: they treat code like text. They’ll confidently refactor a function without realizing it breaks three downstream services, or suggest removing a ‘dead’ import that’s actually critical to a module six layers deep. This happens because many AI tools understand syntax but lack architectural awareness.
GitNexus takes a different approach. Instead of feeding your codebase into an LLM as context chunks, it builds a knowledge graph that maps every relationship in your code—imports, function calls, type dependencies, execution flows. Then it exposes this graph to AI agents through the Model Context Protocol (MCP), giving them architectural awareness. The radical part? It runs entirely client-side. The web UI uses WebAssembly to parse and graph code in your browser. The CLI indexes locally and never phones home. For teams with sensitive codebases, this zero-server architecture means you can leverage AI intelligence without the privacy trade-off.
Technical Insight
GitNexus is built on two core technologies: Tree-sitter for parsing and LadybugDB for graph storage. Tree-sitter decomposes source files into concrete syntax trees, extracting every import statement, function definition, and method call. LadybugDB then stores these as nodes and edges—a module node links to function nodes, which link to their call sites, which link to dependencies. The result is a queryable graph that answers questions like ‘what breaks if I change this interface?’ or ‘what’s the execution path from endpoint to database?’
The architecture splits into two deployment modes. The web UI compiles Tree-sitter and LadybugDB to WebAssembly, running entirely in-browser with in-memory storage. You can drag a ZIP file into gitnexus.vercel.app and get an interactive graph with zero backend. The trade-off is scale—browser memory limits you to roughly 5,000 files. For larger repos, the CLI uses native Tree-sitter bindings and persists the graph to disk with LadybugDB’s native storage layer.
The key feature is MCP integration. When you run npx gitnexus analyze, it indexes your repo and spins up an MCP server that exposes tools AI agents can call. The README describes these tools as enabling agents to search code with graph context, trace dependencies, follow call chains, and analyze blast radius—though specific tool names and APIs may vary in the implementation.
When an AI agent in Claude Code or Cursor queries ‘how does authentication work?’, the MCP tools can return not just matching files but architectural context: the auth middleware, every route that uses it, database models it touches, and environment variables it reads. This is what the README describes as Graph RAG: retrieval augmented by graph structure instead of just embeddings.
Claude Code gets special treatment through pre and post-tool hooks. The PreToolUse hook intercepts queries before they hit the LLM, enriching them with graph context. If you ask ‘refactor the payment service’, the hook can inject dependency info so Claude knows which modules will break. The PostToolUse hook runs after commits, triggering re-indexing so the graph stays current. Other editors get partial MCP support—the README’s editor table shows Cursor, Codex, Windsurf, and OpenCode support MCP tools but lack hook integration.
Bridge mode connects the two deployment modes. Run gitnexus serve and the web UI auto-detects your local MCP server, letting you browse CLI-indexed repos through the browser interface without re-uploading or re-indexing. This allows you to index once locally, then explore through the browser.
The README describes GitNexus as ‘building nervous system for agent context’—just as a nervous system routes signals automatically, GitNexus routes architectural context to agents. When smaller models get graph-enriched queries, they can better compete with larger models because they’re reading explicit relationships from the graph rather than inferring them.
Gotcha
The web UI’s ~5,000-file limit is a real constraint. If you’re working with a large monorepo, you’ll hit browser memory walls. Bridge mode helps by offloading indexing to the CLI, though this adds setup complexity.
The PolyForm Noncommercial license is more restrictive than typical open-source licenses. You can use GitNexus for personal projects or internal tooling, but commercial use requires enterprise licensing from Akon Labs (available at akonlabs.com). This isn’t Apache or MIT—read the license carefully if you’re integrating it into commercial workflows. The README explicitly lists several features as enterprise-only, including OCaml support, PR review automation, auto-reindexing, and multi-repo support, suggesting core functionality may expand behind the paywall.
Hook integration varies significantly by editor—only Claude Code gets the full PreToolUse/PostToolUse workflow according to the README’s editor support table, making it substantially more powerful there than in other environments. Other editors like Cursor, Windsurf, and OpenCode get MCP tools but lack the automatic context enrichment and post-commit reindexing that make the experience seamless.
Verdict
Use GitNexus if you’re building with AI coding assistants and need them to understand architecture, not just syntax. It’s particularly valuable for large, interconnected codebases where LLMs routinely miss dependencies—microservices, modular monoliths, anything with deep call chains. The zero-server architecture makes it ideal for teams with strict data privacy requirements who can’t send code to third-party APIs. Claude Code users get the most value thanks to full hook integration as documented in the README. Skip it if you’re working on small, single-file scripts where architectural context doesn’t matter, or if you need truly open-source licensing for commercial use without vendor negotiation. Also consider alternatives if your editor isn’t Claude Code and you want the full automated agent experience—partial MCP support in other editors means you’re missing the auto-reindexing and context enrichment hooks that differentiate GitNexus from simpler code search tools.