MCPcopy
hub / github.com/abhigyanpatwari/GitNexus

github.com/abhigyanpatwari/GitNexus @v1.6.8 sqlite

repository ↗ · DeepWiki ↗ · release v1.6.8 ↗
10,311 symbols 34,281 edges 2,393 files 1,990 documented · 19%
README

GitNexus

⚠️ Important Notice: GitNexus has NO official cryptocurrency, token, or coin. Any token/coin using the GitNexus name on Pump.fun or any other platform is not affiliated with, endorsed by, or created by this project or its maintainers. Do not purchase any cryptocurrency claiming association with GitNexus.

abhigyanpatwari%2FGitNexus | Trendshift

Join the official Discord to discuss ideas, issues etc!

Discord npm version License: PolyForm Noncommercial OpenSSF Scorecard CI Workflows

Enterprise (SaaS & Self-hosted) - akonlabs.com

Building nervous system for agent context.

Indexes any codebase into a knowledge graph — every dependency, call chain, cluster, and execution flow — then exposes it through smart tools so AI agents never miss code.

https://github.com/user-attachments/assets/172685ba-8e54-4ea7-9ad1-e31a3398da72

Like DeepWiki, but deeper. DeepWiki helps you understand code. GitNexus lets you analyze it — because a knowledge graph tracks every relationship, not just descriptions.

TL;DR: The Web UI is a quick way to chat with any repo. The CLI + MCP is how you make your AI agent actually reliable — it gives Cursor, Claude Code, Antigravity, Codex, and friends a deep architectural view of your codebase so they stop missing dependencies, breaking call chains, and shipping blind edits. Even smaller models get full architectural clarity, making it compete with Goliath models.


Star History

Star History Chart

Two Ways to Use GitNexus

CLI + MCP Web UI
What Index repos locally, connect AI agents via MCP Visual graph explorer + AI chat in browser
For Daily development with Cursor, Claude Code, Antigravity, Codex, Windsurf, OpenCode Quick exploration, demos, one-off analysis
Scale Full repos, any size Limited by browser memory (~5k files), or unlimited via backend mode
Install npm install -g gitnexus No install — gitnexus.vercel.app
Storage LadybugDB native (fast, persistent) LadybugDB WASM (in-memory, per session)
Parsing Tree-sitter native bindings Tree-sitter WASM
Privacy Everything local, no network Everything in-browser, no server

Bridge mode: gitnexus serve connects the two — the web UI auto-detects the local server and can browse all your CLI-indexed repos without re-uploading or re-indexing.


Enterprise

GitNexus is available as an enterprise offering - either as a fully managed SaaS or a self-hosted deployment. Also available for commercial use of the OSS version with proper licensing.

Enterprise includes:

  • PR Review - automated blast radius analysis on pull requests
  • Auto-updating Code Wiki - always up-to-date documentation (Code Wiki is also available in OSS)
  • Auto-reindexing - knowledge graph stays fresh automatically
  • Multi-repo support - unified graph across repositories
  • OCaml support - additional language coverage
  • Priority feature/language support - request new languages or features

Upcoming:

  • Auto regression forensics
  • End-to-end test generation

👉 Learn more at akonlabs.com

💬 For commercial licensing or enterprise inquiries, ping us on Discord or drop an email at founders@akonlabs.com


Development

  • ARCHITECTURE.md — packages, index → graph → MCP flow, where to change code
  • RUNBOOK.md — analyze, embeddings, stale index, MCP recovery, CI snippets
  • GUARDRAILS.md — safety rules and operational “Signs” for contributors and agents
  • CONTRIBUTING.md — license, setup, commits, and pull requests
  • TESTING.md — test commands for gitnexus and gitnexus-web

CLI + MCP (recommended)

The CLI indexes your repository and runs an MCP server that gives AI agents deep codebase awareness.

Quick Start

# Index your repo (run from repo root)
npx gitnexus analyze

That's it. This indexes the codebase, installs agent skills, registers Claude Code hooks, and creates AGENTS.md / CLAUDE.md context files — all in one command.

On npm 11.x? npx can crash during install with Cannot destructure property 'package' of 'node.target' (an npm/arborist bug, before GitNexus runs). Use pnpm instead — it builds the native deps explicitly:

bash pnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter dlx gitnexus@latest analyze

Or install globally (npm install -g gitnexus@latest) and run gitnexus analyze. See #1939.

To configure MCP for your editor, run npx gitnexus setup once — or set it up manually below.

