Skip to content
>_MyGearHut

GitNexus — Code Intelligence Setup Guide

Index any repo into a local knowledge graph and wire GitNexus MCP into Cursor or Claude Code — impact analysis, call chains, and safer agent edits.

Why agents need a map

LLM coding tools see files, not architecture. They rename a function without knowing forty callers exist. GitNexus indexes a repository into a local knowledge graph — dependencies, call chains, clusters, execution flows — and exposes it via MCP tools so agents query structure before editing.

Zero-server option: Web UI runs in-browser for exploration. For daily agent work, MyGearHut recommends CLI + MCP on repos you actively ship.

Project: github.com/abhigyanpatwari/GitNexus · Web demo: gitnexus.vercel.app

Two ways to use GitNexus

ModeBest for
Web UIQuick tour of unfamiliar OSS repos
CLI + MCPCursor, Claude Code, Windsurf — production agent loops

This guide focuses on CLI + MCP.

Prerequisites

  • Node.js 18+ and npm
  • Git repo on disk
  • MCP-capable editor (Cursor, Claude Code, etc.)

Install CLI

npm install -g gitnexus

Verify:

gitnexus --version

One-time MCP setup

From any directory:

gitnexus setup

This detects installed editors, registers MCP servers, may add hooks for Claude Code, and can scaffold AGENTS.md / CLAUDE.md snippets — review diffs before committing.

Index your repository

cd ~/projects/my-app
gitnexus analyze

Force full rebuild after large refactors:

gitnexus analyze --force

Index data lives under .gitnexus/ in the repo — add to .gitignore if you do not want it committed (team policy call).

MCP tools agents gain (core set)

ToolWhat it does
queryHybrid search — find symbols, flows, processes
context360° view of a symbol — refs, callers, clusters
impactBlast radius — what breaks if you change X
detect_changesMap git diff → affected processes
renameCoordinated multi-file rename using graph
cypherRaw graph queries (power users)
list_reposAll indexed repos on your machine

Exact tool count grows between releases — run MCP catalog in your editor after updates.

Wire into Claude Code / Cursor

After gitnexus setup, restart the editor. Confirm MCP server gitnexus is connected (green in MCP panel).

Starter prompt once indexed:

Before editing, use GitNexus impact tool on [function/module].
Summarize callers and risk. Then propose a minimal plan.
Do not edit until I approve.

Agents with graph access make fewer "surprise breakages."

Local backend + Web UI (optional)

Serve all indexed repos without re-uploading:

gitnexus serve

Open the Web UI — it detects the local server. Chat exploration uses the same graph; good for onboarding teammates.

Manual MCP stdio mode:

gitnexus mcp

Editors usually manage this via setup; manual mode helps debugging.

Daily operator workflows

Pre-refactor

  1. gitnexus analyze if index stale
  2. Ask agent: impact on symbol
  3. Plan mode → implement → run tests

Pre-commit

Use detect_changes on my current git diff.
List affected processes I should retest.

Onboarding to legacy codebase

  1. Index repo
  2. Web UI or agent query for entrypoints
  3. Document findings in team CLAUDE.md

Performance notes

  • Large monorepos: first index takes time; incremental updates are faster
  • Web-only mode is browser-memory limited (~thousands of files)
  • CLI local index scales better for daily agent use

Check license (PolyForm Noncommercial for upstream) before commercial redistribution. Fixes: MCP missing → gitnexus setup + restart editor; stale graph → analyze --force; wrong repo → list_repos and explicit repo param.

Pair with MyGearHut stack

Copy-paste CLAUDE.md block

## GitNexus
- Run impact/detect_changes before multi-file refactors
- Index refreshed weekly or after architecture changes
- Prefer graph-backed rename over manual search-replace

Safer agent edits start with a map. More setup guides in the MyGearHut free libraryThe Gear Drop for MCP and agent ops updates.

Want more gear like this?

The guide above is yours free — subscribe for weekly drops, templates, and tool updates.

One practical AI email a week. Unsubscribe anytime.