Install
No terminal needed. MCP, hooks, and skill are configured automatically on first launch.
Download ↗brew install aouicher/graphmind/graphmind
brew install --cask aouicher/graphmind/graphmind Then run graphmind setup once.
Quick start
graphmind setup Configures MCP, hooks, and skill for Claude Code, Cursor, Windsurf and more.
cd ~/projects/myapp
graphmind init Registers the project, installs git hooks, and builds the graph.
Ask your AI assistant: "Run gm_status to check GraphMind is connected."
Connect to your AI assistant
Run graphmind setup to auto-configure everything. Or add manually to your MCP config:
{
"mcpServers": {
"graphmind": {
"command": "graphmind",
"args": ["mcp"]
}
}
} {
"mcpServers": {
"graphmind": {
"command": "/opt/homebrew/bin/graphmind",
"args": ["mcp"]
}
}
} Run which graphmind to find the path.
Hooks & Skill
After graphmind setup, three layers are automatically active in Claude Code. Each can also be installed individually.
Intercepts grep/find/rg commands and replaces them with graph-aware searches. Also pre-fetches relevant context before each prompt.
graphmind install hook-claude PreToolUse — Rewrites grep/find/rg → graphmind search SessionStart — Loads project context (stats, structure) UserPromptSubmit — Pre-fetches relevant graph context per prompt PostToolUse — Enriches results with graph-aware suggestions Smart deduplication: identical searches within 5 minutes are skipped (0 tokens). Exhaustive patterns like grep -c or pipes to wc are passed through as-is.
Adds a /graphmind skill to Claude Code with a 3-layer strategy: graph → memory → raw files. Guides your AI to use GraphMind tools in the right order.
graphmind install skill Installs post-commit (auto-rebuild graph) and pre-push (impact check) hooks in the current project.
graphmind install hook-git Keeps your CLAUDE.md files up to date with graph stats — symbol count, languages, top files — so Claude Code always has accurate project context.
graphmind sync Persistent memory
Store architectural decisions, conventions, and context that persist across sessions. Your AI won't forget what you decided last week.
After running graphmind setup, memory is handled automatically — the Claude Code skill and hooks inject stored context before each session. No manual steps needed.
graphmind memory add "all DB writes go through Repository" --type convention graphmind memory add "PaymentService is the billing entry point" --type decision graphmind memory add "never expose raw DB ids in the API" --priority | Command | Description |
|---|---|
graphmind memory add "<text>" | Store a convention, decision, or context note |
graphmind memory add "<text>" --type decision | Tag by type: convention, decision, bug, note |
graphmind memory add "<text>" --priority | Always inject in every session automatically |
graphmind memory read | List all stored memories |
graphmind memory prune | Remove stale entries interactively |
MCP Tools
25 tools exposed to your AI assistant via MCP. They are called automatically — you just ask questions in natural language.
gm_search | Find symbols by name, keyword, or intent — FTS + semantic + graph ranking |
gm_fn | Full detail for a symbol: source, callers, callees |
gm_file | Read raw source of a file from the graph |
gm_outline | File outline — all symbols with line numbers |
gm_query | Graph query — find symbols by pattern |
gm_map | Project overview ranked by connectivity |
gm_fn_impact | Blast radius — all transitive callers of a function |
gm_callers | Direct callers of a symbol |
gm_callees | Direct callees of a symbol |
gm_who_calls | Transitive caller chain (BFS up to N depth) |
gm_deps | File or symbol dependency map |
gm_cross_links | Cross-project dependency edges |
gm_cycles | Detect dependency cycles in the graph |
gm_dead_code | Find symbols with zero callers across all projects |
gm_similar | Semantically similar symbols — find duplication |
gm_listeners | Find event listeners for a domain event |
gm_diff | Structural diff between two versions |
gm_memory_add | Store an architectural decision, convention, or context note |
gm_memory_read | Recall all stored architectural knowledge |
gm_memory_write | Overwrite a specific memory entry |
gm_memory_prune | Remove stale or outdated memory entries |
gm_status | Check GraphMind connection and index status |
gm_context | Load project context into your AI assistant session |
gm_export | Export graph as Mermaid or DOT for documentation |
gm_rebuild | Rebuild the index from scratch |
CLI Reference
All commands available in the graphmind CLI.
| Command | Description |
|---|---|
graphmind setup | One-time global setup — configures MCP, hooks, skill for all AI assistants |
graphmind init | Per-project setup — register, install git hooks, build graph |
graphmind index . | Build or rebuild the code graph for current directory |
graphmind search "<query>" | Search symbols by text or intent |
graphmind fn "<symbol>" | Show symbol detail: source, callers, callees |
graphmind file "<path>" | Read raw file content from the graph |
graphmind outline "<path>" | Show hierarchical symbol tree for a file |
graphmind dead-code | Find unreachable symbols (zero callers) |
graphmind similar | Find structurally similar symbol pairs |
graphmind who-calls "<symbol>" | Trace transitive callers (BFS) |
graphmind map | Show graph overview ranked by connectivity |
graphmind memory add "<text>" | Store a convention or architectural decision |
graphmind memory read | List all stored memories |
graphmind memory prune | Remove stale entries |
graphmind mcp | Start the MCP server |
graphmind list | List all registered projects |
graphmind export --format mermaid | Export graph as Mermaid or DOT |
Supported languages
Supported languages
30+ languages via tree-sitter. GraphMind parses AST symbols — functions, classes, methods, types — for all of them.