-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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.
| 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 |
| Benchmarks | CI-measured reduction ratios, per-model breakdown, community submissions, and how to run it on your own code |
| 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 |
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, andGrepoutput before the agent sees it — typically 88–91% smaller.
Combined effect: 5–10× total reduction vs baseline agent usage, offline and model-agnostic.
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
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.
# 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.pyClaude Code users, add the PostToolUse compression hooks:
neuralmind install-hooks .
neuralmind init-hook . # auto-rebuild on every git commit (optional)| 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.
Don't trust fixture numbers — measure it on your own repo:
pip install neuralmind graphifyy
graphify update . && neuralmind build .
neuralmind benchmark . --contributeThis outputs your reduction ratio, tokens per query, and an estimated monthly savings figure at Claude 3.5 Sonnet pricing. The --contribute flag produces a ready-to-share JSON blob you can paste into a PR (or a benchmark submission issue) to add to the public leaderboard.
Full walkthrough: Does NeuralMind work on your codebase?
- GitHub Issues — bug reports, feature requests
- GitHub Discussions — questions and ideas
- Main README — always the most current overview