Documentation

Everything you need to get GraphMind running and make the most of it.

Install

Desktop App — Mac & Windows

No terminal needed. MCP, hooks, and skill are configured automatically on first launch.

Download ↗
Homebrew — macOS / Linux
brew install aouicher/graphmind/graphmind
brew install --cask aouicher/graphmind/graphmind

Then run graphmind setup once.

Quick start

1
Global setup (once)
graphmind setup

Configures MCP, hooks, and skill for Claude Code, Cursor, Windsurf and more.

2
Per-project init
cd ~/projects/myapp
graphmind init

Registers the project, installs git hooks, and builds the graph.

3
Verify

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:

Claude Code / Cursor / Windsurf
{
  "mcpServers": {
    "graphmind": {
      "command": "graphmind",
      "args": ["mcp"]
    }
  }
}
Claude Desktop (full path needed)
{
  "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.

Claude Code search hook

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.

Claude Code skill

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
Git hooks

Rebuilds the graph in the background after commit, merge/pull, rebase and branch switch, registers new worktrees, and prints the impact of your changes before push. Installed in the repo's git dir, shared by all its worktrees. Repos using husky or a shared core.hooksPath are left untouched — GraphMind prints the lines to add.

graphmind install hook-git
CLAUDE.md sync

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

Git worktrees v0.3.0

Run several agents in parallel, each in its own worktree. Every checkout gets its own graph — answers always match the branch you are on — while memory is shared across the whole repo.

Zero setup

git worktree add, claude --worktree, or any GraphMind command from a new checkout registers it automatically. Identity comes from git, never from folder names.

Fast first build

A new worktree's graph starts as a copy of the main checkout's, then updates in the background — only the files that differ are parsed.

Shared memory

Decisions and conventions saved from any worktree are visible from all of them. graphmind list shows which project a worktree belongs to.

Nested worktrees

Claude Code's .claude/worktrees/<name> resolve to themselves — never to the main checkout's graph.

git worktree add ../myapp-feature -b feature
cd ../myapp-feature && graphmind list
#  myapp-feature  ~/projects/myapp-feature  [feature, worktree of myapp]
→

An MCP server answers for the checkout it was started in. When an agent moves into another worktree mid-session, it passes project=<worktree path> to GraphMind tools — the server tells agents to do so.

✓

Upgrading from an earlier version needs nothing: existing projects, graphs and memory are kept as they are, and the new git hooks are added automatically to repos that already had GraphMind's hooks.

MCP Tools

25 tools exposed to your AI assistant via MCP. They are called automatically — you just ask questions in natural language.

Search & Discovery
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
Impact & Dependencies
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
Code Quality
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
Memory
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
Session & Status
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 (worktrees show their branch)
graphmind clean --stale Unregister projects and worktrees whose directory is gone
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.

TypeScript
JavaScript
Python
Rust
Go
Ruby
Java
C++
C#
Swift
Kotlin
PHP
Scala
SQL
Dockerfile
HCL
YAML
Bash · TOML · SCSS · CSS · HTML · GraphQL · R · Dart · Objective-C · Perl · + more