Skip to content
github-actions[bot] edited this page Apr 21, 2026 · 25 revisions

🧠 NeuralMind Wiki

Reduce Claude, GPT, and Gemini token costs 40–70× on code questions. Local semantic codebase index + MCP server + PostToolUse compression hooks for Claude Code, Cursor, Cline, Continue, and any LLM.

Welcome — this wiki is the in-depth reference. For the fastest orientation, use the two pages at the top of Quick Links.

Quick Links

Start here

Page When to read it
Setup Guide First-time setup for Claude Code, Cursor, Claude Desktop, or any MCP client
Use Cases Step-by-step walkthroughs by persona: Claude Code user, cost optimization, any-LLM, offline/regulated, growing monorepo
Comparisons Honest "NeuralMind vs X" pages: Cursor, Copilot, Cody, Aider, Claude Projects, LangChain, long context, prompt caching, RAG, tree-sitter

Reference

Page Contents
Installation Install from PyPI; optional [mcp] extras
Usage Guide End-to-end examples for every command
CLI Reference All CLI commands, flags, and output shapes
API Reference Python API (NeuralMind, ContextResult, TokenBudget)
Architecture How the 4-layer progressive disclosure system works
Integration Guide MCP, CI/CD, VS Code, JetBrains, any-LLM piping
Learning Guide Opt-in memory + cooccurrence-based reranking (v0.3.2+)
Brain-Like Learning Design rationale for the learning system
Troubleshooting Common issues and fixes

What is NeuralMind?

A two-phase token optimizer for AI coding agents.

  • Phase 1 — Retrieval. A 4-layer progressive-disclosure index surfaces ~800 tokens of structured context for any code question, instead of loading 50,000+ tokens of raw source.
  • Phase 2 — Consumption. PostToolUse hooks (Claude Code) compress Read, Bash, and Grep output before the agent sees it — typically 88–91% smaller.

Combined effect: 5–10× total reduction vs baseline agent usage, offline and model-agnostic.

The core problem

You: "How does authentication work in my codebase?"

❌ Traditional: Load entire codebase → 50,000 tokens → $0.15-$3.75/query
✅ NeuralMind: Smart context → ~800 tokens → $0.002-$0.06/query

When do I reach for it?

Short answer: if any of these describe you, start with the Use Cases page.

  • My Claude Code session hits context limits mid-task
  • My monthly LLM bill is climbing
  • I start every session re-pasting project structure
  • The agent reads a 2,000-line file to answer one question
  • I want to query my codebase from ChatGPT / Gemini / a local model
  • I need AI coding help but code can't leave my machine

Full symptom-and-goal matrix in the main README.

Quick Start

# Install
pip install neuralmind graphifyy

# Setup
cd your-project
graphify update .
neuralmind build .

# Use
neuralmind wakeup .
neuralmind query . "How does authentication work?"
neuralmind skeleton src/auth/handlers.py

Claude Code users, add the PostToolUse compression hooks:

neuralmind install-hooks .
neuralmind init-hook .        # auto-rebuild on every git commit (optional)

Compare to alternatives

Compared against Short verdict
Cursor @codebase Works only in Cursor; NeuralMind works anywhere
GitHub Copilot Copilot is hosted completions; NeuralMind is local context
Claude Projects Projects reload all files every turn; NeuralMind retrieves only what the query needs
Long context windows Possible ≠ cheap — NeuralMind drops per-query cost ~60×
Prompt caching Caching amortizes big prompts; NeuralMind makes them small

Full list: Comparisons.

Support

Clone this wiki locally