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.
- package/ATTRIBUTION.md +140 -0
- package/CHANGELOG.md +1749 -0
- package/LICENSE +21 -0
- package/README.md +600 -0
- package/bin/aider-smart +72 -0
- package/bin/slm +202 -0
- package/bin/slm-npm +73 -0
- package/bin/slm.bat +195 -0
- package/bin/slm.cmd +10 -0
- package/bin/superlocalmemoryv2:list +3 -0
- package/bin/superlocalmemoryv2:profile +3 -0
- package/bin/superlocalmemoryv2:recall +3 -0
- package/bin/superlocalmemoryv2:remember +3 -0
- package/bin/superlocalmemoryv2:reset +3 -0
- package/bin/superlocalmemoryv2:status +3 -0
- package/completions/slm.bash +58 -0
- package/completions/slm.zsh +76 -0
- package/configs/antigravity-mcp.json +13 -0
- package/configs/chatgpt-desktop-mcp.json +7 -0
- package/configs/claude-desktop-mcp.json +15 -0
- package/configs/codex-mcp.toml +13 -0
- package/configs/cody-commands.json +29 -0
- package/configs/continue-mcp.yaml +14 -0
- package/configs/continue-skills.yaml +26 -0
- package/configs/cursor-mcp.json +15 -0
- package/configs/gemini-cli-mcp.json +11 -0
- package/configs/jetbrains-mcp.json +11 -0
- package/configs/opencode-mcp.json +12 -0
- package/configs/perplexity-mcp.json +9 -0
- package/configs/vscode-copilot-mcp.json +12 -0
- package/configs/windsurf-mcp.json +16 -0
- package/configs/zed-mcp.json +12 -0
- package/docs/ARCHITECTURE.md +877 -0
- package/docs/CLI-COMMANDS-REFERENCE.md +425 -0
- package/docs/COMPETITIVE-ANALYSIS.md +210 -0
- package/docs/COMPRESSION-README.md +390 -0
- package/docs/GRAPH-ENGINE.md +503 -0
- package/docs/MCP-MANUAL-SETUP.md +720 -0
- package/docs/MCP-TROUBLESHOOTING.md +787 -0
- package/docs/PATTERN-LEARNING.md +363 -0
- package/docs/PROFILES-GUIDE.md +453 -0
- package/docs/RESET-GUIDE.md +353 -0
- package/docs/SEARCH-ENGINE-V2.2.0.md +748 -0
- package/docs/SEARCH-INTEGRATION-GUIDE.md +502 -0
- package/docs/UI-SERVER.md +254 -0
- package/docs/UNIVERSAL-INTEGRATION.md +432 -0
- package/docs/V2.2.0-OPTIONAL-SEARCH.md +666 -0
- package/docs/WINDOWS-INSTALL-README.txt +34 -0
- package/docs/WINDOWS-POST-INSTALL.txt +45 -0
- package/docs/example_graph_usage.py +148 -0
- package/hooks/memory-list-skill.js +130 -0
- package/hooks/memory-profile-skill.js +284 -0
- package/hooks/memory-recall-skill.js +109 -0
- package/hooks/memory-remember-skill.js +127 -0
- package/hooks/memory-reset-skill.js +274 -0
- package/install-skills.sh +436 -0
- package/install.ps1 +417 -0
- package/install.sh +755 -0
- package/mcp_server.py +585 -0
- package/package.json +94 -0
- package/requirements-core.txt +24 -0
- package/requirements.txt +10 -0
- package/scripts/postinstall.js +126 -0
- package/scripts/preuninstall.js +57 -0
- package/skills/slm-build-graph/SKILL.md +423 -0
- package/skills/slm-list-recent/SKILL.md +348 -0
- package/skills/slm-recall/SKILL.md +325 -0
- package/skills/slm-remember/SKILL.md +194 -0
- package/skills/slm-status/SKILL.md +363 -0
- package/skills/slm-switch-profile/SKILL.md +442 -0
- package/src/__pycache__/cache_manager.cpython-312.pyc +0 -0
- package/src/__pycache__/embedding_engine.cpython-312.pyc +0 -0
- package/src/__pycache__/graph_engine.cpython-312.pyc +0 -0
- package/src/__pycache__/hnsw_index.cpython-312.pyc +0 -0
- package/src/__pycache__/hybrid_search.cpython-312.pyc +0 -0
- package/src/__pycache__/memory-profiles.cpython-312.pyc +0 -0
- package/src/__pycache__/memory-reset.cpython-312.pyc +0 -0
- package/src/__pycache__/memory_compression.cpython-312.pyc +0 -0
- package/src/__pycache__/memory_store_v2.cpython-312.pyc +0 -0
- package/src/__pycache__/migrate_v1_to_v2.cpython-312.pyc +0 -0
- package/src/__pycache__/pattern_learner.cpython-312.pyc +0 -0
- package/src/__pycache__/query_optimizer.cpython-312.pyc +0 -0
- package/src/__pycache__/search_engine_v2.cpython-312.pyc +0 -0
- package/src/__pycache__/setup_validator.cpython-312.pyc +0 -0
- package/src/__pycache__/tree_manager.cpython-312.pyc +0 -0
- package/src/cache_manager.py +520 -0
- package/src/embedding_engine.py +671 -0
- package/src/graph_engine.py +970 -0
- package/src/hnsw_index.py +626 -0
- package/src/hybrid_search.py +693 -0
- package/src/memory-profiles.py +518 -0
- package/src/memory-reset.py +485 -0
- package/src/memory_compression.py +999 -0
- package/src/memory_store_v2.py +1088 -0
- package/src/migrate_v1_to_v2.py +638 -0
- package/src/pattern_learner.py +898 -0
- package/src/query_optimizer.py +513 -0
- package/src/search_engine_v2.py +403 -0
- package/src/setup_validator.py +479 -0
- package/src/tree_manager.py +720 -0
|
@@ -0,0 +1,194 @@
|
|
|
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: "2.1.0"
|
|
5
|
+
license: MIT
|
|
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 project 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 with attribution requirements (see [ATTRIBUTION.md](../../ATTRIBUTION.md))
|
|
192
|
+
**Repository:** https://github.com/varun369/SuperLocalMemoryV2
|
|
193
|
+
|
|
194
|
+
*Open source doesn't mean removing credit. Attribution must be preserved per MIT License terms.*
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-status
|
|
3
|
+
description: Check SuperLocalMemory system status, health, and statistics. Use when the user wants to know memory count, graph stats, patterns learned, database health, or system diagnostics. Shows comprehensive system health dashboard.
|
|
4
|
+
version: "2.1.0"
|
|
5
|
+
license: MIT
|
|
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: Status
|
|
14
|
+
|
|
15
|
+
Check system status, health metrics, and statistics for your local memory system.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
slm status [--verbose] [--check-integrity]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Example Output
|
|
24
|
+
|
|
25
|
+
### Basic Status
|
|
26
|
+
```bash
|
|
27
|
+
$ slm status
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Output:**
|
|
31
|
+
```
|
|
32
|
+
╔══════════════════════════════════════════════════════╗
|
|
33
|
+
║ SuperLocalMemory V2 - System Status ║
|
|
34
|
+
╚══════════════════════════════════════════════════════╝
|
|
35
|
+
|
|
36
|
+
📊 Memory Statistics
|
|
37
|
+
Total Memories: 1,247
|
|
38
|
+
This Month: 143
|
|
39
|
+
This Week: 28
|
|
40
|
+
Today: 5
|
|
41
|
+
|
|
42
|
+
📈 Knowledge Graph
|
|
43
|
+
Nodes (Entities): 892
|
|
44
|
+
Edges (Relationships): 3,456
|
|
45
|
+
Clusters: 47
|
|
46
|
+
Avg Cluster Size: 19 memories
|
|
47
|
+
|
|
48
|
+
🎯 Pattern Learning
|
|
49
|
+
Coding Patterns: 34
|
|
50
|
+
Framework Preferences: React (72%), Vue (18%), Angular (10%)
|
|
51
|
+
Testing Style: TDD (65%), BDD (35%)
|
|
52
|
+
Performance Priority: High (78%)
|
|
53
|
+
|
|
54
|
+
💾 Database Health
|
|
55
|
+
Size: 4.2 MB
|
|
56
|
+
Integrity: ✅ OK
|
|
57
|
+
Last Backup: 2026-02-07 09:15
|
|
58
|
+
Backup Count: 12
|
|
59
|
+
|
|
60
|
+
🔧 Current Profile
|
|
61
|
+
Name: default
|
|
62
|
+
Created: 2026-01-15
|
|
63
|
+
Last Used: 2026-02-07 14:23
|
|
64
|
+
|
|
65
|
+
⚙️ System Info
|
|
66
|
+
Install Path: ~/.claude-memory
|
|
67
|
+
Database: memory.db
|
|
68
|
+
Python Version: 3.11.7
|
|
69
|
+
SQLite Version: 3.43.2
|
|
70
|
+
|
|
71
|
+
✅ Status: HEALTHY
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Verbose Mode
|
|
75
|
+
```bash
|
|
76
|
+
$ slm status --verbose
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Additional information:**
|
|
80
|
+
- Recent memory IDs
|
|
81
|
+
- Top entities in graph
|
|
82
|
+
- Pattern confidence scores
|
|
83
|
+
- Database table sizes
|
|
84
|
+
- Index statistics
|
|
85
|
+
|
|
86
|
+
### Integrity Check
|
|
87
|
+
```bash
|
|
88
|
+
$ slm status --check-integrity
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Runs full database integrity check:**
|
|
92
|
+
```
|
|
93
|
+
Running integrity check...
|
|
94
|
+
|
|
95
|
+
Database Structure: ✅ OK
|
|
96
|
+
FTS5 Index: ✅ OK
|
|
97
|
+
Graph Consistency: ✅ OK
|
|
98
|
+
Orphaned Nodes: 0 found
|
|
99
|
+
Duplicate Memories: 0 found
|
|
100
|
+
Corrupted Entries: 0 found
|
|
101
|
+
|
|
102
|
+
✅ All checks passed
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## What This Shows
|
|
106
|
+
|
|
107
|
+
### 1. Memory Statistics
|
|
108
|
+
- **Total:** All memories ever saved
|
|
109
|
+
- **This Month:** Memories added in current month
|
|
110
|
+
- **This Week:** Last 7 days
|
|
111
|
+
- **Today:** Memories added today
|
|
112
|
+
|
|
113
|
+
**Useful for:**
|
|
114
|
+
- Understanding usage patterns
|
|
115
|
+
- Tracking growth
|
|
116
|
+
- Identifying active periods
|
|
117
|
+
|
|
118
|
+
### 2. Knowledge Graph
|
|
119
|
+
- **Nodes:** Unique entities extracted (people, technologies, concepts)
|
|
120
|
+
- **Edges:** Relationships between entities
|
|
121
|
+
- **Clusters:** Auto-discovered topic groups
|
|
122
|
+
- **Avg Cluster Size:** Memories per cluster
|
|
123
|
+
|
|
124
|
+
**Health indicators:**
|
|
125
|
+
- High edges/nodes ratio = well-connected knowledge
|
|
126
|
+
- Many clusters = diverse topics
|
|
127
|
+
- Large clusters = focused work
|
|
128
|
+
|
|
129
|
+
### 3. Pattern Learning
|
|
130
|
+
- **Coding Patterns:** Identified preferences and decisions
|
|
131
|
+
- **Framework Preferences:** Usage distribution
|
|
132
|
+
- **Testing Style:** TDD vs BDD preference
|
|
133
|
+
- **Performance Priority:** How important performance is to you
|
|
134
|
+
|
|
135
|
+
**Based on:**
|
|
136
|
+
- Keywords in memories ("prefer", "use", "avoid")
|
|
137
|
+
- Frequency of mentions
|
|
138
|
+
- Importance levels
|
|
139
|
+
- Recency (recent patterns weighted higher)
|
|
140
|
+
|
|
141
|
+
### 4. Database Health
|
|
142
|
+
- **Size:** Database file size
|
|
143
|
+
- **Integrity:** PRAGMA integrity_check result
|
|
144
|
+
- **Last Backup:** Most recent backup timestamp
|
|
145
|
+
- **Backup Count:** Total backups available
|
|
146
|
+
|
|
147
|
+
**Warning signs:**
|
|
148
|
+
- ❌ Integrity: NOT OK → Database corrupted
|
|
149
|
+
- ⚠️ Size > 100MB → Consider archiving old memories
|
|
150
|
+
- ⚠️ No backups → Enable backup system
|
|
151
|
+
|
|
152
|
+
### 5. Current Profile
|
|
153
|
+
- **Name:** Active profile (default, work, personal, etc.)
|
|
154
|
+
- **Created:** When profile was created
|
|
155
|
+
- **Last Used:** Last access timestamp
|
|
156
|
+
|
|
157
|
+
**Profiles allow:**
|
|
158
|
+
- Project isolation
|
|
159
|
+
- Context switching
|
|
160
|
+
- Separate memory spaces
|
|
161
|
+
|
|
162
|
+
### 6. System Info
|
|
163
|
+
- **Install Path:** Where SuperLocalMemory is installed
|
|
164
|
+
- **Database:** Database filename
|
|
165
|
+
- **Python Version:** Python interpreter version
|
|
166
|
+
- **SQLite Version:** SQLite engine version
|
|
167
|
+
|
|
168
|
+
## Options
|
|
169
|
+
|
|
170
|
+
| Option | Description | Use Case |
|
|
171
|
+
|--------|-------------|----------|
|
|
172
|
+
| `--verbose` | Show detailed stats | Debugging, analysis |
|
|
173
|
+
| `--check-integrity` | Run full DB check | Troubleshooting |
|
|
174
|
+
| `--format json` | JSON output | Scripting |
|
|
175
|
+
| `--format text` | Human-readable (default) | Terminal use |
|
|
176
|
+
|
|
177
|
+
## Use Cases
|
|
178
|
+
|
|
179
|
+
### 1. Health Check Before Important Work
|
|
180
|
+
```bash
|
|
181
|
+
slm status --check-integrity
|
|
182
|
+
# Ensure DB is healthy before big import
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### 2. Understanding Memory Usage
|
|
186
|
+
```bash
|
|
187
|
+
slm status
|
|
188
|
+
# "Do I have enough memories for pattern learning?"
|
|
189
|
+
# (Need 20+ for basic patterns, 50+ for advanced)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 3. Performance Monitoring
|
|
193
|
+
```bash
|
|
194
|
+
slm status --verbose
|
|
195
|
+
# Check graph stats, optimize if needed
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 4. Backup Verification
|
|
199
|
+
```bash
|
|
200
|
+
slm status | grep "Last Backup"
|
|
201
|
+
# Ensure recent backup exists
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### 5. Profile Switching Context
|
|
205
|
+
```bash
|
|
206
|
+
# Before switching
|
|
207
|
+
slm status
|
|
208
|
+
# Note: "Current Profile: work"
|
|
209
|
+
|
|
210
|
+
slm switch-profile personal
|
|
211
|
+
|
|
212
|
+
slm status
|
|
213
|
+
# Note: "Current Profile: personal"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Advanced Usage
|
|
217
|
+
|
|
218
|
+
### Scripting & Automation
|
|
219
|
+
|
|
220
|
+
**Daily health check (cron job):**
|
|
221
|
+
```bash
|
|
222
|
+
#!/bin/bash
|
|
223
|
+
# Daily at 9 AM
|
|
224
|
+
|
|
225
|
+
status=$(slm status --check-integrity)
|
|
226
|
+
if echo "$status" | grep -q "NOT OK"; then
|
|
227
|
+
echo "SuperLocalMemory: Integrity check FAILED" | mail -s "Alert" you@example.com
|
|
228
|
+
fi
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Monitoring script:**
|
|
232
|
+
```bash
|
|
233
|
+
#!/bin/bash
|
|
234
|
+
# Monitor memory growth
|
|
235
|
+
|
|
236
|
+
count=$(slm status | grep "Total Memories:" | awk '{print $3}' | tr -d ',')
|
|
237
|
+
echo "$(date),${count}" >> memory-growth.csv
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**JSON output for dashboards:**
|
|
241
|
+
```bash
|
|
242
|
+
slm status --format json > status.json
|
|
243
|
+
# Parse with jq, send to monitoring system
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Performance Indicators
|
|
247
|
+
|
|
248
|
+
**Good indicators:**
|
|
249
|
+
- Graph nodes > 100 → Rich knowledge base
|
|
250
|
+
- Edges/nodes ratio > 2 → Well-connected
|
|
251
|
+
- Patterns learned > 10 → AI understands your style
|
|
252
|
+
- Integrity: OK → Database healthy
|
|
253
|
+
|
|
254
|
+
**Warning signs:**
|
|
255
|
+
- Database size > 50MB but <100 memories → Possible issue
|
|
256
|
+
- Backup count: 0 → No disaster recovery
|
|
257
|
+
- Last used: >30 days ago → Stale data
|
|
258
|
+
|
|
259
|
+
## Troubleshooting
|
|
260
|
+
|
|
261
|
+
### "Status command hangs"
|
|
262
|
+
**Cause:** Database locked by another process
|
|
263
|
+
|
|
264
|
+
**Solution:**
|
|
265
|
+
```bash
|
|
266
|
+
# Check for locks
|
|
267
|
+
lsof ~/.claude-memory/memory.db
|
|
268
|
+
|
|
269
|
+
# Kill hanging processes
|
|
270
|
+
killall python3
|
|
271
|
+
|
|
272
|
+
# Try again
|
|
273
|
+
slm status
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### "Integrity check fails"
|
|
277
|
+
**Cause:** Database corruption
|
|
278
|
+
|
|
279
|
+
**Solution:**
|
|
280
|
+
```bash
|
|
281
|
+
# Restore from backup
|
|
282
|
+
cp ~/.claude-memory/backups/memory.db.backup.* ~/.claude-memory/memory.db
|
|
283
|
+
|
|
284
|
+
# Verify
|
|
285
|
+
slm status --check-integrity
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### "Pattern stats missing"
|
|
289
|
+
**Cause:** Need more memories (minimum 20)
|
|
290
|
+
|
|
291
|
+
**Solution:**
|
|
292
|
+
```bash
|
|
293
|
+
# Check memory count
|
|
294
|
+
slm status | grep "Total Memories"
|
|
295
|
+
|
|
296
|
+
# Add more memories
|
|
297
|
+
slm remember "Prefer React hooks over classes"
|
|
298
|
+
# ... add 20+ memories ...
|
|
299
|
+
|
|
300
|
+
# Rebuild patterns
|
|
301
|
+
slm build-graph
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Output Interpretation
|
|
305
|
+
|
|
306
|
+
### Status: HEALTHY
|
|
307
|
+
✅ All systems operational
|
|
308
|
+
- Database intact
|
|
309
|
+
- Graph built
|
|
310
|
+
- Patterns learned
|
|
311
|
+
- Backups available
|
|
312
|
+
|
|
313
|
+
### Status: WARNING
|
|
314
|
+
⚠️ Minor issues detected
|
|
315
|
+
- Old backups
|
|
316
|
+
- Large database
|
|
317
|
+
- Few patterns learned
|
|
318
|
+
|
|
319
|
+
**Action:** Review verbose output
|
|
320
|
+
|
|
321
|
+
### Status: ERROR
|
|
322
|
+
❌ Critical issues
|
|
323
|
+
- Database corrupted
|
|
324
|
+
- Integrity check failed
|
|
325
|
+
- No accessible data
|
|
326
|
+
|
|
327
|
+
**Action:** Restore from backup immediately
|
|
328
|
+
|
|
329
|
+
## Performance Benchmarks
|
|
330
|
+
|
|
331
|
+
| Command | Typical Time | Notes |
|
|
332
|
+
|---------|-------------|-------|
|
|
333
|
+
| `slm status` | ~200ms | Fast, lightweight |
|
|
334
|
+
| `slm status --verbose` | ~500ms | More data fetching |
|
|
335
|
+
| `slm status --check-integrity` | ~2s | Full DB scan |
|
|
336
|
+
|
|
337
|
+
**For large databases (10,000+ memories):**
|
|
338
|
+
- Basic status: ~500ms
|
|
339
|
+
- Verbose: ~1.5s
|
|
340
|
+
- Integrity check: ~10s
|
|
341
|
+
|
|
342
|
+
## Notes
|
|
343
|
+
|
|
344
|
+
- **Non-destructive:** Status check never modifies data
|
|
345
|
+
- **Real-time:** Shows current state (not cached)
|
|
346
|
+
- **Cross-tool:** Same status from all AI tools
|
|
347
|
+
- **Privacy:** All checks local, no external calls
|
|
348
|
+
|
|
349
|
+
## Related Commands
|
|
350
|
+
|
|
351
|
+
- `slm list` - List recent memories
|
|
352
|
+
- `slm build-graph` - Rebuild knowledge graph
|
|
353
|
+
- `slm switch-profile` - Switch memory profile
|
|
354
|
+
- `slm recall` - Search memories
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
**Created by:** [Varun Pratap Bhardwaj](https://github.com/varun369) (Solution Architect)
|
|
359
|
+
**Project:** SuperLocalMemory V2
|
|
360
|
+
**License:** MIT with attribution requirements (see [ATTRIBUTION.md](../../ATTRIBUTION.md))
|
|
361
|
+
**Repository:** https://github.com/varun369/SuperLocalMemoryV2
|
|
362
|
+
|
|
363
|
+
*Open source doesn't mean removing credit. Attribution must be preserved per MIT License terms.*
|