superlocalmemory 2.3.0

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.
Files changed (100) hide show
  1. package/ATTRIBUTION.md +140 -0
  2. package/CHANGELOG.md +1749 -0
  3. package/LICENSE +21 -0
  4. package/README.md +600 -0
  5. package/bin/aider-smart +72 -0
  6. package/bin/slm +202 -0
  7. package/bin/slm-npm +73 -0
  8. package/bin/slm.bat +195 -0
  9. package/bin/slm.cmd +10 -0
  10. package/bin/superlocalmemoryv2:list +3 -0
  11. package/bin/superlocalmemoryv2:profile +3 -0
  12. package/bin/superlocalmemoryv2:recall +3 -0
  13. package/bin/superlocalmemoryv2:remember +3 -0
  14. package/bin/superlocalmemoryv2:reset +3 -0
  15. package/bin/superlocalmemoryv2:status +3 -0
  16. package/completions/slm.bash +58 -0
  17. package/completions/slm.zsh +76 -0
  18. package/configs/antigravity-mcp.json +13 -0
  19. package/configs/chatgpt-desktop-mcp.json +7 -0
  20. package/configs/claude-desktop-mcp.json +15 -0
  21. package/configs/codex-mcp.toml +13 -0
  22. package/configs/cody-commands.json +29 -0
  23. package/configs/continue-mcp.yaml +14 -0
  24. package/configs/continue-skills.yaml +26 -0
  25. package/configs/cursor-mcp.json +15 -0
  26. package/configs/gemini-cli-mcp.json +11 -0
  27. package/configs/jetbrains-mcp.json +11 -0
  28. package/configs/opencode-mcp.json +12 -0
  29. package/configs/perplexity-mcp.json +9 -0
  30. package/configs/vscode-copilot-mcp.json +12 -0
  31. package/configs/windsurf-mcp.json +16 -0
  32. package/configs/zed-mcp.json +12 -0
  33. package/docs/ARCHITECTURE.md +877 -0
  34. package/docs/CLI-COMMANDS-REFERENCE.md +425 -0
  35. package/docs/COMPETITIVE-ANALYSIS.md +210 -0
  36. package/docs/COMPRESSION-README.md +390 -0
  37. package/docs/GRAPH-ENGINE.md +503 -0
  38. package/docs/MCP-MANUAL-SETUP.md +720 -0
  39. package/docs/MCP-TROUBLESHOOTING.md +787 -0
  40. package/docs/PATTERN-LEARNING.md +363 -0
  41. package/docs/PROFILES-GUIDE.md +453 -0
  42. package/docs/RESET-GUIDE.md +353 -0
  43. package/docs/SEARCH-ENGINE-V2.2.0.md +748 -0
  44. package/docs/SEARCH-INTEGRATION-GUIDE.md +502 -0
  45. package/docs/UI-SERVER.md +254 -0
  46. package/docs/UNIVERSAL-INTEGRATION.md +432 -0
  47. package/docs/V2.2.0-OPTIONAL-SEARCH.md +666 -0
  48. package/docs/WINDOWS-INSTALL-README.txt +34 -0
  49. package/docs/WINDOWS-POST-INSTALL.txt +45 -0
  50. package/docs/example_graph_usage.py +148 -0
  51. package/hooks/memory-list-skill.js +130 -0
  52. package/hooks/memory-profile-skill.js +284 -0
  53. package/hooks/memory-recall-skill.js +109 -0
  54. package/hooks/memory-remember-skill.js +127 -0
  55. package/hooks/memory-reset-skill.js +274 -0
  56. package/install-skills.sh +436 -0
  57. package/install.ps1 +417 -0
  58. package/install.sh +755 -0
  59. package/mcp_server.py +585 -0
  60. package/package.json +94 -0
  61. package/requirements-core.txt +24 -0
  62. package/requirements.txt +10 -0
  63. package/scripts/postinstall.js +126 -0
  64. package/scripts/preuninstall.js +57 -0
  65. package/skills/slm-build-graph/SKILL.md +423 -0
  66. package/skills/slm-list-recent/SKILL.md +348 -0
  67. package/skills/slm-recall/SKILL.md +325 -0
  68. package/skills/slm-remember/SKILL.md +194 -0
  69. package/skills/slm-status/SKILL.md +363 -0
  70. package/skills/slm-switch-profile/SKILL.md +442 -0
  71. package/src/__pycache__/cache_manager.cpython-312.pyc +0 -0
  72. package/src/__pycache__/embedding_engine.cpython-312.pyc +0 -0
  73. package/src/__pycache__/graph_engine.cpython-312.pyc +0 -0
  74. package/src/__pycache__/hnsw_index.cpython-312.pyc +0 -0
  75. package/src/__pycache__/hybrid_search.cpython-312.pyc +0 -0
  76. package/src/__pycache__/memory-profiles.cpython-312.pyc +0 -0
  77. package/src/__pycache__/memory-reset.cpython-312.pyc +0 -0
  78. package/src/__pycache__/memory_compression.cpython-312.pyc +0 -0
  79. package/src/__pycache__/memory_store_v2.cpython-312.pyc +0 -0
  80. package/src/__pycache__/migrate_v1_to_v2.cpython-312.pyc +0 -0
  81. package/src/__pycache__/pattern_learner.cpython-312.pyc +0 -0
  82. package/src/__pycache__/query_optimizer.cpython-312.pyc +0 -0
  83. package/src/__pycache__/search_engine_v2.cpython-312.pyc +0 -0
  84. package/src/__pycache__/setup_validator.cpython-312.pyc +0 -0
  85. package/src/__pycache__/tree_manager.cpython-312.pyc +0 -0
  86. package/src/cache_manager.py +520 -0
  87. package/src/embedding_engine.py +671 -0
  88. package/src/graph_engine.py +970 -0
  89. package/src/hnsw_index.py +626 -0
  90. package/src/hybrid_search.py +693 -0
  91. package/src/memory-profiles.py +518 -0
  92. package/src/memory-reset.py +485 -0
  93. package/src/memory_compression.py +999 -0
  94. package/src/memory_store_v2.py +1088 -0
  95. package/src/migrate_v1_to_v2.py +638 -0
  96. package/src/pattern_learner.py +898 -0
  97. package/src/query_optimizer.py +513 -0
  98. package/src/search_engine_v2.py +403 -0
  99. package/src/setup_validator.py +479 -0
  100. package/src/tree_manager.py +720 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Varun Pratap Bhardwaj
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.
package/README.md ADDED
@@ -0,0 +1,600 @@
1
+ <p align="center">
2
+ <img src="https://img.shields.io/badge/🧠_SuperLocalMemory-V2-blueviolet?style=for-the-badge" alt="SuperLocalMemory V2"/>
3
+ </p>
4
+
5
+ <h1 align="center">Your AI Finally Remembers You</h1>
6
+
7
+ <p align="center">
8
+ <strong>⚡ Created & Architected by <a href="https://github.com/varun369">Varun Pratap Bhardwaj</a> ⚡</strong><br/>
9
+ <em>Solution Architect • Original Creator • 2026</em>
10
+ </p>
11
+
12
+ <p align="center">
13
+ <strong>Stop re-explaining your codebase every session. 100% local. Zero setup. Completely free.</strong>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.8+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.8+"/></a>
18
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT License"/></a>
19
+ <a href="#"><img src="https://img.shields.io/badge/local--first-100%25-brightgreen?style=flat-square" alt="100% Local"/></a>
20
+ <a href="#"><img src="https://img.shields.io/badge/setup-5%20min-orange?style=flat-square" alt="5 Min Setup"/></a>
21
+ <a href="#"><img src="https://img.shields.io/badge/platform-Mac%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square" alt="Cross Platform"/></a>
22
+ <a href="https://github.com/varun369/SuperLocalMemoryV2/wiki"><img src="https://img.shields.io/badge/📚_Wiki-Documentation-blue?style=flat-square" alt="Wiki"/></a>
23
+ </p>
24
+
25
+ <p align="center">
26
+ <a href="#-quick-start">Quick Start</a> •
27
+ <a href="#-why-superlocalemory">Why This?</a> •
28
+ <a href="#-features">Features</a> •
29
+ <a href="#-vs-alternatives">vs Alternatives</a> •
30
+ <a href="#-documentation">Docs</a> •
31
+ <a href="https://github.com/varun369/SuperLocalMemoryV2/issues">Issues</a>
32
+ </p>
33
+
34
+ <p align="center">
35
+ <b>Created by <a href="https://github.com/varun369">Varun Pratap Bhardwaj</a></b> •
36
+ <a href="https://github.com/sponsors/varun369">💖 Sponsor</a> •
37
+ <a href="ATTRIBUTION.md">📜 Attribution Required</a>
38
+ </p>
39
+
40
+ ---
41
+
42
+ ## Install in One Command
43
+
44
+ ```bash
45
+ npm install -g superlocalmemory
46
+ ```
47
+
48
+ Or clone manually:
49
+ ```bash
50
+ git clone https://github.com/varun369/SuperLocalMemoryV2.git && cd SuperLocalMemoryV2 && ./install.sh
51
+ ```
52
+
53
+ Both methods auto-detect and configure **16+ IDEs and AI tools** — Cursor, VS Code/Copilot, Codex, Claude, Windsurf, Gemini CLI, JetBrains, and more.
54
+
55
+ ---
56
+
57
+ ## The Problem
58
+
59
+ Every time you start a new Claude session:
60
+
61
+ ```
62
+ You: "Remember that authentication bug we fixed last week?"
63
+ Claude: "I don't have access to previous conversations..."
64
+ You: *sighs and explains everything again*
65
+ ```
66
+
67
+ **AI assistants forget everything between sessions.** You waste time re-explaining your:
68
+ - Project architecture
69
+ - Coding preferences
70
+ - Previous decisions
71
+ - Debugging history
72
+
73
+ ## The Solution
74
+
75
+ ```bash
76
+ # Install in one command
77
+ npm install -g superlocalmemory
78
+
79
+ # Save a memory
80
+ superlocalmemoryv2:remember "Fixed auth bug - JWT tokens were expiring too fast, increased to 24h"
81
+
82
+ # Later, in a new session...
83
+ superlocalmemoryv2:recall "auth bug"
84
+ # ✓ Found: "Fixed auth bug - JWT tokens were expiring too fast, increased to 24h"
85
+ ```
86
+
87
+ **Your AI now remembers everything.** Forever. Locally. For free.
88
+
89
+ ---
90
+
91
+ ## 🚀 Quick Start
92
+
93
+ ### npm (Recommended — All Platforms)
94
+ ```bash
95
+ npm install -g superlocalmemory
96
+ ```
97
+
98
+ ### Mac/Linux (Manual)
99
+ ```bash
100
+ git clone https://github.com/varun369/SuperLocalMemoryV2.git
101
+ cd SuperLocalMemoryV2
102
+ ./install.sh
103
+ ```
104
+
105
+ ### Windows (PowerShell)
106
+ ```powershell
107
+ git clone https://github.com/varun369/SuperLocalMemoryV2.git
108
+ cd SuperLocalMemoryV2
109
+ .\install.ps1
110
+ ```
111
+
112
+ ### Verify Installation
113
+ ```bash
114
+ superlocalmemoryv2:status
115
+ # ✓ Database: OK (0 memories)
116
+ # ✓ Graph: Ready
117
+ # ✓ Patterns: Ready
118
+ ```
119
+
120
+ **That's it.** No Docker. No API keys. No cloud accounts. No configuration.
121
+
122
+ ### Start the Visualization Dashboard
123
+
124
+ ```bash
125
+ # Launch the interactive web UI
126
+ python3 ~/.claude-memory/ui_server.py
127
+
128
+ # Opens at http://localhost:8765
129
+ # Features: Timeline view, search explorer, graph visualization
130
+ ```
131
+
132
+ ---
133
+
134
+ ## 🎨 Visualization Dashboard
135
+
136
+ **NEW in v2.2.0:** Interactive web-based dashboard for exploring your memories visually.
137
+
138
+ ### Features
139
+
140
+ | Feature | Description |
141
+ |---------|-------------|
142
+ | **📈 Timeline View** | See your memories chronologically with importance indicators |
143
+ | **🔍 Search Explorer** | Real-time semantic search with score visualization |
144
+ | **🕸️ Graph Visualization** | Interactive knowledge graph with clusters and relationships |
145
+ | **📊 Statistics Dashboard** | Memory trends, tag clouds, pattern insights |
146
+ | **🎯 Advanced Filters** | Filter by tags, importance, date range, clusters |
147
+
148
+ ### Quick Tour
149
+
150
+ ```bash
151
+ # 1. Start dashboard
152
+ python ~/.claude-memory/ui_server.py
153
+
154
+ # 2. Navigate to http://localhost:8765
155
+
156
+ # 3. Explore your memories:
157
+ # - Timeline: See memories over time
158
+ # - Search: Find with semantic scoring
159
+ # - Graph: Visualize relationships
160
+ # - Stats: Analyze patterns
161
+ ```
162
+
163
+ **[[Complete Dashboard Guide →|Visualization-Dashboard]]**
164
+
165
+ ---
166
+
167
+ ## 🔍 Advanced Search
168
+
169
+ SuperLocalMemory V2.2.0 implements **hybrid search** combining multiple strategies for maximum accuracy.
170
+
171
+ ### Search Strategies
172
+
173
+ | Strategy | Method | Best For | Speed |
174
+ |----------|--------|----------|-------|
175
+ | **Semantic Search** | TF-IDF vectors + cosine similarity | Conceptual queries ("authentication patterns") | 45ms |
176
+ | **Full-Text Search** | SQLite FTS5 with ranking | Exact phrases ("JWT tokens expire") | 30ms |
177
+ | **Graph-Enhanced** | Knowledge graph traversal | Related concepts ("show auth-related") | 60ms |
178
+ | **Hybrid Mode** | All three combined | General queries | 80ms |
179
+
180
+ ### Search Examples
181
+
182
+ ```bash
183
+ # Semantic: finds conceptually similar
184
+ slm recall "security best practices"
185
+ # Matches: "JWT implementation", "OAuth flow", "CSRF protection"
186
+
187
+ # Exact: finds literal text
188
+ slm recall "PostgreSQL 15"
189
+ # Matches: exactly "PostgreSQL 15"
190
+
191
+ # Graph: finds related via clusters
192
+ slm recall "authentication" --use-graph
193
+ # Matches: JWT, OAuth, sessions (via "Auth & Security" cluster)
194
+
195
+ # Hybrid: best of all worlds (default)
196
+ slm recall "API design patterns"
197
+ # Combines semantic + exact + graph for optimal results
198
+ ```
199
+
200
+ ### Search Performance by Dataset Size
201
+
202
+ | Memories | Semantic | FTS5 | Graph | Hybrid |
203
+ |----------|----------|------|-------|--------|
204
+ | 100 | 35ms | 25ms | 50ms | 65ms |
205
+ | 500 | 45ms | 30ms | 60ms | 80ms |
206
+ | 1,000 | 55ms | 35ms | 70ms | 95ms |
207
+ | 5,000 | 85ms | 50ms | 110ms | 150ms |
208
+
209
+ **All search strategies remain sub-second even with 5,000+ memories.**
210
+
211
+ ---
212
+
213
+ ## ⚡ Performance
214
+
215
+ ### Benchmarks (v2.2.0)
216
+
217
+ | Operation | Time | Comparison | Notes |
218
+ |-----------|------|------------|-------|
219
+ | **Add Memory** | < 10ms | - | Instant indexing |
220
+ | **Search (Hybrid)** | 80ms | 3.3x faster than v1 | 500 memories |
221
+ | **Graph Build** | < 2s | - | 100 memories |
222
+ | **Pattern Learning** | < 2s | - | Incremental |
223
+ | **Dashboard Load** | < 500ms | - | 1,000 memories |
224
+ | **Timeline Render** | < 300ms | - | All memories |
225
+
226
+ ### Storage Efficiency
227
+
228
+ | Tier | Description | Compression | Savings |
229
+ |------|-------------|-------------|---------|
230
+ | **Tier 1** | Active memories (0-30 days) | None | - |
231
+ | **Tier 2** | Warm memories (30-90 days) | 60% | Progressive summarization |
232
+ | **Tier 3** | Cold storage (90+ days) | 96% | JSON archival |
233
+
234
+ **Example:** 1,000 memories with mixed ages = ~15MB (vs 380MB uncompressed)
235
+
236
+ ### Scalability
237
+
238
+ | Dataset Size | Search Time | Graph Build | RAM Usage |
239
+ |--------------|-------------|-------------|-----------|
240
+ | 100 memories | 35ms | 0.5s | < 30MB |
241
+ | 500 memories | 45ms | 2s | < 50MB |
242
+ | 1,000 memories | 55ms | 5s | < 80MB |
243
+ | 5,000 memories | 85ms | 30s | < 150MB |
244
+
245
+ **Tested up to 10,000 memories** with linear scaling and no degradation.
246
+
247
+ ---
248
+
249
+ ## 🌐 Works Everywhere
250
+
251
+ **SuperLocalMemory V2 is the ONLY memory system that works across ALL your tools:**
252
+
253
+ ### Supported IDEs & Tools
254
+
255
+ | Tool | Integration | How It Works |
256
+ |------|-------------|--------------|
257
+ | **Claude Code** | ✅ Skills + MCP | `/superlocalmemoryv2:remember` |
258
+ | **Cursor** | ✅ MCP + Skills | AI uses memory tools natively |
259
+ | **Windsurf** | ✅ MCP + Skills | Native memory access |
260
+ | **Claude Desktop** | ✅ MCP | Built-in support |
261
+ | **OpenAI Codex** | ✅ MCP + Skills | Auto-configured (TOML) |
262
+ | **VS Code / Copilot** | ✅ MCP + Skills | `.vscode/mcp.json` |
263
+ | **Continue.dev** | ✅ MCP + Skills | `/slm-remember` |
264
+ | **Cody** | ✅ Custom Commands | `/slm-remember` |
265
+ | **Gemini CLI** | ✅ MCP + Skills | Native MCP + skills |
266
+ | **JetBrains IDEs** | ✅ MCP | Via AI Assistant settings |
267
+ | **Zed Editor** | ✅ MCP | Native MCP tools |
268
+ | **OpenCode** | ✅ MCP | Native MCP tools |
269
+ | **Perplexity** | ✅ MCP | Native MCP tools |
270
+ | **Antigravity** | ✅ MCP + Skills | Native MCP tools |
271
+ | **ChatGPT** | ✅ HTTP Transport | `slm serve` + tunnel |
272
+ | **Aider** | ✅ Smart Wrapper | `aider-smart` with context |
273
+ | **Any Terminal** | ✅ Universal CLI | `slm remember "content"` |
274
+
275
+ ### Three Ways to Access
276
+
277
+ 1. **MCP (Model Context Protocol)** - Auto-configured for Cursor, Windsurf, Claude Desktop
278
+ - AI assistants get natural access to your memory
279
+ - No manual commands needed
280
+ - "Remember that we use FastAPI" just works
281
+
282
+ 2. **Skills & Commands** - For Claude Code, Continue.dev, Cody
283
+ - `/superlocalmemoryv2:remember` in Claude Code
284
+ - `/slm-remember` in Continue.dev and Cody
285
+ - Familiar slash command interface
286
+
287
+ 3. **Universal CLI** - Works in any terminal or script
288
+ - `slm remember "content"` - Simple, clean syntax
289
+ - `slm recall "query"` - Search from anywhere
290
+ - `aider-smart` - Aider with auto-context injection
291
+
292
+ **All three methods use the SAME local database.** No data duplication, no conflicts.
293
+
294
+ ### Auto-Detection
295
+
296
+ Installation automatically detects and configures:
297
+ - Existing IDEs (Cursor, Windsurf, VS Code)
298
+ - Installed tools (Aider, Continue, Cody)
299
+ - Shell environment (bash, zsh)
300
+
301
+ **Zero manual configuration required.** It just works.
302
+
303
+ ### Manual Setup for Other Apps
304
+
305
+ Want to use SuperLocalMemory in ChatGPT, Perplexity, Zed, or other MCP-compatible tools?
306
+
307
+ **📘 Complete setup guide:** [docs/MCP-MANUAL-SETUP.md](docs/MCP-MANUAL-SETUP.md)
308
+
309
+ Covers:
310
+ - ChatGPT Desktop - Add via Settings → MCP
311
+ - Perplexity - Configure via app settings
312
+ - Zed Editor - JSON configuration
313
+ - Cody - VS Code/JetBrains setup
314
+ - Custom MCP clients - Python/HTTP integration
315
+
316
+ All tools connect to the **same local database** - no data duplication.
317
+
318
+ ---
319
+
320
+ ## 💡 Why SuperLocalMemory?
321
+
322
+ ### For Developers Who Use AI Daily
323
+
324
+ | Scenario | Without Memory | With SuperLocalMemory |
325
+ |----------|---------------|----------------------|
326
+ | New Claude session | Re-explain entire project | `recall "project context"` → instant context |
327
+ | Debugging | "We tried X last week..." starts over | Knowledge graph shows related past fixes |
328
+ | Code preferences | "I prefer React..." every time | Pattern learning knows your style |
329
+ | Multi-project | Context constantly bleeds | Separate profiles per project |
330
+
331
+ ### Built on 2026 Research
332
+
333
+ Not another simple key-value store. SuperLocalMemory implements **cutting-edge memory architecture**:
334
+
335
+ - **PageIndex** (Meta AI) → Hierarchical memory organization
336
+ - **GraphRAG** (Microsoft) → Knowledge graph with auto-clustering
337
+ - **xMemory** (Stanford) → Identity pattern learning
338
+ - **A-RAG** → Multi-level retrieval with context awareness
339
+
340
+ **The only open-source implementation combining all four approaches.**
341
+
342
+ ---
343
+
344
+ ## 🆚 vs Alternatives
345
+
346
+ ### The Hard Truth About "Free" Tiers
347
+
348
+ | Solution | Free Tier Limits | Paid Price | What's Missing |
349
+ |----------|-----------------|------------|----------------|
350
+ | **Mem0** | 10K memories, limited API | Usage-based | No pattern learning, not local |
351
+ | **Zep** | Limited credits | $50/month | Credit system, cloud-only |
352
+ | **Supermemory** | 1M tokens, 10K queries | $19-399/mo | Not local, no graphs |
353
+ | **Personal.AI** | ❌ No free tier | $33/month | Cloud-only, closed ecosystem |
354
+ | **Letta/MemGPT** | Self-hosted (complex) | TBD | Requires significant setup |
355
+ | **SuperLocalMemory V2** | **Unlimited** | **$0 forever** | **Nothing.** |
356
+
357
+ ### Feature Comparison (What Actually Matters)
358
+
359
+ | Feature | Mem0 | Zep | Khoj | Letta | **SuperLocalMemory V2** |
360
+ |---------|------|-----|------|-------|------------------------|
361
+ | **Works in Cursor** | Cloud Only | ❌ | ❌ | ❌ | ✅ **Local** |
362
+ | **Works in Windsurf** | Cloud Only | ❌ | ❌ | ❌ | ✅ **Local** |
363
+ | **Works in VS Code** | 3rd Party | ❌ | Partial | ❌ | ✅ **Native** |
364
+ | **Works in Claude** | ❌ | ❌ | ❌ | ❌ | ✅ |
365
+ | **Works with Aider** | ❌ | ❌ | ❌ | ❌ | ✅ |
366
+ | **Universal CLI** | ❌ | ❌ | ❌ | ❌ | ✅ |
367
+ | **7-Layer Universal Architecture** | ❌ | ❌ | ❌ | ❌ | ✅ |
368
+ | **Pattern Learning** | ❌ | ❌ | ❌ | ❌ | ✅ |
369
+ | **Multi-Profile Support** | ❌ | ❌ | ❌ | Partial | ✅ |
370
+ | **Knowledge Graphs** | ✅ | ✅ | ❌ | ❌ | ✅ |
371
+ | **100% Local** | ❌ | ❌ | Partial | Partial | ✅ |
372
+ | **Zero Setup** | ❌ | ❌ | ❌ | ❌ | ✅ |
373
+ | **Progressive Compression** | ❌ | ❌ | ❌ | ❌ | ✅ |
374
+ | **Completely Free** | Limited | Limited | Partial | ✅ | ✅ |
375
+
376
+ **SuperLocalMemory V2 is the ONLY solution that:**
377
+ - ✅ Works across 16+ IDEs and CLI tools
378
+ - ✅ Remains 100% local (no cloud dependencies)
379
+ - ✅ Completely free with unlimited memories
380
+
381
+ [See full competitive analysis →](docs/COMPETITIVE-ANALYSIS.md)
382
+
383
+ ---
384
+
385
+ ## ✨ Features
386
+
387
+ ### Multi-Layer Memory Architecture
388
+
389
+ ```
390
+ ┌─────────────────────────────────────────────────────────────┐
391
+ │ Layer 9: VISUALIZATION (NEW v2.2.0) │
392
+ │ Interactive dashboard: timeline, search, graph explorer │
393
+ │ Real-time analytics and visual insights │
394
+ ├─────────────────────────────────────────────────────────────┤
395
+ │ Layer 8: HYBRID SEARCH (NEW v2.2.0) │
396
+ │ Combines: Semantic + FTS5 + Graph traversal │
397
+ │ 80ms response time with maximum accuracy │
398
+ ├─────────────────────────────────────────────────────────────┤
399
+ │ Layer 7: UNIVERSAL ACCESS │
400
+ │ MCP + Skills + CLI (works everywhere) │
401
+ │ 16+ IDEs with single database │
402
+ ├─────────────────────────────────────────────────────────────┤
403
+ │ Layer 6: MCP INTEGRATION │
404
+ │ Model Context Protocol: 6 tools, 4 resources, 2 prompts │
405
+ │ Auto-configured for Cursor, Windsurf, Claude │
406
+ ├─────────────────────────────────────────────────────────────┤
407
+ │ Layer 5: SKILLS LAYER │
408
+ │ 6 universal slash-commands for AI assistants │
409
+ │ Compatible with Claude Code, Continue, Cody │
410
+ ├─────────────────────────────────────────────────────────────┤
411
+ │ Layer 4: PATTERN LEARNING │
412
+ │ Learns: coding style, preferences, terminology │
413
+ │ "You prefer React over Vue" (73% confidence) │
414
+ ├─────────────────────────────────────────────────────────────┤
415
+ │ Layer 3: KNOWLEDGE GRAPH │
416
+ │ Auto-clusters: "Auth & Tokens", "Performance", "Testing" │
417
+ │ Discovers relationships you didn't know existed │
418
+ ├─────────────────────────────────────────────────────────────┤
419
+ │ Layer 2: HIERARCHICAL INDEX │
420
+ │ Tree structure for fast navigation │
421
+ │ O(log n) lookups instead of O(n) scans │
422
+ ├─────────────────────────────────────────────────────────────┤
423
+ │ Layer 1: RAW STORAGE │
424
+ │ SQLite + Full-text search + TF-IDF vectors │
425
+ │ Compression: 60-96% space savings │
426
+ └─────────────────────────────────────────────────────────────┘
427
+ ```
428
+
429
+ ### Knowledge Graph (It's Magic)
430
+
431
+ ```bash
432
+ # Build the graph from your memories
433
+ python ~/.claude-memory/graph_engine.py build
434
+
435
+ # Output:
436
+ # ✓ Processed 47 memories
437
+ # ✓ Created 12 clusters:
438
+ # - "Authentication & Tokens" (8 memories)
439
+ # - "Performance Optimization" (6 memories)
440
+ # - "React Components" (11 memories)
441
+ # - "Database Queries" (5 memories)
442
+ # ...
443
+ ```
444
+
445
+ **The graph automatically discovers relationships.** Ask "what relates to auth?" and get JWT, session management, token refresh—even if you never tagged them together.
446
+
447
+ ### Pattern Learning (It Knows You)
448
+
449
+ ```bash
450
+ # Learn patterns from your memories
451
+ python ~/.claude-memory/pattern_learner.py update
452
+
453
+ # Get your coding identity
454
+ python ~/.claude-memory/pattern_learner.py context 0.5
455
+
456
+ # Output:
457
+ # Your Coding Identity:
458
+ # - Framework preference: React (73% confidence)
459
+ # - Style: Performance over readability (58% confidence)
460
+ # - Testing: Jest + React Testing Library (65% confidence)
461
+ # - API style: REST over GraphQL (81% confidence)
462
+ ```
463
+
464
+ **Your AI assistant can now match your preferences automatically.**
465
+
466
+ ### Multi-Profile Support
467
+
468
+ ```bash
469
+ # Work profile
470
+ superlocalmemoryv2:profile create work --description "Day job"
471
+ superlocalmemoryv2:profile switch work
472
+
473
+ # Personal projects
474
+ superlocalmemoryv2:profile create personal
475
+ superlocalmemoryv2:profile switch personal
476
+
477
+ # Client projects (completely isolated)
478
+ superlocalmemoryv2:profile create client-acme
479
+ ```
480
+
481
+ **Each profile has isolated memories, graphs, and patterns.** No context bleeding.
482
+
483
+ ---
484
+
485
+ ## 📖 Documentation
486
+
487
+ | Guide | Description |
488
+ |-------|-------------|
489
+ | [Quick Start](https://github.com/varun369/SuperLocalMemoryV2/wiki/Quick-Start-Tutorial) | Get running in 5 minutes |
490
+ | [Installation](https://github.com/varun369/SuperLocalMemoryV2/wiki/Installation) | Detailed setup instructions |
491
+ | [Visualization Dashboard](https://github.com/varun369/SuperLocalMemoryV2/wiki/Visualization-Dashboard) | Interactive web UI guide (NEW v2.2.0) |
492
+ | [CLI Reference](docs/CLI-COMMANDS-REFERENCE.md) | All commands explained |
493
+ | [Knowledge Graph](docs/GRAPH-ENGINE.md) | How clustering works |
494
+ | [Pattern Learning](docs/PATTERN-LEARNING.md) | Identity extraction |
495
+ | [Profiles Guide](docs/PROFILES-GUIDE.md) | Multi-context management |
496
+ | [API Reference](docs/API-REFERENCE.md) | Python API documentation |
497
+
498
+ ---
499
+
500
+ ## 🔧 CLI Commands
501
+
502
+ ```bash
503
+ # Memory Operations
504
+ superlocalmemoryv2:remember "content" --tags tag1,tag2 # Save memory
505
+ superlocalmemoryv2:recall "search query" # Search
506
+ superlocalmemoryv2:list # Recent memories
507
+ superlocalmemoryv2:status # System health
508
+
509
+ # Profile Management
510
+ superlocalmemoryv2:profile list # Show all profiles
511
+ superlocalmemoryv2:profile create <name> # New profile
512
+ superlocalmemoryv2:profile switch <name> # Switch context
513
+
514
+ # Knowledge Graph
515
+ python ~/.claude-memory/graph_engine.py build # Build graph
516
+ python ~/.claude-memory/graph_engine.py stats # View clusters
517
+ python ~/.claude-memory/graph_engine.py related --id 5 # Find related
518
+
519
+ # Pattern Learning
520
+ python ~/.claude-memory/pattern_learner.py update # Learn patterns
521
+ python ~/.claude-memory/pattern_learner.py context 0.5 # Get identity
522
+
523
+ # Reset (Use with caution!)
524
+ superlocalmemoryv2:reset soft # Clear memories
525
+ superlocalmemoryv2:reset hard --confirm # Nuclear option
526
+ ```
527
+
528
+ ---
529
+
530
+ ## 📊 Performance
531
+
532
+ **SEO:** Performance benchmarks, memory system speed, search latency, visualization dashboard performance
533
+
534
+ | Metric | Result | Notes |
535
+ |--------|--------|-------|
536
+ | **Hybrid search** | **80ms** | Semantic + FTS5 + Graph combined |
537
+ | **Semantic search** | **45ms** | 3.3x faster than v1 |
538
+ | **FTS5 search** | **30ms** | Exact phrase matching |
539
+ | **Graph build (100 memories)** | **< 2 seconds** | Leiden clustering |
540
+ | **Pattern learning** | **< 2 seconds** | Incremental updates |
541
+ | **Dashboard load** | **< 500ms** | 1,000 memories |
542
+ | **Timeline render** | **< 300ms** | All memories visualized |
543
+ | **Storage compression** | **60-96% reduction** | Progressive tiering |
544
+ | **Memory overhead** | **< 50MB RAM** | Lightweight |
545
+
546
+ **Tested up to 10,000 memories** with sub-second search times and linear scaling.
547
+
548
+ ---
549
+
550
+ ## 🤝 Contributing
551
+
552
+ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
553
+
554
+ **Areas for contribution:**
555
+ - Additional pattern categories
556
+ - Graph visualization UI
557
+ - Integration with more AI assistants
558
+ - Performance optimizations
559
+ - Documentation improvements
560
+
561
+ ---
562
+
563
+ ## 💖 Support This Project
564
+
565
+ If SuperLocalMemory saves you time, consider supporting its development:
566
+
567
+ - ⭐ **Star this repo** — helps others discover it
568
+ - 🐛 **Report bugs** — [open an issue](https://github.com/varun369/SuperLocalMemoryV2/issues)
569
+ - 💡 **Suggest features** — [start a discussion](https://github.com/varun369/SuperLocalMemoryV2/discussions)
570
+ - ☕ **Buy me a coffee** — [buymeacoffee.com/varunpratah](https://buymeacoffee.com/varunpratah)
571
+ - 💸 **PayPal** — [paypal.me/varunpratapbhardwaj](https://paypal.me/varunpratapbhardwaj)
572
+ - 💖 **Sponsor** — [GitHub Sponsors](https://github.com/sponsors/varun369)
573
+
574
+ ---
575
+
576
+ ## 📜 License
577
+
578
+ MIT License — use freely, even commercially. Just include the license.
579
+
580
+ ---
581
+
582
+ ## 👨‍💻 Author
583
+
584
+ **Varun Pratap Bhardwaj** — Solution Architect
585
+
586
+ [![GitHub](https://img.shields.io/badge/GitHub-@varun369-181717?style=flat-square&logo=github)](https://github.com/varun369)
587
+
588
+ Building tools that make AI actually useful for developers.
589
+
590
+ ---
591
+
592
+ <p align="center">
593
+ <b>100% local. 100% private. 100% yours.</b>
594
+ </p>
595
+
596
+ <p align="center">
597
+ <a href="https://github.com/varun369/SuperLocalMemoryV2">
598
+ <img src="https://img.shields.io/badge/⭐_Star_on_GitHub-black?style=for-the-badge&logo=github" alt="Star on GitHub"/>
599
+ </a>
600
+ </p>
@@ -0,0 +1,72 @@
1
+ #!/bin/bash
2
+ # aider-smart - Aider with SuperLocalMemory context injection
3
+ #
4
+ # Copyright (c) 2026 Varun Pratap Bhardwaj
5
+ # Licensed under MIT License
6
+ #
7
+ # Automatically injects relevant project context from SuperLocalMemory
8
+ # when launching Aider CLI for AI-assisted coding.
9
+
10
+ set -e
11
+
12
+ SLM_DIR="${HOME}/.claude-memory"
13
+
14
+ # Check if Aider is installed
15
+ if ! command -v aider &> /dev/null; then
16
+ echo "Error: Aider not found. Install: pip install aider-chat"
17
+ exit 1
18
+ fi
19
+
20
+ # Check if SuperLocalMemory is installed
21
+ if [ ! -d "$SLM_DIR" ]; then
22
+ echo "Error: SuperLocalMemory V2 not installed"
23
+ echo "Install from: https://github.com/varun369/SuperLocalMemoryV2"
24
+ exit 1
25
+ fi
26
+
27
+ # Generate context from current project
28
+ project=$(basename "$PWD")
29
+ CONTEXT_FILE="/tmp/slm-aider-context-$$.txt"
30
+
31
+ echo "🧠 Gathering project context from SuperLocalMemory..."
32
+ echo ""
33
+
34
+ # Get recent project memories
35
+ if command -v slm &> /dev/null; then
36
+ # Use slm command if available
37
+ slm context > "$CONTEXT_FILE" 2>/dev/null || {
38
+ "$SLM_DIR/bin/superlocalmemoryv2:recall" "$project" --limit 5 > "$CONTEXT_FILE" 2>/dev/null || true
39
+ }
40
+ else
41
+ # Fallback to direct command
42
+ "$SLM_DIR/bin/superlocalmemoryv2:recall" "$project" --limit 5 > "$CONTEXT_FILE" 2>/dev/null || true
43
+ fi
44
+
45
+ # Get coding patterns if available
46
+ if [ -f "$SLM_DIR/pattern_learner.py" ]; then
47
+ echo "" >> "$CONTEXT_FILE"
48
+ echo "## Your Coding Patterns:" >> "$CONTEXT_FILE"
49
+ python3 "$SLM_DIR/pattern_learner.py" context 0.6 >> "$CONTEXT_FILE" 2>/dev/null || true
50
+ fi
51
+
52
+ # Launch Aider with context
53
+ if [ -s "$CONTEXT_FILE" ] && [ "$(wc -l < "$CONTEXT_FILE")" -gt 1 ]; then
54
+ echo "✓ Context loaded from SuperLocalMemory"
55
+ echo ""
56
+
57
+ # Pass context to Aider
58
+ aider \
59
+ --read "$CONTEXT_FILE" \
60
+ --message "Context from SuperLocalMemory V2 loaded. I have access to your project's memory and coding patterns." \
61
+ "$@"
62
+ else
63
+ echo "⚠ No context found for project: $project"
64
+ echo " Use: slm remember \"project info\" to save context"
65
+ echo ""
66
+
67
+ # Launch Aider without context
68
+ aider "$@"
69
+ fi
70
+
71
+ # Cleanup
72
+ rm -f "$CONTEXT_FILE"