TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/abhigyanpatwari/GitNexus/llms.txt
Use this file to discover all available pages before exploring further.
setup command automatically detects installed AI editors and configures MCP integration so they can access the GitNexus knowledge graph.
Usage
This is a one-time global command. You only need to run it once after installing GitNexus.
What It Does
The setup command:- Detects installed editors (Cursor, Claude Code, OpenCode, Windsurf)
- Writes MCP configuration to each editor’s global config file
- Installs agent skills for editors that support them
- Registers Claude Code hooks for automatic context enrichment
Supported Editors
| Editor | MCP | Skills | Hooks | Config Location |
|---|---|---|---|---|
| Claude Code | ✅ | ✅ | ✅ | ~/.claude/settings.json |
| Cursor | ✅ | ✅ | — | ~/.cursor/mcp.json |
| OpenCode | ✅ | ✅ | — | ~/.config/opencode/config.json |
| Windsurf | ✅ | — | — | Manual setup required |
Output
MCP Configuration
The setup command writes the following MCP entry to each editor’s config:Claude Code Special Setup
For Claude Code, you need to run an additional command aftergitnexus setup:
Skills Installation
The following agent skills are installed:- gitnexus-exploring — Navigate unfamiliar code using the knowledge graph
- gitnexus-debugging — Trace bugs through call chains
- gitnexus-impact-analysis — Analyze blast radius before changes
- gitnexus-refactoring — Plan safe refactors using dependency mapping
- gitnexus-guide — Quick reference for all tools and workflows
- gitnexus-cli — CLI command reference
Skill Locations
| Editor | Location |
|---|---|
| Claude Code | ~/.claude/skills/gitnexus-*/ |
| Cursor | ~/.cursor/skills/gitnexus-*/ |
| OpenCode | ~/.config/opencode/skill/gitnexus-*/ |
Hooks Installation (Claude Code Only)
GitNexus registers a PreToolUse hook that automatically enriches grep/glob/bash calls with knowledge graph context. Hook location:~/.claude/hooks/gitnexus/gitnexus-hook.cjs
Configuration:
SessionStart hooks are disabled on Windows due to a Claude Code bug (#23576). Session context is delivered via
CLAUDE.md instead.Manual Configuration
If you prefer not to usegitnexus setup, you can configure manually:
Cursor
Edit~/.cursor/mcp.json:
Claude Code
OpenCode
Edit~/.config/opencode/config.json:
Windsurf
Add to~/.windsurf/mcp.json (global) or project-specific config. Refer to Windsurf’s MCP documentation.
Verification
After running setup:-
Index a repository:
- Open in your editor
-
Check MCP connection:
- Claude Code: Should auto-connect on startup
- Cursor: Check MCP status in settings
- OpenCode: Check MCP panel
-
Test a tool:
Troubleshooting
Editor Not Detected
The setup command looks for these directories:- Cursor:
~/.cursor/ - Claude Code:
~/.claude/ - OpenCode:
~/.config/opencode/
MCP Connection Fails
Ensurenpx is available:
Skills Not Appearing
Check skill installation:Next Steps
Index Repository
Run analyze to index your first repo
MCP Integration
Learn about MCP tools and workflows