Your codebase has a shape. Now your AI can see it. And remember it. GraphMind turns your codebase into a knowledge graph your AI can query, navigate, and remember.
$ npx -y skills add aouicher/graphmind --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
Repo: aouicher/graphmind
What's inside
Your codebase has a shape. Now your AI can see it. And remember it.
GraphMind turns your codebase into a knowledge graph your AI can query, navigate, and remember. Ask about dead code, dependencies, or blast radius โ and get answers grounded in your actual architecture.
Up to 5,700ร fewer tokens than raw search (~10M tokens saved per session). Works with Claude Code, Cursor, Windsurf, Cline, Zed, Continue, and any MCP-compatible AI assistant.
Every new AI session starts from zero. Your assistant re-reads the entire codebase, re-discovers architecture, and forgets every decision you explained last time. Across multiple projects, there's zero visibility into shared dependencies.
graphmind fixes this with four layers:
Everything runs locally. No cloud. No open ports by default. No telemetry.

Comparison of token usage: grep -r (raw file search) vs graphmind search for the same query on a ~100k LOC codebase. graphmind returns ranked, structured results in under 300 tokens vs 1.5M+ for raw grep output.
Download the .dmg from Releases. The app installs the CLI for you and runs a guided onboarding that configures MCP, hooks, skill, and embeddings โ no terminal needed.

