superlocalmemory 3.6.13 → 3.6.14

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 (124) hide show
  1. package/.claude-plugin/marketplace.json +17 -0
  2. package/README.md +187 -741
  3. package/package.json +12 -5
  4. package/plugin/.claude-plugin/plugin.json +20 -0
  5. package/plugin/.mcp.json +12 -0
  6. package/plugin/CLAUDE.md +43 -0
  7. package/plugin/_GENERATED.md +6 -0
  8. package/plugin/agents/slm-memory-advisor.md +43 -0
  9. package/plugin/agents/slm-optimize-advisor.md +38 -0
  10. package/plugin/hooks/hooks.json +14 -0
  11. package/plugin/requirements.txt +1 -0
  12. package/plugin/scripts/ensure-venv.bat +122 -0
  13. package/plugin/scripts/ensure-venv.sh +105 -0
  14. package/plugin/scripts/slm-launch +15 -0
  15. package/plugin/scripts/slm-launch.bat +17 -0
  16. package/plugin/settings.json +16 -0
  17. package/plugin/skills/slm-cache/SKILL.md +140 -0
  18. package/plugin/skills/slm-compress/SKILL.md +143 -0
  19. package/plugin/skills/slm-graph/SKILL.md +300 -0
  20. package/plugin/skills/slm-recall/SKILL.md +196 -0
  21. package/plugin/skills/slm-remember/SKILL.md +182 -0
  22. package/plugin/skills/slm-session/SKILL.md +207 -0
  23. package/plugin/skills/slm-status/SKILL.md +149 -0
  24. package/plugin-src/.mcp.json +12 -0
  25. package/plugin-src/agents/slm-memory-advisor.md +43 -0
  26. package/plugin-src/agents/slm-optimize-advisor.md +38 -0
  27. package/plugin-src/commands/slm-optimize.md +22 -0
  28. package/plugin-src/commands/slm-recall.md +16 -0
  29. package/plugin-src/commands/slm-remember.md +16 -0
  30. package/plugin-src/commands/slm-status.md +15 -0
  31. package/plugin-src/hooks/.gitkeep +0 -0
  32. package/plugin-src/hooks/hooks.json +14 -0
  33. package/plugin-src/manifest.json +25 -0
  34. package/plugin-src/requirements.txt +1 -0
  35. package/plugin-src/rules/AGENTS.md +90 -0
  36. package/plugin-src/rules/CLAUDE.md.fragment +43 -0
  37. package/plugin-src/scripts/ensure-venv.bat +122 -0
  38. package/plugin-src/scripts/ensure-venv.sh +105 -0
  39. package/plugin-src/scripts/slm-launch +15 -0
  40. package/plugin-src/scripts/slm-launch.bat +17 -0
  41. package/plugin-src/settings.json +16 -0
  42. package/plugin-src/skills/slm-cache/SKILL.md +140 -0
  43. package/plugin-src/skills/slm-compress/SKILL.md +143 -0
  44. package/plugin-src/skills/slm-graph/SKILL.md +300 -0
  45. package/plugin-src/skills/slm-recall/SKILL.md +196 -0
  46. package/plugin-src/skills/slm-remember/SKILL.md +182 -0
  47. package/plugin-src/skills/slm-session/SKILL.md +207 -0
  48. package/plugin-src/skills/slm-status/SKILL.md +149 -0
  49. package/pyproject.toml +6 -2
  50. package/scripts/__tests__/build-plugin.test.mjs +613 -0
  51. package/scripts/_savings_math.py +270 -0
  52. package/scripts/build-plugin.js +742 -0
  53. package/scripts/dogfood_savings.py +490 -0
  54. package/scripts/install-skills.ps1 +4 -334
  55. package/scripts/install-skills.sh +4 -435
  56. package/scripts/postinstall-interactive.js +0 -27
  57. package/scripts/postinstall.js +21 -2
  58. package/src/superlocalmemory/__init__.py +1 -1
  59. package/src/superlocalmemory/cli/_lazy_init.py +115 -0
  60. package/src/superlocalmemory/cli/commands.py +348 -39
  61. package/src/superlocalmemory/cli/main.py +47 -4
  62. package/src/superlocalmemory/cli/setup_wizard.py +20 -6
  63. package/src/superlocalmemory/core/config.py +79 -9
  64. package/src/superlocalmemory/core/embeddings.py +10 -5
  65. package/src/superlocalmemory/core/engine.py +2 -2
  66. package/src/superlocalmemory/hooks/claude_code_hooks.py +27 -3
  67. package/src/superlocalmemory/hooks/portable_kit.py +506 -0
  68. package/src/superlocalmemory/infra/cloud_backup.py +99 -23
  69. package/src/superlocalmemory/mcp/cli_fallback.py +602 -0
  70. package/src/superlocalmemory/mcp/server.py +75 -4
  71. package/src/superlocalmemory/mcp/tools_code_graph.py +3 -3
  72. package/src/superlocalmemory/mcp/tools_core.py +12 -4
  73. package/src/superlocalmemory/optimize/cache/boundary_store.py +25 -6
  74. package/src/superlocalmemory/optimize/cache/centroid_store.py +27 -4
  75. package/src/superlocalmemory/optimize/cache/manager.py +92 -6
  76. package/src/superlocalmemory/optimize/cache/semantic.py +20 -1
  77. package/src/superlocalmemory/optimize/compress/ccr.py +12 -0
  78. package/src/superlocalmemory/optimize/compress/router.py +46 -13
  79. package/src/superlocalmemory/optimize/config/schema.py +6 -0
  80. package/src/superlocalmemory/optimize/proxy/_helpers.py +111 -8
  81. package/src/superlocalmemory/optimize/proxy/anthropic_surface.py +14 -4
  82. package/src/superlocalmemory/optimize/proxy/gemini_surface.py +23 -6
  83. package/src/superlocalmemory/optimize/proxy/openai_surface.py +10 -4
  84. package/src/superlocalmemory/optimize/proxy/server.py +11 -0
  85. package/src/superlocalmemory/optimize/proxy/vertex_surface.py +246 -0
  86. package/src/superlocalmemory/optimize/storage/db.py +30 -0
  87. package/src/superlocalmemory/server/recall_serializer.py +3 -1
  88. package/src/superlocalmemory/server/unified_daemon.py +24 -6
  89. package/src/superlocalmemory/ui/css/legacy-dashboard.css +18 -0
  90. package/src/superlocalmemory/ui/css/neural-glass.css +5 -0
  91. package/src/superlocalmemory/ui/index.html +2 -2
  92. package/src/superlocalmemory/ui/js/core.js +98 -0
  93. package/src/superlocalmemory/ui/js/dashboard.js +8 -1
  94. package/src/superlocalmemory/ui/js/ide-status.js +16 -3
  95. package/src/superlocalmemory/ui/js/math-health.js +15 -3
  96. package/src/superlocalmemory/ui/js/optimize.js +18 -2
  97. package/src/superlocalmemory/ui/js/trust-dashboard.js +10 -1
  98. package/src/superlocalmemory.egg-info/PKG-INFO +189 -742
  99. package/src/superlocalmemory.egg-info/SOURCES.txt +6 -9
  100. package/src/superlocalmemory.egg-info/requires.txt +1 -0
  101. package/ide/skills/slm-build-graph/SKILL.md +0 -423
  102. package/ide/skills/slm-list-recent/SKILL.md +0 -348
  103. package/ide/skills/slm-recall/SKILL.md +0 -326
  104. package/ide/skills/slm-remember/SKILL.md +0 -194
  105. package/ide/skills/slm-show-patterns/SKILL.md +0 -224
  106. package/ide/skills/slm-status/SKILL.md +0 -363
  107. package/ide/skills/slm-switch-profile/SKILL.md +0 -442
  108. package/skills/slm-build-graph/SKILL.md +0 -423
  109. package/skills/slm-list-recent/SKILL.md +0 -348
  110. package/skills/slm-optimize/README.md +0 -55
  111. package/skills/slm-optimize/SKILL.md +0 -139
  112. package/skills/slm-recall/SKILL.md +0 -343
  113. package/skills/slm-remember/SKILL.md +0 -194
  114. package/skills/slm-show-patterns/SKILL.md +0 -224
  115. package/skills/slm-status/SKILL.md +0 -363
  116. package/skills/slm-switch-profile/SKILL.md +0 -442
  117. package/src/superlocalmemory/cli/doctor_cmd.py +0 -152
  118. package/src/superlocalmemory/skills/slm-build-graph/SKILL.md +0 -423
  119. package/src/superlocalmemory/skills/slm-list-recent/SKILL.md +0 -348
  120. package/src/superlocalmemory/skills/slm-recall/SKILL.md +0 -343
  121. package/src/superlocalmemory/skills/slm-remember/SKILL.md +0 -194
  122. package/src/superlocalmemory/skills/slm-show-patterns/SKILL.md +0 -224
  123. package/src/superlocalmemory/skills/slm-status/SKILL.md +0 -363
  124. package/src/superlocalmemory/skills/slm-switch-profile/SKILL.md +0 -442
