The Problem Developers need a way to explore a codebase’s full dependency, call‑graph and type information without spinning up a server or installing heavyweight analysis tools. Current IDE plugins surface only local symbols; they miss cross‑file bindings, generated code and runtime‑only paths, forcing engineers to guess architecture or run ad‑hoc scripts.

What This Does GitNexus builds a client‑side knowledge‑graph of any GitHub repository or ZIP archive and exposes it through a visual Web UI and a CLI‑driven “MCP” (model‑connect‑pipeline). The core ingestion pipeline lives under gitnexus/src/core/ingestion/ and parses source files with Tree‑sitter, extracts types (type‑extractors/shared.ts), builds a graph (graph/graph.ts), and persists it in LadybugDB (WASM in the browser, native in the CLI). The UI (gitnexus-web/src/App.tsx) consumes the same graph via the local MCP server (gitnexus/src/cli/serve.ts). A built‑in Graph‑RAG agent (gitnexus/src/core/llm/) can answer natural‑language queries over the graph.

How It Is Wired

  1. Entry point – gitnexus/src/cli/serve.ts exports serveCommand. Running gitnexus serve starts an Express server that loads the persisted graph and registers LLM endpoints.
  2. Ingestion flow – gitnexus/src/core/ingestion/pipeline.ts (oversized, 2624 lines) orchestrates workers (workers/parse-worker.ts). parseWorker calls extractSimpleTypeName, setLanguage, clearCaches (30 functions, 20 classes) and ultimately invokes mapToGraph. mapToGraph repeatedly calls generateId (81 calls) and addRelationship (24 calls) to populate graph/graph.ts.
  3. Graph persistence – gitnexus/src/core/lbug/lbug-adapter.ts wraps LadybugDB; functions like runWithSessionLock and initLbug read/write the DB (30+ call sites).
  4. LLM bridge – gitnexus/src/core/llm/index.ts receives a user prompt, calls wikiCommand → prompt (13 calls) and ultimately executeQuery which hits the DB.
  5. Hotspots – gitnexus/src/core/ingestion/utils/ast-helpers.ts is a hub (66 inbound imports) and part of a circular import cycle, so changes here have a wide blast radius. gitnexus/src/core/ingestion/type-extractors/shared.ts also sits in the cycle and is called from 26 other files. * Large files (pipeline.ts, tree-sitter-queries.ts, local-backend.ts) exceed 2000 lines and should be split for maintainability.

How To Use It

# Clone the repo
git clone https://github.com/moses-y/GitNexus.git
cd GitNexus

# Install the CLI globally (npm is the package manager)
npm install -g gitnexus

# Index a repository (example: a local copy of a project)
gitnexus ingest /path/to/target-repo

# Start the MCP server (exposes the graph to the UI and LLM agents)
gitnexus serve   # runs serveCommand in gitnexus/src/cli/serve.ts

# Open the browser UI (auto‑detects the local server)
open https://gitnexus.vercel.app   # or navigate to the hosted demo

The CLI reads optional configuration from eval/.env.example. No additional secrets are required; the project ships a license file and CI definitions (.github/workflows/*.yml).

Real‑World Use A development team can run gitnexus ingest nightly on their monorepo. The resulting graph is served locally; developers query the UI (“Which modules import UserService?”) or let an LLM (Claude, Cursor, etc.) augment PR reviews via the MCP endpoint. Because all data stays on the developer’s machine, privacy is preserved and no network latency is introduced.

Code Health & Issues

  • HIGH – Steps in .github/workflows/ci-e2e.yml discard exit codes, potentially masking build failures.
  • MEDIUM – GITHUB_TOKEN permissions are not scoped (ci-e2e.yml).
  • MEDIUM – No Dependabot/Renovate configuration for 6 manifests.
  • MEDIUM – Dockerfile.test uses an unpinned base image (node:20‑bookworm).
  • MEDIUM – CI lacks a dependency‑vulnerability scan.
  • MEDIUM – Checkout action keeps credentials persisted; persist-credentials: false is missing.
  • MEDIUM – Dockerfile runs as root; no non‑root USER defined.

Static analysis also reports 24 import‑cycle members, high branching density in several ingestion helpers, and three oversized files (>2500 LOC). These are the primary maintainability concerns.

The Bottom Line GitNexus delivers a fully client‑side code‑graph engine with a usable UI and a CLI that can feed AI agents, making deep code insight accessible without server infrastructure. The architecture is solid, but the ingestion layer suffers from circular imports, large monolithic files, and a handful of CI hygiene issues that should be addressed before production use. Teams comfortable with TypeScript and willing to invest in refactoring the ingestion core will find it a valuable addition to their tooling stack.