Faster install (no C++ toolchain needed): set GITNEXUS_SKIP_OPTIONAL_GRAMMARS=1 before npm install -g gitnexus to skip the vendored grammar materialize/build for tree-sitter-dart, tree-sitter-proto, tree-sitter-swift, and tree-sitter-kotlin — those four won't be parsed, but install completes in seconds without python3/make/g++. Strict =1 only — any other value falls through to the rebuild. See the tree-sitter-kotlin note below.

About tree-sitter-kotlin: like Dart/Proto/Swift, Kotlin is a vendored grammar (under gitnexus/vendor/tree-sitter-kotlin). Upstream tree-sitter-kotlin ships source only (no prebuilt binaries), so GitNexus builds the Kotlin platform prebuilds itself (via the build-tree-sitter-prebuilds GitHub Actions workflow) and vendors them — the same uniform pipeline now used for Dart, Proto, and Swift (Swift's prebuilds were originally copied from upstream; they're now GitNexus-cross-built too). node-gyp-build selects the right .node at require time, so no C/C++ toolchain is needed. If no prebuild matches your platform-arch, only Kotlin (.kt/.kts) parsing is unavailable; the rest of gitnexus is unaffected.

MCP Setup

gitnexus setup auto-detects your editors and writes the correct global MCP config. You only need to run it once. To configure only selected integrations, pass --coding-agent/-c with a comma-separated list or repeat the option, for example gitnexus setup -c cursor,codex.

Editor Support

Editor MCP Skills Hooks (auto-augment) Support
Claude Code Yes Yes Yes (PreToolUse + PostToolUse) Full
Cursor Yes Yes Yes (postToolUse, manual install) Full
Antigravity (Google) Yes Yes Yes (AfterTool, Gemini CLI hooks schema)¹ Full
Codex Yes Yes MCP + Skills
Windsurf Yes MCP
OpenCode Yes Yes MCP + Skills

Claude Code gets the deepest integration: MCP tools + agent skills + PreToolUse hooks that enrich searches with graph context + PostToolUse hooks that detect a stale index after commits and prompt the agent to reindex.

¹ Antigravity hooks follow the Gemini CLI hooks reference (Antigravity 2.0 is the documented successor to Gemini CLI). Augmentation runs in AfterTool because BeforeTool has no context-injection channel in the Gemini contract — the agent sees graph context appended to the tool result via hookSpecificOutput.additionalContext. Stale-index hints land in the same channel after a successful git commit/merge/rebase/cherry-pick/pull. The schema may evolve if Antigravity-specific hook docs diverge from Gemini CLI's; the implementation will track those changes.

Community Integrations

Built by the community — not officially maintained, but worth checking out.

Project Author Description
pi-gitnexus @tintinweb GitNexus plugin for pipi install npm:pi-gitnexus
gitnexus-stable-ops @ShunsukeHayashi Stable ops & deployment workflows (Miyabi ecosystem)

Have a project built on GitNexus? Open a PR to add it here!

If you prefer manual configuration:

Recommended for fastest startup: install gitnexus globally (npm i -g gitnexus) and run gitnexus setup — this writes an absolute-path MCP config that bypasses npx entirely. The pinned-npx snippets below are a quickstart fallback; on a cold cache the npx install can exceed Claude Code's MCP_TIMEOUT default (~30s).

Claude Code (full support — MCP + skills + hooks):

# macOS / Linux
claude mcp add gitnexus -- npx -y gitnexus@latest mcp

# Windows
claude mcp add gitnexus -- cmd /c npx -y gitnexus@latest mcp

Codex (full support — MCP + skills):

codex mcp add gitnexus -- npx -y gitnexus@latest mcp

Cursor (~/.cursor/mcp.json — global, works for all projects):

{
  "mcpServers": {
    "gitnexus": {
      "command": "npx",
      "args": ["-y", "gitnexus@latest", "mcp"]
    }
  }
}

Antigravity (Google) — ~/.gemini/antigravity/mcp_config.json:

{
  "mcpServers": {
    "gitnexus": {
      "command": "npx",
      "args": ["-y", "gitnexus@latest", "mcp"]
    }
  }
}

gitnexus setup also merges an AfterTool entry into ~/.gemini/settings.json (under the canonical Gemini CLI hooks schema) and installs skills to ~/.gemini/antigravity/skills/. Existing user hooks are preserved. The hook adapter's path is rewritten at install time, so run gitnexus setup rather than hand-editing.

OpenCode (~/.config/opencode/config.json):

{
  "mcp": {
    "gitnexus": {
      "type": "local",
      "command": ["gitnexus", "mcp"]
    }
  }
}

