GitNexus Turns a Java Project Into a Code Knowledge Graph That Codex Can Query
AI coding assistants default to filename and keyword search, which fails when a developer needs to know how modules connect, what a change will break, or where a bug sits in a business process. GitNexus pre-computes that relational structure and hands it to the assistant through MCP, turning a grep-level tool into something that can trace call chains and assess impact before code is touched.
GitNexus parses a Git repository and builds a local index that captures files, symbols, call edges, functional clusters, and business processes. That index powers a Web UI for visual exploration and an MCP server that lets tools like Codex query project structure directly. A walkthrough on a multi-module Spring Boot + Camunda 7 project shows the full loop: global install, MCP registration, indexing with optional embeddings and skills, and using Codex to trace deployment, start, and approval chains.
The core command is `gitnexus analyze`, which generates the `.gitnexus` index. Adding `--embeddings` enables semantic search, `--skills` produces repo-specific module context for AI tools, and `--verbose` helps with first-run troubleshooting. Once indexed, `gitnexus serve` starts a local Web UI at port 4747 that overlays a file tree with a node-edge graph, letting developers click from a high-connection class straight into its source.
Codex, connected via `codex mcp add`, reads `context`, `clusters`, and `processes` resources to build a project map before diving into source files. The result is not just class locations but end-to-end call chains: a deployment flow from REST controller through BPMN utilities to Camunda's `repositoryService`, a start flow through `runtimeService`, and an approval flow through `taskService`. For debugging and refactoring, `impact` and `detect-changes` show what breaks before a commit lands.
GitNexus shifts the AI-coding integration model from file search to pre-computed relational context, which matters most in multi-module enterprise projects where grep cannot reveal architectural boundaries.
The two-pass indexing strategy (base index first, then embeddings and skills) is a practical pattern that avoids the common pitfall of slow, resource-heavy first runs on large codebases.
Exposing `impact` and `detect-changes` through MCP means an AI assistant can perform change-risk analysis before a developer commits, a workflow that IDEs rarely make programmatic.
The tool explicitly does not handle reflection or dynamic calls, so its value is in fast structural triage rather than exhaustive coverage — a tradeoff that matches how senior developers actually onboard to unfamiliar code.