@@ -1,343 +0,0 @@
1
- ---
2
- name: slm-recall
3
- description: Search SuperLocalMemory for relevant facts, decisions, and past context. Use when the user asks to recall, search, find, or retrieve stored information. Invokes 5-channel retrieval with LightGBM reranking via MCP.
4
- version: "3.4.23"
5
- license: AGPL-3.0-or-later
6
- compatibility: "SuperLocalMemory v3.4.22 — MCP (preferred) or CLI fallback"
7
- attribution:
8
- creator: Varun Pratap Bhardwaj
9
- role: Solution Architect & Creator
10
- project: SuperLocalMemory v3
11
- ---
12
-
13
- # SuperLocalMemory: Recall
14
-
15
- Search and retrieve memories using semantic similarity, knowledge graph relationships, and full-text search.
16
-
17
- ## Usage
18
-
19
- ```bash
20
- slm recall "<query>" [--limit N] [--min-score 0.0-1.0] [--tags tag1,tag2] [--project name]
21
- ```
22
-
23
- ## Examples
24
-
25
- ### Example 1: Basic Search
26
- ```bash
27
- slm recall "FastAPI"
28
- ```
29
-
30
- **Output:**
31
- ```
32
- 🔍 Search Results (3 found)
33
-
34
- [ID: 42] Score: 0.85
35
- We use FastAPI for REST APIs
36
- Tags: python, backend, api
37
- Project: myapp
38
- Created: 2026-02-05 14:23
39
-
40
- [ID: 38] Score: 0.72
41
- FastAPI is faster than Flask for high-throughput APIs
42
- Tags: performance, python
43
- Project: default
44
- Created: 2026-02-01 09:15
45
-
46
- [ID: 29] Score: 0.68
47
- Async endpoints in FastAPI improve concurrency
48
- Tags: async, fastapi, python
49
- Project: myapp
50
- Created: 2026-01-28 11:42
51
- ```
52
-
53
- ### Example 2: Limited Results
54
- ```bash
55
- slm recall "authentication" --limit 3
56
- ```
57
-
58
- **Returns:** Top 3 most relevant results
59
-
60
- ### Example 3: Minimum Relevance Score
61
- ```bash
62
- slm recall "React hooks" --min-score 0.7
63
- ```
64
-
65
- **Only returns results with relevance score ≥ 0.7**
66
-
67
- ### Example 4: Filter by Tags
68
- ```bash
69
- slm recall "database" --tags postgresql,performance
70
- ```
71
-
72
- **Only searches memories tagged with specified tags**
73
-
74
- ### Example 5: Filter by Project
75
- ```bash
76
- slm recall "API design" --project myapp
77
- ```
78
-
79
- **Only searches memories in specified project**
80
-
81
- ## Arguments
82
-
83
- | Argument | Type | Required | Default | Description |
84
- |----------|------|----------|---------|-------------|
85
- | `<query>` | string | Yes | - | Search query |
86
- | `--limit` | integer | No | 10 | Max results to return |
87
- | `--min-score` | float | No | 0.3 | Minimum relevance (0.0-1-tags` | string | No | None | Filter by tags (comma-separated) |
88
- | `--project` | string | No | None | Filter by project |
89
-
90
- ## Search Methods Used
91
-
92
- SuperLocalMemory uses **3 search methods simultaneously** and merges results:
93
-
94
- ### 1. Semantic Search (TF-IDF)
95
- - Converts query to vector
96
- - Finds similar content vectors
97
- - Best for: Conceptual matches
98
-
99
- **Example:**
100
- ```
101
- Query: "authentication patterns"
102
- Matches: "JWT tokens", "OAuth flow", "session management"
103
- ```
104
-
105
- ### 2. Knowledge Graph Traversal
106
- - Finds related memories via graph edges
107
- - Discovers connected concepts
108
- - Best for: Related information
109
-
110
- **Example:**
111
- ```
112
- Query: "FastAPI"
113
- Graph finds: "REST API" → "JWT auth" → "token refresh"
114
- ```
115
-
116
- ### 3. Full-Text Search (FTS5)
117
- - Exact keyword matching
118
- - Fast for known terms
119
- - Best for: Specific phrases
120
-
121
- **Example:**
122
- ```
123
- Query: "PostgreSQL 15"
124
- Finds: Exact mentions of "PostgreSQL 15"
125
- ```
126
-
127
- ## Relevance Scores
128
-
129
- **Score range:** 0.0 - 1.0
130
-
131
- | Score | Meaning |
132
- |-------|---------|
133
- | **0.9 - 1.0** | Excellent match (almost exact) |
134
- | **0.7 - 0.9** | Strong match (very relevant) |
135
- | **0.5 - 0.7** | Good match (related) |
136
- | **0.3 - 0.5** | Weak match (loosely related) |
137
- | **< 0.3** | Poor match (filtered out by default) |
138
-
139
- **Factors affecting score:**
140
- - Keyword overlap
141
- - Semantic similarity
142
- - Graph distance
143
- - Recency (newer = slight boost)
144
- - Importance level
145
- - Your usage patterns (results improve automatically over time)
146
-
147
- ## Advanced Usage
148
-
149
- ### Natural Language (in AI chat)
150
-
151
- Most AI assistants automatically invoke this skill when you ask:
152
- - "What did we decide about..."
153
- - "Recall information about..."
154
- - "Search for..."
155
- - "What do we know about..."
156
-
157
- **Example in Cursor/Claude:**
158
- ```
159
- You: "What did we decide about authentication?"
160
- AI: [Automatically invokes slm-recall skill]
161
- Found 3 memories about JWT tokens and OAuth...
162
- ```
163
-
164
- ### Combined with Other Skills
165
-
166
- **1. Recall then remember:**
167
- ```bash
168
- # Find existing memories
169
- slm recall "API design"
170
-
171
- # Add new related memory
172
- slm remember "New API versioning strategy: use /v2/ prefix" --tags api,versioning
173
- ```
174
-
175
- **2. Recall then build graph:**
176
- ```bash
177
- # Find memories
178
- slm recall "performance"
179
-
180
- # Rebuild graph to discover new connections
181
- slm build-graph
182
- ```
183
-
184
- ### Scripting & Automation
185
-
186
- **Find and export:**
187
- ```bash
188
- # Search and save to file
189
- slm recall "security" --min-score 0.7 > security-notes.txt
190
-
191
- # Count memories matching query
192
- slm recall "python" --limit 999 | grep "^\\[ID:" | wc -l
193
- ```
194
-
195
- **Regular reminders:**
196
- ```bash
197
- # Daily standup helper (cron job)
198
- #!/bin/bash
199
- echo "Yesterday's decisions:"
200
- slm recall "decided" --limit 5
201
-
202
- echo -e "\nCurrent blockers:"
203
- slm recall "blocked" --tags critical --limit 3
204
- ```
205
-
206
- ## Troubleshooting
207
-
208
- ### "No memories found"
209
-
210
- **Causes:**
211
- 1. No memories matching query
212
- 2. Min-score too high
213
- 3. Wrong project filter
214
-
215
- **Solutions:**
216
- ```bash
217
- # Lower minimum score
218
- slm recall "query" --min-score 0.1
219
-
220
- # Remove filters
221
- slm recall "query" # No project/tag filters
222
-
223
- # Check what memories exist
224
- slm list --limit 20
225
- ```
226
-
227
- ### "Search too slow"
228
-
229
- **Causes:**
230
- - Large database (10,000+ memories)
231
- - Complex query
232
- - Knowledge graph not optimized
233
-
234
- **Solutions:**
235
- ```bash
236
- # Rebuild indexes
237
- slm build-graph
238
-
239
- # Use filters to narrow search
240
- slm recall "query" --project myapp --tags specific-tag
241
-
242
- # Increase min-score (fewer results = faster)
243
- slm recall "query" --min-score 0.7
244
- ```
245
-
246
- ### "Results not relevant"
247
-
248
- **Causes:**
249
- - Query too vague
250
- - Need to add more context
251
-
252
- **Solutions:**
253
- ```bash
254
- # Be more specific
255
- ❌ slm recall "it"
256
- ✅ slm recall "authentication system"
257
-
258
- # Use multiple keywords
259
- ✅ slm recall "FastAPI JWT authentication"
260
-
261
- # Use tags to filter
262
- ✅ slm recall "performance" --tags database
263
- ```
264
-
265
- ## Output Formats
266
-
267
- ### Standard Format (Default)
268
- ```
269
- 🔍 Search Results (3 found)
270
-
271
- [ID: 42] Score: 0.85
272
- Content preview...
273
- Tags: tag1, tag2
274
- Project: myapp
275
- Created: 2026-02-05
276
- ```
277
-
278
- ### Programmatic Use
279
- ```bash
280
- # JSON output (for scripts)
281
- slm recall "query" --format json
282
- # {"results": [{"id": 42, "content": "...", "score": 0.85}, ...]}
283
-
284
- # CSV output
285
- slm recall "query" --format csv
286
- # id,content,score,tags,project,created_at
287
- # 42,"Content...",0.85,"tag1,tag2",myapp,2026-02-05
288
- ```
289
-
290
- ## Performance Benchmarks
291
-
292
- | Database Size | Search Time | Notes |
293
- |--------------|-------------|-------|
294
- | 100 memories | ~100ms | Instant |
295
- | 1,000 memories | ~500ms | Fast |
296
- | 10,000 memories | ~1.5s | Acceptable |
297
- | 50,000 memories | ~5s | Consider filtering |
298
-
299
- **Optimization tips:**
300
- - Use `--min-score` to filter early
301
- - Use `--tags` or `--project` to narrow search
302
- - Rebuild graph periodically: `slm build-graph`
303
-
304
- ## Notes
305
-
306
- - **Multi-method:** Combines semantic, graph, and keyword search
307
- - **Ranked results:** Best matches first
308
- - **Cross-tool:** Same results in Cursor, ChatGPT, Claude, etc.
309
- - **Privacy:** All search happens locally
310
- - **Real-time:** Database updates reflected immediately
311
-
312
- ## Related Commands
313
-
314
- - `slm remember "<content>"` - Save a new memory
315
- - `slm list` - List recent memories (no search)
316
- - `slm status` - Check memory count and graph stats
317
- - `slm build-graph` - Optimize search performance
318
-
319
- ---
320
-
321
- **Created by:** [Varun Pratap Bhardwaj](https://github.com/varun369) (Solution Architect)
322
- **Project:** SuperLocalMemory V2
323
- **License:** MIT (see [LICENSE](../../LICENSE))
324
- **Repository:** https://github.com/varun369/SuperLocalMemoryV2
325
-
326
- *Open source doesn't mean removing credit. Attribution must be preserved per MIT License terms.*
327
-
328
- ## V3 Update (v3.4.22)
329
-
330
- **Preferred**: Use the `recall` MCP tool directly — it uses 5-channel retrieval
331
- (semantic, BM25, entity-graph, temporal, Hopfield) with LightGBM reranking
332
- and feeds the learning loop.
333
-
334
- ```
335
- recall(query="your query", limit=10, session_id="<current_session>")
336
- ```
337
-
338
- **CLI fallback** (also valid, no MCP required):
339
- ```bash
340
- slm recall "<query>" [--limit N]
341
- ```
342
-
343
- Always pass `session_id` when using MCP so engagement signals feed the ranker.
@@ -1,194 +0,0 @@
1
- ---
2
- name: slm-remember
3
- description: Save content to SuperLocalMemory with intelligent indexing and knowledge graph integration. Use when the user wants to remember information, save context, store coding decisions, or persist knowledge for future sessions. Automatically indexes, graphs, and learns patterns.
4
- version: "3.4.23"
5
- license: AGPL-3.0-or-later
6
- compatibility: "Requires SuperLocalMemory V2 installed at ~/.claude-memory/"
7
- attribution:
8
- creator: Varun Pratap Bhardwaj
9
- role: Solution Architect & Original Creator
10
- project: SuperLocalMemory V2
11
- ---
12
-
13
- # SuperLocalMemory: Remember
14
-
15
- Save content to your local memory system with automatic indexing, knowledge graph integration, and pattern learning.
16
-
17
- ## Usage
18
-
19
- ```bash
20
- slm remember "<content>" [--tags tag1,tag2] [--project name] [--importance 1-10]
21
- ```
22
-
23
- ## Examples
24
-
25
- ### Example 1: Basic Memory
26
- ```bash
27
- slm remember "We use FastAPI for REST APIs"
28
- ```
29
-
30
- **What happens:**
31
- - Content saved to SQLite database
32
- - TF-IDF vectors generated for semantic search
33
- - Entities extracted and added to knowledge graph
34
- - Pattern learning analyzes for coding preferences
35
- - Memory ID returned (e.g., 42)
36
-
37
- ### Example 2: With Tags
38
- ```bash
39
- slm remember "JWT tokens expire after 24 hours" --tags security,auth,jwt
40
- ```
41
-
42
- **Tags help with:**
43
- - Organization
44
- - Filtering
45
- - Related memory discovery
46
-
47
- ### Example 3: With Project
48
- ```bash
49
- slm remember "Database uses PostgreSQL 15 with UUID primary keys" --project myapp --tags database,postgresql
50
- ```
51
-
52
- **Project isolation:**
53
- - Separate memories per project
54
- - Switch profiles with `slm switch-profile`
55
- - No context bleeding
56
-
57
- ### Example 4: Important Memory
58
- ```bash
59
- slm remember "CRITICAL: Production deploy requires approval from @lead" --importance 10 --tags deployment,production
60
- ```
61
-
62
- **Importance (1-10):**
63
- - 1-3: Low priority (notes, ideas)
64
- - 4-6: Normal (coding patterns, decisions)
65
- - 7-9: High priority (critical info, warnings)
66
- - 10: Critical (blockers, security issues)
67
-
68
- ## Arguments
69
-
70
- | Argument | Type | Required | Default | Description |
71
- |----------|------|----------|---------|-------------|
72
- | `<content>` | string | Yes | - | The text to remember |
73
- | `--tags` | string | No | None | Comma-separated tags |
74
- | `--project` | string | No | "default" | Project name |
75
- | `--importance` | integer | No | 5 | Priority level (1-10) |
76
-
77
- ## Output
78
-
79
- ```
80
- Memory added with ID: 42
81
-
82
- ✅ Memory saved successfully
83
-
84
- Next steps:
85
- • Use `slm recall <query>` to search this memory
86
- • Use `slm list` to see recent memories
87
- ```
88
-
89
- ## What Happens Behind the Scenes
90
-
91
- 1. **Content Storage:** Saved to SQLite (`~/.claude-memory/memory.db`)
92
- 2. **Semantic Indexing:** TF-IDF vectors generated for similarity search
93
- 3. **Knowledge Graph:** Entities extracted and nodes/edges created
94
- 4. **Pattern Learning:** Analyzes content for coding preferences (frameworks, style, testing)
95
- 5. **Full-Text Index:** FTS5 index updated for fast keyword search
96
- 6. **Timestamp:** Created timestamp recorded
97
-
98
- ## Advanced Usage
99
-
100
- ### Natural Language (in AI chat)
101
-
102
- Most AI assistants will automatically invoke this skill when you say:
103
- - "Remember that..."
104
- - "Save this for later..."
105
- - "I want to store..."
106
- - "Keep track of..."
107
-
108
- **Example in Cursor/Claude:**
109
- ```
110
- You: "Remember that we decided to use React hooks over class components"
111
- AI: [Automatically invokes slm-remember skill]
112
- ✓ Memory saved
113
- ```
114
-
115
- ### Bulk Import
116
-
117
- Save multiple memories from a file:
118
- ```bash
119
- # From text file (one memory per line)
120
- while IFS= read -r line; do
121
- slm remember "$line" --project bulk-import
122
- done < memories.txt
123
-
124
- # From CSV (content,tags,project)
125
- while IFS=',' read -r content tags project; do
126
- slm remember "$content" --tags "$tags" --project "$project"
127
- done < memories.csv
128
- ```
129
-
130
- ### Integration with Git Hooks
131
-
132
- **Pre-commit hook** (save commit messages):
133
- ```bash
134
- #!/bin/bash
135
- # .git/hooks/post-commit
136
-
137
- commit_msg=$(git log -1 --pretty=%B)
138
- commit_hash=$(git log -1 --pretty=%H)
139
-
140
- slm remember "Commit: $commit_msg (${commit_hash:0:7})" \
141
- --tags git,commit \
142
- --project "$(basename $(git rev-parse --show-toplevel))"
143
- ```
144
-
145
- ## Error Handling
146
-
147
- | Error | Cause | Solution |
148
- |-------|-------|----------|
149
- | "Database locked" | Another process accessing DB | Wait or `killall python3` |
150
- | "Content cannot be empty" | Empty string passed | Provide content |
151
- | "Invalid importance" | Value not 1-10 | Use number between 1-10 |
152
- | "Database not found" | SuperLocalMemory not installed | Run `./install.sh` |
153
-
154
- ## Notes
155
-
156
- - **100% local:** Nothing leaves your machine
157
- - **Cross-tool sync:** All AI tools access same database (Cursor, ChatGPT, Claude, etc.)
158
- - **Unlimited:** No memory limits, no quotas
159
- - **Privacy:** Your data stays on your computer
160
- - **Profiles:** Use `slm switch-profile` for profile isolation
161
-
162
- ## Related Commands
163
-
164
- - `slm recall "<query>"` - Search memories semantically
165
- - `slm list` - List recent memories
166
- - `slm status` - Check system health
167
- - `slm build-graph` - Rebuild knowledge graph
168
- - `slm switch-profile <name>` - Switch memory profile
169
-
170
- ## Technical Details
171
-
172
- **Database Schema:**
173
- - Table: `memories`
174
- - Fields: id, content, tags, project_name, importance, created_at, etc.
175
- - Indexes: Full-text search (FTS5), TF-IDF vectors, timestamps
176
-
177
- **Performance:**
178
- - Add memory: ~50ms
179
- - With knowledge graph: ~300ms
180
- - Large content (10KB): ~1s
181
-
182
- **Limits:**
183
- - Max content size: 1MB
184
- - Max tags: 50 per memory
185
- - Max project name: 64 characters
186
-
187
- ---
188
-
189
- **Created by:** [Varun Pratap Bhardwaj](https://github.com/varun369) (Solution Architect)
190
- **Project:** SuperLocalMemory V2
191
- **License:** MIT (see [LICENSE](../../LICENSE))
192
- **Repository:** https://github.com/varun369/SuperLocalMemoryV2
193
-
194
- *Open source doesn't mean removing credit. Attribution must be preserved per MIT License terms.*