| Platform | Asset |
|---|---|
| macOS (Apple Silicon) | GraphMind-macos-arm64.dmg |
| macOS (Intel) | GraphMind-macos-x64.dmg |
Linux / Windows: CLI only โ use the shell script or direct download below.
curl -fsSL https://raw.githubusercontent.com/aouicher/graphmind/main/scripts/install.sh | bash
Then run graphmind setup once to configure Claude Code, hooks, and skill.
brew install aouicher/graphmind/graphmind # CLI
brew install --cask aouicher/graphmind/graphmind # Desktop app (macOS only)
curl -fsSL https://github.com/aouicher/graphmind/releases/latest/download/graphmind-cli-linux-x64 -o ~/.local/bin/graphmind
chmod +x ~/.local/bin/graphmind
git clone https://github.com/aouicher/graphmind
cd graphmind
cargo build --release -p graphmind-cli
cp target/release/graphmind ~/.local/bin/
graphmind setup # once โ configures Claude Code, Claude Desktop, hooks, skill
cd ~/projects/myapp
graphmind init # per project โ registers, installs git hooks, builds graph
That's it. Claude Code, Claude Desktop, Cursor, and VS Code will use graphmind automatically.
graphmind setup (once, global)Configures your machine so all AI tools can use graphmind:
~/.zshenv, ~/.zshrc, ~/.bashrc)/gm + 19 sub-skills)~/Library/Application Support/Claude/claude_desktop_config.json)~/.claude/settings.json)~/.config/opencode/opencode.jsonc)~/.cursor/mcp.json) โ available in all Cursor projects~/.claude/CLAUDE.md)graphmind init (per project)Registers and indexes a project, then writes MCP config for editors that support project-level config:
~/.claude.json under projects.<path>.mcpServers (local scope)<project>/.vscode/mcp.jsoncd ~/projects/api && graphmind init
cd ~/projects/web && graphmind init
cd ~/projects/lib && graphmind init
Both commands are idempotent โ safe to re-run.
claude mcp add graphmind -- graphmind mcp
Or manually in ~/.claude/settings.json:
{
"mcpServers": {
"graphmind": {
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}
graphmind init writes this automatically to ~/.claude.json:
{
"projects": {
"/absolute/path/to/project": {
"mcpServers": {
"graphmind": {
"type": "stdio",
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}
}
}
Claude Desktop does not inherit your shell PATH. Use the full path:
{
"mcpServers": {
"graphmind": {
"command": "/opt/homebrew/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}
Config file location:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonTip: Run
which graphmindto find the correct path on your system.
graphmind setup writes this automatically to ~/.cursor/mcp.json:
{
"mcpServers": {
"graphmind": {
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}
graphmind init writes this automatically to <project>/.vscode/mcp.json:
{
"servers": {
"graphmind": {
"type": "stdio",
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}
graphmind install hook-claude
Registers hooks in ~/.claude/settings.json for:
graphmind search, provides graph results for Grep/Glob/LS toolsBuilt-in intelligence:
grep -c, pipes to wc/sort and lets them throughgraphmind install skill
graphmind sync # updates CLAUDE.md in current project
graphmind sync --all # updates CLAUDE.md for all registered projects
graphmind install hook-git
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude Code / MCP Client โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ MCP Server (rmcp SDK, stdio) โ 27 tools โ
โ gm_query ยท gm_fn ยท gm_file ยท gm_deps โ
โ gm_outline ยท gm_who_calls_chain ยท gm_dead โ
โ gm_export ยท gm_similar ยท gm_listeners โ
โ gm_memory_search ยท gm_cross_query โ
โ gm_status ยท gm_context ยท gm_diff_impact โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 1: Structural Graph (SQLite + FTS5) โ
โ Symbols ยท Edges ยท Call sites โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 2: Semantic Embeddings (SQLite) โ
โ Cosine search ยท Graph expansion ยท RRF โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 3: Semantic Memory (JSONL) โ
โ Decisions ยท Patterns ยท Conventions โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 4: Cross-Project Links (JSONL) โ
โ Shared symbols ยท Inferred relationships โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Rust Core (tree-sitter + napi-rs) โ
โ Multi-language parsing ยท Symbol extraction โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
graphmind search combines three retrieval strategies into a single ranked result:
graphmind search "<query>" # hybrid search (FTS + semantic + graph)
graphmind search "<q1>; <q2>" # multi-query with RRF ranking
graphmind search "<query>" --kind function
payment_service)Results are fused via Reciprocal Rank Fusion (RRF, k=60). Each result shows its source: [FTS], [SEM], [GRAPH], or combinations like [FTS+SEM+G].
Configured in ~/.graphmind/config.json:
{
"embedding": {
"mode": "voyage",
"model": "voyage-code-3",
"api_keys": {
"voyage": "pa-..."
}
}
}
| Mode | Model (default) | Notes |
|---|---|---|
local | nomic-embed-text-v1.5 (768d) | ONNX, no API key needed |
openai | text-embedding-3-small (1536d) | Supports custom openai_base_url |
voyage | voyage-code-3 (1024d) | Code-specialized, recommended |
disabled | โ | No embeddings โ default for new installs |
Embeddings are computed automatically during graphmind build when a provider is configured. If the model changes, the embedding index is rebuilt automatically.
OpenAI-compatible providers (Azure, proxies) can set a custom base URL:
{
"embedding": {
"mode": "openai",
"model": "text-embedding-3-large",
"openai_base_url": "https://your-proxy.example.com/v1",
"api_keys": { "openai": "sk-..." }
}
}
graphmind gives Claude persistent memory across sessions โ not just code, but decisions, patterns, conventions, and context.
Memory is fully automatic:
This works for both Claude Code (via hooks) and Claude Desktop (via MCP instructions).
| Type | Examples |
|---|---|
decision | Architecture choices, tech decisions, trade-off resolutions |
pattern | Recurring approaches, solutions, code patterns |
convention | Naming rules, workflow conventions, style guides |
bug | Known issues, workarounds, gotchas |
context | Business context, project goals, user preferences |
Memories are stored as JSONL files in ~/.graphmind/memory/:
global.jsonl โ cross-project knowledge (user preferences, team conventions)<project-slug>.jsonl โ project-specific factsgraphmind memory add "<fact>" [--project <slug>] [--global]
graphmind memory search "<query>"
graphmind memory list
graphmind memory delete <id>
Memories persist indefinitely until explicitly deleted. They are recalled automatically โ you never need to ask "do you remember X?".
graphmind setup # global one-time (hooks, MCP, skill)
graphmind init [path] # per-project (register, git hooks, build)
graphmind init --skip-build # per-project without building
graphmind register [path] # register current dir
graphmind unregister <slug> # remove project
graphmind list # all projects
graphmind status # health check
graphmind build [slug] # incremental build
graphmind build --all # all projects
graphmind build --full # force full rebuild
graphmind build --watch # watch mode (debounced 2s)
graphmind clean [slug] # remove graph cache (forces full rebuild)
graphmind clean --all # clean all projects
graphmind query <symbol> # find symbol + connections
graphmind query <symbol> --file <path> # filter to a specific file
graphmind query <symbol> --kind function # filter by kind
graphmind query <symbol> --limit 20 --offset 0 # paginate callers/callees
graphmind fn <symbol> # full detail with source + callers/callees
graphmind fn <symbol> --file <path> # disambiguate by file
graphmind fn <symbol> --kind function # filter by kind
graphmind fn <symbol> --limit 20 --offset 0 # paginate callers/callees
graphmind fn <symbol> --include-content # include source code in output
graphmind fn <symbol> --no-tests # skip test files
graphmind deps <file> # file dependency map
graphmind impact <file> # transitive reverse deps
graphmind fn-impact <symbol> # blast radius
graphmind diff-impact # impact of current git changes
graphmind diff-impact --staged
graphmind map [slug] # most-connected files
graphmind cycles [slug] # circular dependencies
graphmind outline <file> # hierarchical symbol tree for a file
graphmind file <file> # raw file content from project root
graphmind who-calls <symbol> # transitive caller chain (BFS)
graphmind who-calls <symbol> --depth 5 # limit traversal depth
graphmind dead-code # symbols with no incoming edges
graphmind dead-code --kind function # filter by kind
graphmind dead-code --limit 50 # cap results
graphmind similar <symbol> # structurally similar symbols
graphmind similar <symbol> --limit 10 # cap results
graphmind listeners <event> # find listeners for an event name
graphmind search "<query>" # hybrid FTS + semantic + graph
graphmind search "<q1>; <q2>" # multi-query
graphmind search "<query>" --kind class
graphmind search "<query>" --offset 10 # paginate results
graphmind search "<query>" --include-content # include source code in output
graphmind embed # show embedding index status
graphmind embed --run # generate embeddings for current project
graphmind embed --run --all # generate embeddings for all projects
graphmind memory add "<fact>" [--project <slug>] [--global]
graphmind memory search "<query>"
graphmind memory list
graphmind memory delete <id>
graphmind cross query <symbol> # search across ALL projects
graphmind cross deps <slug> # who depends on this project
graphmind cross links # all cross-project relationships
graphmind cross link add <a> <b> # manual link
graphmind cross link infer # auto-detect shared symbols
graphmind export [slug] -f dot # Graphviz dot format
graphmind export [slug] -f mermaid # Mermaid diagram
graphmind export [slug] -f json # JSON graph
graphmind export --cross -f mermaid # cross-project diagram
graphmind export --obsidian ~/vault/ # Obsidian vault with [[wikilinks]]
graphmind exclude list # show all patterns
graphmind exclude add grafana-data # exclude from current project
graphmind exclude add grafana-data --global
graphmind exclude remove grafana-data
Share your code graph and architectural memories across your team. Every member gets the same structural understanding without re-indexing.
graphmind team init [--team-id <id>] # connect to a team
graphmind team push [slug] # push graph + shared memories
graphmind team push --memories-only # push memories only
graphmind team push --graph-only # push graph only
graphmind team push --all # push all projects
graphmind team pull [slug] # pull latest from team
graphmind team status # sync status per project
graphmind buildis_shared: false) never leave the machinegm_team_memories (shared context) ยท gm_team_who_knows (who documented a symbol)graphmind session start [slug] # log session start
graphmind session save ["message"] # save session summary
graphmind session history [slug] # recent sessions
graphmind install hook-claude # Claude Code search hook
graphmind install hook-git # git hooks (post-commit + pre-push)
graphmind install skill # Claude Code skill
graphmind uninstall hook-claude # remove Claude Code hook
graphmind uninstall hook-git # remove git hooks
graphmind uninstall all [--purge] [--yes] # remove ALL integrations (reverse of setup+init); --purge also deletes ~/.graphmind data
graphmind sync [slug] # inject graph context into CLAUDE.md
graphmind sync --all # update CLAUDE.md for all projects
graphmind update # download and install latest version
graphmind update --check # check for updates without installing
If installed via Homebrew, use brew upgrade graphmind instead. The desktop app also checks for CLI updates at startup and offers one-click update.
MCP responses are optimized for LLM consumption โ minimal tokens, maximum signal.
Compact format (default): One-line-per-symbol text output instead of verbose JSON. Example:
>> 5 result(s) for "auth" [FTS+semantic+graph]:
AuthService [Class] src/services/auth.ts:3 (0.95) [FTS+SEM]
implements Service
validate_token [Function] src/services/auth.ts:15 (0.82) [FTS+G]
(token: string, scope?: string) -> TokenResult
Field pruning: No id, no null signature/doc/content, no redundant total_found/projects_searched fields. Only useful information is returned.
Smart limits: Default 15 results (not 50). Truncation indicators (+N more...) shown only when results are capped.
Content opt-in: Symbol source code is omitted by default. Pass include_content: true to any tool to get it.
JSON mode: Pass format: "json" to any tool to get structured JSON output instead of compact text.
Hook cache deduplication: The Claude Code hook skips duplicate searches within a 5-minute window. Same query โ instant skip (0 tokens). Cache is per-session at /tmp/graphmind-hook-cache.txt.
graphmind exposes 25 tools via MCP (Model Context Protocol):
| Tool | Description |
|---|---|
gm_query | Find symbol and its connections |
gm_fn | Function detail with source + callers/callees |
gm_deps | File-level dependency map |
gm_impact | Transitive reverse dependencies |
gm_fn_impact | Blast radius for a symbol |
gm_diff_impact | Impact of current git changes |
gm_map | Most-connected files |
gm_cycles | Circular dependency detection |
gm_search | Hybrid search (FTS + semantic + graph) |
gm_listeners | Find event listeners by event name |
gm_outline | Hierarchical file structure with qualified names |
gm_file | Raw source content of a file |
gm_who_calls_chain | Transitive caller chain (BFS) |
gm_dead_code | Find symbols with no incoming edges |
gm_export | Export subgraph as Mermaid/DOT |
gm_similar | Find structurally similar symbols |
gm_memory_search | Search stored decisions/patterns |
gm_memory_add | Store a fact (requires confirmation) |
gm_memory_list | List memory entries |
gm_cross_query | Symbol search across all projects |
gm_cross_deps | Cross-project dependency graph |
gm_cross_links | List all cross-project links |
gm_status | Project health and stats |
gm_context | Full project context for session start |
gm_list_projects | All registered projects |
gm_team_memories | Shared team memories and context (Pro/Team) |
gm_team_who_knows | Who documented a given symbol (Pro/Team) |
~/.graphmind/.~/.graphmind/config.json, never sent anywhere except the configured provider.gm_memory_add requires explicit confirmation.| Language | Extensions | Status |
|---|---|---|
| TypeScript | .ts, .tsx | Stable |
| JavaScript | .js, .jsx, .mjs | Stable |
| Python | .py | Stable |
| Go | .go | Stable |
| Rust | .rs | Stable |
| Ruby | .rb | Stable |
| Terraform (HCL) | .tf, .tfvars | Stable |
| YAML | .yml, .yaml | Stable |
| Markdown | .md | Stable |
| C | .c, .h | Stable |
| Objective-C | .m, .mm | Stable |
| Java | .java | Stable |
| PHP | .php | Stable |
| Swift | .swift | Stable |
| Bash | .sh, .bash, .zsh | Stable |
| Perl | .pl, .pm | Stable |
| CSS | .css | Stable |
| SCSS | .scss, .sass | Stable |
| HTML | .html, .htm | Stable |
| TOML | .toml | Stable |
| Dockerfile | Dockerfile | Stable |
| SQL | .sql | Stable |
| C++ | .cpp, .cc, .cxx, .hpp | Stable |
| C# | .cs | Stable |
| Kotlin | .kt, .kts | Stable |
| Dart | .dart | Stable |
| Scala | .scala, .sc | Stable |
| R | .r, .R | Stable |
| GraphQL | .graphql, .gql | Stable |
| PowerShell | .ps1, .psm1 | Stable |
All data lives in ~/.graphmind/:
~/.graphmind/
โโโ config.json # registered projects + embedding settings
โโโ memory/ # JSONL memory files
โโโ graphs/<slug>/
โ โโโ graph.db # structural graph (SQLite + FTS5)
โ โโโ embeddings.db # vector embeddings (SQLite)
โ โโโ meta.json # build stats
โ โโโ cache/ # incremental build cache
โโโ cross-links/ # cross-project relationships
โโโ sessions/ # daily session logs
Everything is plaintext or SQLite โ fully inspectable with standard tools.
Contributions are welcome. graphmind is MIT licensed.
git clone https://github.com/aouicher/graphmind
cd graphmind
cargo build --release -p graphmind-cli
cargo clippy --workspace -- -D warnings
cargo test --workspace
| Branch | Purpose |
|---|---|
main | Stable, protected. Only maintainers merge here. |
feat/<name> | New features |
fix/<name> | Bug fixes |
chore/<name> | Tooling, deps, CI |
All changes go through a pull request targeting main. Direct pushes to main are blocked.
maincargo clippy --workspace -- -D warnings and cargo test --workspace โ both must passmain with a clear description of what and whyReleases are triggered by pushing a semver tag:
git tag v0.3.0
git push origin v0.3.0
The CI will build binaries for macOS (arm64, x64) and Linux (x64), create a GitHub release, update the Homebrew formula, and publish the Tauri auto-updater manifest โ all automatically.
Use -rc suffix for pre-releases: v0.3.0-rc1 (published as pre-release, skipped by Homebrew).
Open a GitHub issue with steps to reproduce, your OS, and the output of graphmind status.
For security vulnerabilities, see SECURITY.md.
.github/
workflows/
ci.yml
.gitignore
.mcp.json
.npmignore
assets/
benchmark.png
screenshot-desktop.png
Cargo.lock
Cargo.toml
CLAUDE.md
crates/
graphmind-cli/
Cargo.toml
src/
commands/
auth.rs
build.rs
claude_hook.rs
clean.rs
cross.rs
diff_impact.rs
exclude.rs
export.rs
hooks.rs
install_skill.rs
memory.rs
mod.rs
notices.rs
query.rs
register.rs
search.rs
session.rs
setup.rs
sync.rs
update.rs
lib.rs
main.rs
tests/
cli_auth_e2e.rs
cli_build_e2e.rs
cli_clean_e2e.rs
cli_exclude_e2e.rs
cli_export_e2e.rs
cli_memory_e2e.rs
cli_memory_persistence_e2e.rs
cli_query_e2e.rs
cli_register_e2e.rs
cli_session_e2e.rs
cli_sync_e2e.rs
common/
mod.rs
setup_e2e.rs
uninstall_all_e2e.rs
graphmind-config/
Cargo.toml
src/
breaking.rs
config.rs
lib.rs
paths.rs
resolve.rs
graphmind-core/
build.rs
Cargo.toml
src/
extractor.rs
languages/
bash.rs
c.rs
cpp.rs
csharp.rs
css.rs
dart.rs
dockerfile.rs
go.rs
graphql.rs
hcl.rs
html.rs
java.rs
kotlin.rs
mod.rs
objc.rs
perl.rs
php.rs
powershell.rs
python.rs
r.rs
ruby.rs
rust.rs
scala.rs
scss.rs
sql.rs
swift.rs
toml.rs
yaml.rs
lib.rs
parser.rs
registry.rs
resolver.rs
tests/
all_languages.rs
golden_edge_cases.rs
golden_extraction.rs
golden_multilang.rs
graphmind-db/
benches/
pipeline_bench.rs
Cargo.toml
src/
builder.rs
cache.rs
lib.rs
markdown.rs
queries.rs
schema.rs
tests/
golden_pipeline.rs
graphmind-desktop/
gen/
schemas/
acl-manifests.json
capabilities.json
desktop-schema.json
macOS-schema.json
index.html
package-lock.json
package.json
src/
src-tauri/
build.rs
capabilities/
default.json
Cargo.toml
gen/
schemas/
acl-manifests.json
capabilities.json
desktop-schema.json
macOS-schema.json
icons/
128x128.png
128x128@2x.png
32x32.png
icon.icns
icon.ico
icon.png
src/
commands/
graph.rs
indexing.rs
integrations.rs
license.rs
mod.rs
notices.rs
projects.rs
settings.rs
setup.rs
updater.rs
watcher.rs
lib.rs
main.rs
state.rs
tray.rs
types.rs
tauri.conf.json
App.tsx
assets/
logo.png
components/
layout/
Sidebar.tsx
ui/
Badge.tsx
Button.tsx
ProgressBar.tsx
Spinner.tsx
hooks/
useClients.ts
useProjects.ts
useTauriEvent.ts
index.css
lib/
tauri.ts
main.tsx
pages/
Integrations.tsx
Projects.tsx
Settings.tsx
Setup.tsx
vite-env.d.ts
tsconfig.json
vite.config.ts
graphmind-embeddings/
Cargo.toml
src/
engine.rs
factory.rs
lib.rs
local.rs
openai.rs
search.rs
store.rs
voyage.rs
tests/
embedding_pipeline.rs
graphmind-license/
Cargo.toml
src/
fingerprint.rs
lib.rs
graphmind-mcp/
Cargo.toml
src/
export_helpers.rs
formatting.rs
graph_helpers.rs
handlers/
analysis.rs
cross.rs
export.rs
graph.rs
memory.rs
meta.rs
mod.rs
search.rs
lib.rs
search_helpers.rs
server.rs
tests/
mcp_handlers.rs
graphmind-memory/
Cargo.toml
src/
cross_infer.rs
cross_links.rs
index.rs
lib.rs
search.rs
store.rs
tests/
memory_store.rs
graphmind-demo-cli.gif
graphmind-demo-desktop.gif
graphmind-demo.gif
LICENSE
README.md
scripts/
build-desktop.sh
cl_wrapper.py
install.sh
SECURITY.md
SKILL.md
tests/
fixtures/
sample-project/
src/
index.ts
routes/
wallet.ts
services/
wallet.go
wallet.py
wallet.rb
wallet.rs
wallet.ts
utils/
logger.ts
validator.tsFAQ
graphmind is a Claude Code plugin with 1 hand-picked skill for development work, indexed on Flowy. Install it with the command on its page. It includes graphmind. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.