neuralmind 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,356 @@
1
+ Metadata-Version: 2.4
2
+ Name: neuralmind
3
+ Version: 0.1.0
4
+ Summary: Adaptive Neural Knowledge System - Achieve 40-70x token reduction for AI code understanding
5
+ Project-URL: Homepage, https://github.com/dfrostar/neuralmind
6
+ Project-URL: Documentation, https://github.com/dfrostar/neuralmind/wiki
7
+ Project-URL: Repository, https://github.com/dfrostar/neuralmind.git
8
+ Project-URL: Issues, https://github.com/dfrostar/neuralmind/issues
9
+ Project-URL: Changelog, https://github.com/dfrostar/neuralmind/releases
10
+ Author: dfrostar
11
+ Maintainer: dfrostar
12
+ License-Expression: MIT
13
+ License-File: LICENSE
14
+ Keywords: ai,ai-coding-assistant,chromadb,code-understanding,context-window,embeddings,knowledge-graph,llm,mcp,semantic-search,token-reduction
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.10
27
+ Requires-Dist: chromadb>=0.4.0
28
+ Requires-Dist: pyyaml>=6.0
29
+ Provides-Extra: all
30
+ Requires-Dist: black>=23.0; extra == 'all'
31
+ Requires-Dist: mcp>=0.1.0; extra == 'all'
32
+ Requires-Dist: mypy>=1.0; extra == 'all'
33
+ Requires-Dist: pre-commit>=3.0; extra == 'all'
34
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'all'
35
+ Requires-Dist: pytest-cov>=4.0; extra == 'all'
36
+ Requires-Dist: pytest-mock>=3.10; extra == 'all'
37
+ Requires-Dist: pytest>=7.0; extra == 'all'
38
+ Requires-Dist: ruff>=0.1.0; extra == 'all'
39
+ Provides-Extra: dev
40
+ Requires-Dist: black>=23.0; extra == 'dev'
41
+ Requires-Dist: mypy>=1.0; extra == 'dev'
42
+ Requires-Dist: pre-commit>=3.0; extra == 'dev'
43
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
44
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
45
+ Requires-Dist: pytest-mock>=3.10; extra == 'dev'
46
+ Requires-Dist: pytest>=7.0; extra == 'dev'
47
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
48
+ Provides-Extra: mcp
49
+ Requires-Dist: mcp>=0.1.0; extra == 'mcp'
50
+ Description-Content-Type: text/markdown
51
+
52
+ <div align="center">
53
+
54
+ # 🧠 NeuralMind
55
+
56
+ ### **Stop Wasting Tokens. Start Understanding Code.**
57
+
58
+ [![CI](https://github.com/dfrostar/neuralmind/actions/workflows/ci.yml/badge.svg)](https://github.com/dfrostar/neuralmind/actions/workflows/ci.yml)
59
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
60
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
61
+
62
+ **NeuralMind gives AI assistants 40-70x more efficient access to your codebase.**
63
+
64
+ [Why NeuralMind?](#-why-neuralmind) •
65
+ [Install in 2 Minutes](#-installation) •
66
+ [Quick Start](#-quick-start) •
67
+ [How It Works](#-how-it-works) •
68
+ [Wiki](https://github.com/dfrostar/neuralmind/wiki)
69
+
70
+ </div>
71
+
72
+ ---
73
+
74
+ ## 🎯 Why NeuralMind?
75
+
76
+ ### The Problem
77
+
78
+ When you ask Claude, GPT-4, or Cursor about your codebase:
79
+
80
+ | Traditional Approach | Tokens Used | Result |
81
+ |---------------------|-------------|--------|
82
+ | Load entire codebase | **50,000+** | ❌ Hits context limits, expensive, slow |
83
+ | Load a few files manually | **5,000** | ❌ Misses important context |
84
+ | Hope the AI figures it out | **0** | ❌ Wrong answers, hallucinations |
85
+
86
+ ### The Solution
87
+
88
+ **NeuralMind loads only what's relevant to your question:**
89
+
90
+ | NeuralMind Approach | Tokens Used | Result |
91
+ |--------------------|-------------|--------|
92
+ | Wake-up context | **~400** | ✅ AI understands project structure |
93
+ | Query context | **~800-1,100** | ✅ AI gets relevant code clusters |
94
+ | **Total** | **~1,500** | ✅ **40-70x fewer tokens!** |
95
+
96
+ ### Real Benchmarks
97
+
98
+ | Project | Codebase Size | NeuralMind Tokens | Reduction |
99
+ |---------|---------------|-------------------|----------|
100
+ | cmmc20 (full-stack app) | 241 code entities | 765 avg | **65.6x** |
101
+ | mempalace (Python lib) | 1,626 code entities | 1,089 avg | **46.0x** |
102
+
103
+ ---
104
+
105
+ ## 📦 Installation
106
+
107
+ ### Step 1: Install NeuralMind
108
+
109
+ ```bash
110
+ # From GitHub (available now)
111
+ pip install git+https://github.com/dfrostar/neuralmind.git
112
+
113
+ # From PyPI (coming soon)
114
+ pip install neuralmind
115
+ ```
116
+
117
+ ### Step 2: Install Graphify (creates the knowledge graph)
118
+
119
+ ```bash
120
+ pip install graphifyy
121
+ ```
122
+
123
+ ### Step 3: Verify Installation
124
+
125
+ ```bash
126
+ neuralmind --help
127
+ graphify --help
128
+ ```
129
+
130
+ **That's it!** You're ready to use NeuralMind.
131
+
132
+ ---
133
+
134
+ ## 🚀 Quick Start
135
+
136
+ ### 1. Generate Knowledge Graph (one-time per project)
137
+
138
+ ```bash
139
+ cd /path/to/your/project
140
+ graphify update .
141
+ ```
142
+
143
+ This creates `graphify-out/graph.json` with your codebase structure.
144
+
145
+ ### 2. Build Neural Index
146
+
147
+ ```bash
148
+ neuralmind build .
149
+ ```
150
+
151
+ **Output:**
152
+ ```
153
+ Building NeuralMind index for: .
154
+ Build successful!
155
+ Project: my-project
156
+ Nodes: 241
157
+ Communities: 93
158
+ Duration: 16.65s
159
+ ```
160
+
161
+ ### 3. Query Your Codebase
162
+
163
+ ```bash
164
+ # Get compact context for any question
165
+ neuralmind query . "How does authentication work?"
166
+ ```
167
+
168
+ **Output:**
169
+ ```
170
+ Query: How does authentication work?
171
+ Tokens: 739 (67.7x reduction)
172
+ ============================================================
173
+ ## Project: my-project
174
+ Knowledge Graph: 241 entities, 93 clusters
175
+
176
+ ## Relevant Code Areas
177
+ ### Cluster 1 (relevance: 2.45)
178
+ Contains: 5 codes
179
+ - AuthService (code) — authService.ts
180
+ - hashPassword() (code) — authService.ts
181
+ - verifyToken() (code) — authService.ts
182
+ ...
183
+ ============================================================
184
+ ```
185
+
186
+ ### 4. Use with AI Assistants
187
+
188
+ Copy the output and paste it into your AI conversation for instant, relevant context!
189
+
190
+ ---
191
+
192
+ ## 📖 All Commands
193
+
194
+ | Command | What It Does | Example |
195
+ |---------|--------------|--------|
196
+ | `build` | Create neural index from graph.json | `neuralmind build .` |
197
+ | `query` | Get context for a question | `neuralmind query . "How does X work?"` |
198
+ | `wakeup` | Get minimal startup context | `neuralmind wakeup .` |
199
+ | `search` | Semantic search for code | `neuralmind search . "authentication"` |
200
+ | `benchmark` | Measure token reduction | `neuralmind benchmark .` |
201
+ | `stats` | Show index statistics | `neuralmind stats .` |
202
+
203
+ ### JSON Output (for automation)
204
+
205
+ ```bash
206
+ neuralmind query . "How does auth work?" --json
207
+ ```
208
+
209
+ ---
210
+
211
+ ## 🔧 How It Works
212
+
213
+ ### 4-Layer Progressive Disclosure
214
+
215
+ NeuralMind uses a smart layering system to minimize tokens:
216
+
217
+ ```
218
+ ┌─────────────────────────────────────────────────────┐
219
+ │ L0: Identity (~100 tokens) │
220
+ │ "Project name, description, graph stats" │
221
+ │ └── Always loaded │
222
+ ├─────────────────────────────────────────────────────┤
223
+ │ L1: Summary (~300 tokens) │
224
+ │ "Architecture overview, main code clusters" │
225
+ │ └── Always loaded │
226
+ ├─────────────────────────────────────────────────────┤
227
+ │ L2: On-Demand (~200-400 tokens) │
228
+ │ "Relevant modules based on your query" │
229
+ │ └── Loaded per query │
230
+ ├─────────────────────────────────────────────────────┤
231
+ │ L3: Search Results (~200-400 tokens) │
232
+ │ "Semantic search matches" │
233
+ │ └── Loaded per query │
234
+ └─────────────────────────────────────────────────────┘
235
+
236
+ Total: ~800-1,100 tokens vs 50,000+ for full codebase
237
+ ```
238
+
239
+ ### Data Flow
240
+
241
+ ```
242
+ Your Code → Graphify → graph.json → NeuralMind → ChromaDB
243
+
244
+ Smart Context for AI
245
+ ```
246
+
247
+ ---
248
+
249
+ ## 🔌 MCP Integration (Claude Desktop, Cursor)
250
+
251
+ NeuralMind includes an MCP server for direct integration:
252
+
253
+ ```bash
254
+ # Install with MCP support
255
+ pip install "neuralmind[mcp]"
256
+
257
+ # Run the server
258
+ neuralmind-mcp
259
+ ```
260
+
261
+ Add to your Claude Desktop config (`~/.config/claude/claude_desktop_config.json`):
262
+
263
+ ```json
264
+ {
265
+ "mcpServers": {
266
+ "neuralmind": {
267
+ "command": "neuralmind-mcp"
268
+ }
269
+ }
270
+ }
271
+ ```
272
+
273
+ ---
274
+
275
+ ## 🐍 Python API
276
+
277
+ ```python
278
+ from neuralmind import NeuralMind
279
+
280
+ # Initialize for your project
281
+ mind = NeuralMind('/path/to/project')
282
+ mind.build()
283
+
284
+ # Get wake-up context (for starting conversations)
285
+ wakeup = mind.wakeup()
286
+ print(f"Tokens: {wakeup.budget.total}") # ~400
287
+
288
+ # Get query context (for specific questions)
289
+ result = mind.query("How does authentication work?")
290
+ print(f"Tokens: {result.budget.total}") # ~800
291
+ print(f"Reduction: {result.reduction_ratio:.1f}x") # ~65x
292
+ print(result.context) # The actual context to use
293
+ ```
294
+
295
+ ---
296
+
297
+ ## 📊 Why This Matters
298
+
299
+ | Benefit | Impact |
300
+ |---------|--------|
301
+ | **Cost Savings** | 40-70x fewer tokens = 40-70x lower API costs |
302
+ | **Faster Responses** | Less to process = faster AI responses |
303
+ | **Better Answers** | Relevant context = more accurate answers |
304
+ | **Longer Conversations** | More room for back-and-forth |
305
+ | **Works Everywhere** | CLI, Python API, MCP server |
306
+
307
+ ---
308
+
309
+ ## 📚 Documentation
310
+
311
+ - **[Wiki Home](https://github.com/dfrostar/neuralmind/wiki)** — Full documentation
312
+ - **[Installation Guide](https://github.com/dfrostar/neuralmind/wiki/Installation)** — Detailed setup
313
+ - **[CLI Reference](https://github.com/dfrostar/neuralmind/wiki/CLI-Reference)** — All commands
314
+ - **[API Reference](https://github.com/dfrostar/neuralmind/wiki/API-Reference)** — Python API
315
+ - **[Architecture](https://github.com/dfrostar/neuralmind/wiki/Architecture)** — How it works
316
+ - **[Troubleshooting](https://github.com/dfrostar/neuralmind/wiki/Troubleshooting)** — Common issues
317
+
318
+ ---
319
+
320
+ ## 🤝 Contributing
321
+
322
+ Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
323
+
324
+ ```bash
325
+ # Clone and install for development
326
+ git clone https://github.com/dfrostar/neuralmind.git
327
+ cd neuralmind
328
+ pip install -e ".[dev]"
329
+
330
+ # Run tests
331
+ pytest
332
+ ```
333
+
334
+ ---
335
+
336
+ ## 📄 License
337
+
338
+ MIT License — see [LICENSE](LICENSE) for details.
339
+
340
+ ---
341
+
342
+ ## 🙏 Acknowledgments
343
+
344
+ - **[ChromaDB](https://www.trychroma.com/)** — Vector storage
345
+ - **[Graphify](https://github.com/safishamsi/graphify)** — Knowledge graph generation
346
+ - **[code-review-graph](https://github.com/tirth8205/code-review-graph)** — Inspiration
347
+
348
+ ---
349
+
350
+ <div align="center">
351
+
352
+ **Made with 🧠 by [Agent Zero](https://github.com/frdel/agent-zero)**
353
+
354
+ *Stop wasting tokens. Start understanding code.*
355
+
356
+ </div>
@@ -0,0 +1,5 @@
1
+ neuralmind-0.1.0.dist-info/METADATA,sha256=r1q0dVGU42SzVHaix4ZZ2Vm4nVUe-ThXfNKjQPPTU7Q,10986
2
+ neuralmind-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
3
+ neuralmind-0.1.0.dist-info/entry_points.txt,sha256=LkE-FEPG5fCY8hPPQiEm6q17D9jVjr0PioDSLVqe1W8,95
4
+ neuralmind-0.1.0.dist-info/licenses/LICENSE,sha256=C3_vxYL7sWPhsSvUizeQi07dswZQbB75XjpgBl3Rd1Y,1080
5
+ neuralmind-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ neuralmind = neuralmind.cli:main
3
+ neuralmind-mcp = neuralmind.mcp_server:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 NeuralMind Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.