Codex (~/.codex/config.toml for system scope, or .codex/config.toml for project scope):

[mcp_servers.gitnexus]
command = "npx"
args = ["-y", "gitnexus@latest", "mcp"]

CLI Commands

```bash gitnexus setup # Configure MCP for detected editors (one-time; use -c to select) gitnexus uninstall # Preview removal of GitNexus MCP/skills/hooks (add --force to apply) gitnexus analyze [path] # Index a repository (or update stale index) gitnexus analyze --repair-fts # Fast path: rebuild/verify only FTS indexes on existing index data gitnexus analyze --force # Full rebuild: re-parse + graph rebuild + FTS rebuild gitnexus analyze --skills # Generate repo-specific skill files from detected communities gitnexus analyze --skip-embeddings # Skip embedding generation (faster) gitnexus analyze --skip

Extension points exported contracts — how you extend this code

ILookup (Interface)
(no doc) [8 implementers]
gitnexus/test/fixtures/lang-resolution/java-same-arity-cross-file/ILookup.java
CallExtractor (Interface)
(no doc) [7 implementers]
gitnexus/src/core/ingestion/call-types.ts
ScopeTree (Interface)
(no doc) [4 implementers]
gitnexus-shared/src/scope-resolution/scope-tree.ts
OpenRouterModelComboboxProps (Interface)
* Searchable combobox for OpenRouter model selection
gitnexus-web/src/components/SettingsPanel.tsx
Shape (Interface)
(no doc)
gitnexus/bench/impact-pdg/fixtures/nobody-interface-excluded/src/nobody.ts
HarnessProps (Interface)
(no doc)
gitnexus-web/test/unit/use-auto-scroll.test.tsx
ILookup (Interface)
(no doc) [8 implementers]
gitnexus/test/fixtures/lang-resolution/ts-same-arity-cross-file/ilookup.ts
ContractExtractor (Interface)
(no doc) [10 implementers]
gitnexus/src/core/group/contract-extractor.ts

Core symbols most depended-on inside this repo

find
called by 2887
gitnexus/test/fixtures/lang-resolution/ts-same-arity-cross-file/ilookup.ts
getRelationships
called by 1878
gitnexus/test/integration/resolvers/helpers.ts
has
called by 1657
gitnexus/src/core/ingestion/workers/quarantine.ts
childForFieldName
called by 1599
gitnexus/src/core/ingestion/languages/cpp/range-bindings.ts
get
called by 1443
gitnexus/src/core/ingestion/import-resolvers/utils.ts
getNodesByLabel
called by 1069
gitnexus/test/integration/resolvers/helpers.ts
set
called by 1016
gitnexus/src/core/lbug/csv-generator.ts
runPipelineFromRepo
called by 823
gitnexus/src/core/ingestion/pipeline.ts

Shape

Function 6,263
Method 2,149
Interface 913
Class 890
Struct 85
Route 8
Enum 3

Languages

TypeScript88%
Python5%
Java4%
Go3%

Modules by API surface

gitnexus/src/mcp/local/local-backend.ts100 symbols
gitnexus/src/core/ingestion/workers/worker-pool.ts78 symbols
gitnexus/src/core/lbug/lbug-adapter.ts70 symbols
gitnexus/src/core/ingestion/cfg/visitors/typescript-harvest.ts59 symbols
gitnexus/src/core/ingestion/languages/cpp/captures.ts57 symbols
gitnexus/src/core/ingestion/cfg/visitors/swift.ts53 symbols
gitnexus/src/core/ingestion/cfg/visitors/csharp.ts53 symbols
gitnexus-web/src/services/backend-client.ts53 symbols
gitnexus/src/storage/repo-manager.ts52 symbols
gitnexus/src/mcp/local/pdg-impact.ts52 symbols
gitnexus/src/core/ingestion/cfg/visitors/kotlin.ts52 symbols
gitnexus/src/cli/analyze.ts52 symbols

Dependencies from manifests, versioned

@babel/generator7.29.7 · 1×
@babel/parser7.29.7 · 1×
@babel/traverse7.29.7 · 1×
@babel/types7.29.7 · 1×
@ladybugdb/core0.17.0 · 1×
@langchain/anthropic1.3.29 · 1×
@langchain/core1.1.44 · 1×
@langchain/google-genai2.1.30 · 1×
@langchain/ollama1.2.7 · 1×
@langchain/openai1.4.5 · 1×

For agents

$ claude mcp add GitNexus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact