Complete project memory for AI code assistants. One call, full context, zero guessing.
Project description
NEURODEX
Complete project memory for AI code assistants. One call, full context, zero guessing.
NEURODEX gives LLMs persistent, symbol-level knowledge of your entire codebase across sessions. No extra AI models, no cloud, no API keys. Built on SQLite FTS5 and tree-sitter.
pip install neurodex
neurodex init # index your project
neurodex install # wire into Claude Code / Codex
What It Does
Your AI assistant starts every session knowing nothing. NEURODEX fixes that.
Without NEURODEX With NEURODEX
───────────────────── ─────────────────────
Session starts → blank Session starts → neurodex_brain()
"What is this project?" → read 10+ → 14k tokens: every module,
files, still incomplete every function signature,
"Fix the auth bug" → grep, read 5 every dependency, every
more files, guess at structure past decision
Total: 20+ file reads Total: 0 file reads to start
Architecture
graph TB
subgraph "Index Time (pure algorithmic, no AI)"
TS[tree-sitter AST] --> CH[Chunker]
CH --> FTS[SQLite FTS5]
CH --> NODES[Symbol Nodes]
CH --> EDGES[Typed Edges]
end
subgraph "Query Time"
BRAIN[Brain Generator] --> |reads| FTS
BRAIN --> |reads| NODES
BRAIN --> |reads| EDGES
SEARCH[BM25 Search] --> |queries| FTS
IMPACT[Impact Analysis] --> |traverses| EDGES
REFS[Reference Finder] --> |scans| FTS
REFS --> |scans| EDGES
XPROJ[Cross-Project] --> |bridges| EDGES
end
subgraph "MCP Server"
LLM[Claude / Codex] --> |neurodex_brain| BRAIN
LLM --> |neurodex_search| SEARCH
LLM --> |neurodex_impact| IMPACT
LLM --> |neurodex_references| REFS
LLM --> |neurodex_cross_impact| XPROJ
LLM --> |neurodex_save| FTS
end
How It Works
Session Start
sequenceDiagram
participant LLM as Claude / Codex
participant MCP as NEURODEX MCP Server
participant DB as SQLite (local)
LLM->>MCP: neurodex_brain()
MCP->>DB: Read nodes, edges, chunks, insights
MCP-->>LLM: Complete project brain (~14k tokens)
Note over LLM: Now knows every module,<br/>function signature, dependency,<br/>and past session decision
LLM->>LLM: Ready to work (zero file reads)
Making a Change
sequenceDiagram
participant User
participant LLM as Claude / Codex
participant MCP as NEURODEX MCP Server
User->>LLM: "Rename BrandProfile to BrandIdentity"
LLM->>MCP: neurodex_references("BrandProfile")
MCP-->>LLM: 13 references in 13 files with exact lines
LLM->>MCP: neurodex_impact("brands/models.py")
MCP-->>LLM: 20 affected symbols, risk 0.73
LLM->>MCP: neurodex_cross_impact("brands/models.py")
MCP-->>LLM: 3 cross-project contracts affected
LLM->>LLM: Makes targeted edits (reads only lines it changes)
LLM->>MCP: neurodex_save("Renamed BrandProfile → BrandIdentity")
Note over MCP: Saved for future sessions
Cross-Project Awareness
graph LR
subgraph Backend
BE_ROUTE[POST /auth/login] --> BE_SVC[AuthService.login]
BE_SVC --> BE_REPO[UserRepository]
end
subgraph Frontend
FE_PAGE[LoginPage.tsx] --> FE_API[fetch '/auth/login']
end
subgraph Mobile
MOB_SCREEN[LoginScreen.dart] --> MOB_API[api.post '/auth/login']
end
BE_ROUTE -.->|contract| FE_API
BE_ROUTE -.->|contract| MOB_API
style BE_ROUTE fill:#f96
style FE_API fill:#f96
style MOB_API fill:#f96
When you change a backend endpoint, neurodex_cross_impact finds every frontend and mobile file that consumes it.
MCP Tools
| Tool | Purpose |
|---|---|
neurodex_brain |
Complete project brain. Call first on session start. |
neurodex_search |
BM25 full-text search with synonym expansion |
neurodex_compact_search |
Metadata-only search (saves tokens) |
neurodex_symbols |
Find functions/classes by name pattern |
neurodex_save |
Persist a decision or insight for future sessions |
neurodex_references |
Find ALL references to a symbol across the project |
neurodex_impact |
Blast-radius: what breaks if you change this file? |
neurodex_cross_impact |
Cross-project: what breaks in other repos? |
neurodex_trace |
Follow import/dependency chains |
neurodex_brain |
Complete project context in one call |
neurodex_status |
Index health and project info |
neurodex_list_projects |
All indexed repos and workspaces |
neurodex_workspace_create |
Group repos for cross-repo search |
neurodex_set_context |
Set session search scope |
Project Brain
The brain is not a markdown file. It is a compressed, structured representation of the entire project that the LLM processes in full.
PROJECT: ContentPlatform
AI-powered SaaS for brand social content generation
Stack: FastAPI, PostgreSQL, SuperTokens, Celery+Redis
MODULES:
[auth] User authentication, JWT, Google/Apple OAuth
files: models.py, oauth.py, repository.py, router.py, security.py, service.py
· service.py:27-77 class AuthService
· service.py:49-77 async def login(email: str, password: str) → LoginResponse
· security.py:15-28 def create_access_token(user_id: str) → str
§ User: email(str), password_hash(str | None), full_name(str)
§ LoginResponse: access_token(str), refresh_token(str), expires_in(int)
uses: common, core, organizations
[brands] Brand profiles, RAG persona builder
· models.py:29-84 class BrandProfile(BaseModel, TenantMixin)
· persona_builder.py:23-25 build_brand_persona_from_url(url: str)
§ BrandProfile: name(String), voice_summary(Optional[str]), colors(Optional[dict])
uses: common, core, generation
KEY FLOWS:
[API] POST /auth/login (auth) → common → core
[API] POST /brands/{id}/analyze (brands) → common → generation
[TASK] execute_generation_job (tasks) → core
MEMORY:
! Brand colors extracted via Playwright screenshot, NOT HTML parsing
! N+1 in analytics fixed with selectinload, don't remove it
Every symbol has its file and exact line range. The LLM can target service.py:49-77 without reading the file first.
Setup
Install
pip install neurodex
Index a Project
cd your-project
neurodex init
Wire into Claude Code
neurodex install
This adds the MCP server to ~/.claude/settings.json and injects usage instructions into your project's CLAUDE.md.
Index Multiple Projects
cd backend && neurodex init
cd ../frontend && neurodex init
cd ../mobile && neurodex init
Create a Workspace (Cross-Repo Search)
neurodex workspace create "MyApp" /path/to/backend /path/to/frontend /path/to/mobile
CLI Commands
| Command | Description |
|---|---|
neurodex init [path] |
Index a project directory |
neurodex status |
Show all indexed projects and health |
neurodex brain [path] |
Generate and display the project brain |
neurodex search "query" |
Test search from terminal |
neurodex reindex [path] |
Force full re-index |
neurodex workspace create NAME [paths...] |
Create a workspace |
neurodex workspace add NAME path |
Add repo to workspace |
neurodex workspace list |
List all workspaces |
neurodex auto-save |
Extract insights from Claude Code history |
neurodex install |
Add MCP server to Claude Code settings |
Benchmarks
Tested against ContentPlatform (342 files, 314 indexed):
| Metric | Score |
|---|---|
| Hit@1 (correct file is top result) | 75% |
| Recall@3 (correct file in top 3) | 90% |
| Recall@5 (correct file in top 5) | 95% |
| MRR (mean reciprocal rank) | 0.838 |
| Brain tokens (full project) | ~14k |
| Index time | 0.7s |
Cross-project on GakkoDeck (4 repos, 1542 files):
| Metric | Score |
|---|---|
| Brain tokens (all 4 projects) | ~14k |
| Context window usage | 6.9% of 200k |
| Cross-project contract detection | 16 contracts matched |
What Gets Indexed
| Data | Storage | Method |
|---|---|---|
| Code symbols | Nodes table | tree-sitter AST (18 languages) |
| Full-text content | Chunks + FTS5 | BM25 inverted index |
| Import relationships | Edges table | Regex + AST |
| Call relationships | Edges table | Regex heuristic |
| Inheritance chains | Edges table | AST class parsing |
| Test coverage links | Edges table | File + function pattern matching |
| Session insights | Chunks table | Explicit neurodex_save calls |
| API endpoints | Extracted at query time | Route decorator parsing |
| Cross-project contracts | Computed at query time | Endpoint-to-consumer matching |
Language Support
18 languages with AST parsing: Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, C#, Ruby, PHP, Swift, Kotlin, Scala, Dart, Elixir, Haskell, Lua
16 languages with regex fallback: SQL, Bash, Markdown, YAML, TOML, JSON, XML, HTML, CSS, SCSS, Vue, Svelte, Jupyter, and more
Tech Stack
| Component | Choice |
|---|---|
| Storage + Search | SQLite FTS5 (built into Python) |
| AST Parsing | tree-sitter |
| File Watching | watchdog |
| MCP Framework | mcp (official Python SDK) |
| CLI | click |
| Extra AI Models | None |
Zero external services. Everything runs locally. Total install size ~20MB.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neurodex-0.3.0.tar.gz.
File metadata
- Download URL: neurodex-0.3.0.tar.gz
- Upload date:
- Size: 70.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b030e4bcad4877c5b5ca43650c695f519a6a1b55d0ea29c69de2ff6ebd589df
|
|
| MD5 |
39a64b4639f6d296c102f84be824b459
|
|
| BLAKE2b-256 |
d44567290dd58f2fddadd9a827b6918f4f57a4497f8f3d295131574034457c26
|
Provenance
The following attestation bundles were made for neurodex-0.3.0.tar.gz:
Publisher:
publish.yml on karanpanchall/neurodex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neurodex-0.3.0.tar.gz -
Subject digest:
9b030e4bcad4877c5b5ca43650c695f519a6a1b55d0ea29c69de2ff6ebd589df - Sigstore transparency entry: 1272872444
- Sigstore integration time:
-
Permalink:
karanpanchall/neurodex@ef3f80445854991d7b5dcb9cbde7270b34a6cd8b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/karanpanchall
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ef3f80445854991d7b5dcb9cbde7270b34a6cd8b -
Trigger Event:
push
-
Statement type:
File details
Details for the file neurodex-0.3.0-py3-none-any.whl.
File metadata
- Download URL: neurodex-0.3.0-py3-none-any.whl
- Upload date:
- Size: 79.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1474a5f3719010e3c1ca55a2e757f34a89a4a0a6ac56c26cb2ecfe84f34c3999
|
|
| MD5 |
24dfb6f1243f66ade9b62822ee710849
|
|
| BLAKE2b-256 |
0139c0c32c1f11919f7120d9c5fd4ffd7ab85f8ddd23d9a32e68b62bb69771e7
|
Provenance
The following attestation bundles were made for neurodex-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on karanpanchall/neurodex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neurodex-0.3.0-py3-none-any.whl -
Subject digest:
1474a5f3719010e3c1ca55a2e757f34a89a4a0a6ac56c26cb2ecfe84f34c3999 - Sigstore transparency entry: 1272872496
- Sigstore integration time:
-
Permalink:
karanpanchall/neurodex@ef3f80445854991d7b5dcb9cbde7270b34a6cd8b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/karanpanchall
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ef3f80445854991d7b5dcb9cbde7270b34a6cd8b -
Trigger Event:
push
-
Statement type: