superlocalmemory 3.4.17 → 3.4.19
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/CHANGELOG.md +19 -0
- package/package.json +1 -3
- package/pyproject.toml +10 -1
- package/src/superlocalmemory/cli/setup_wizard.py +30 -0
- package/src/superlocalmemory/core/embeddings.py +8 -2
- package/src/superlocalmemory/retrieval/reranker.py +4 -2
- package/src/superlocalmemory.egg-info/PKG-INFO +4 -1
- package/src/superlocalmemory.egg-info/requires.txt +3 -0
- package/docs/ARCHITECTURE.md +0 -149
- package/docs/api-reference.md +0 -284
- package/docs/auto-memory.md +0 -150
- package/docs/cli-reference.md +0 -327
- package/docs/cloud-backup.md +0 -174
- package/docs/compliance.md +0 -191
- package/docs/configuration.md +0 -182
- package/docs/getting-started.md +0 -102
- package/docs/ide-setup.md +0 -261
- package/docs/mcp-tools.md +0 -220
- package/docs/migration-from-v2.md +0 -170
- package/docs/profiles.md +0 -173
- package/docs/screenshots/01-dashboard-main.png +0 -0
- package/docs/screenshots/02-knowledge-graph.png +0 -0
- package/docs/screenshots/03-math-health.png +0 -0
- package/docs/screenshots/03-patterns-learning.png +0 -0
- package/docs/screenshots/04-learning-dashboard.png +0 -0
- package/docs/screenshots/04-recall-lab.png +0 -0
- package/docs/screenshots/05-behavioral-analysis.png +0 -0
- package/docs/screenshots/05-trust-dashboard.png +0 -0
- package/docs/screenshots/06-graph-communities.png +0 -0
- package/docs/screenshots/06-settings.png +0 -0
- package/docs/screenshots/07-memories-blurred.png +0 -0
- package/docs/skill-evolution.md +0 -256
- package/docs/troubleshooting.md +0 -310
- package/docs/v2-archive/ACCESSIBILITY.md +0 -291
- package/docs/v2-archive/ARCHITECTURE.md +0 -886
- package/docs/v2-archive/CLI-COMMANDS-REFERENCE.md +0 -425
- package/docs/v2-archive/COMPRESSION-README.md +0 -390
- package/docs/v2-archive/FRAMEWORK-INTEGRATIONS.md +0 -300
- package/docs/v2-archive/MCP-MANUAL-SETUP.md +0 -775
- package/docs/v2-archive/MCP-TROUBLESHOOTING.md +0 -787
- package/docs/v2-archive/PATTERN-LEARNING.md +0 -228
- package/docs/v2-archive/PROFILES-GUIDE.md +0 -453
- package/docs/v2-archive/RESET-GUIDE.md +0 -353
- package/docs/v2-archive/SEARCH-ENGINE-V2.2.0.md +0 -749
- package/docs/v2-archive/SEARCH-INTEGRATION-GUIDE.md +0 -502
- package/docs/v2-archive/UI-SERVER.md +0 -262
- package/docs/v2-archive/UNIVERSAL-INTEGRATION.md +0 -488
- package/docs/v2-archive/V2.2.0-OPTIONAL-SEARCH.md +0 -666
- package/docs/v2-archive/WINDOWS-INSTALL-README.txt +0 -34
- package/docs/v2-archive/WINDOWS-POST-INSTALL.txt +0 -45
- package/docs/v2-archive/example_graph_usage.py +0 -146
- package/ui/index.html +0 -1879
- package/ui/js/agents.js +0 -192
- package/ui/js/auto-settings.js +0 -399
- package/ui/js/behavioral.js +0 -276
- package/ui/js/clusters.js +0 -206
- package/ui/js/compliance.js +0 -252
- package/ui/js/core.js +0 -246
- package/ui/js/dashboard.js +0 -110
- package/ui/js/events.js +0 -178
- package/ui/js/fact-detail.js +0 -92
- package/ui/js/feedback.js +0 -333
- package/ui/js/graph-core.js +0 -447
- package/ui/js/graph-filters.js +0 -220
- package/ui/js/graph-interactions.js +0 -351
- package/ui/js/graph-ui.js +0 -214
- package/ui/js/ide-status.js +0 -102
- package/ui/js/init.js +0 -45
- package/ui/js/learning.js +0 -435
- package/ui/js/lifecycle.js +0 -298
- package/ui/js/math-health.js +0 -98
- package/ui/js/memories.js +0 -264
- package/ui/js/modal.js +0 -357
- package/ui/js/patterns.js +0 -93
- package/ui/js/profiles.js +0 -236
- package/ui/js/recall-lab.js +0 -292
- package/ui/js/search.js +0 -59
- package/ui/js/settings.js +0 -224
- package/ui/js/timeline.js +0 -32
- package/ui/js/trust-dashboard.js +0 -73
package/docs/auto-memory.md
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
# Auto-Memory
|
|
2
|
-
> SuperLocalMemory V3 Documentation
|
|
3
|
-
> https://superlocalmemory.com | Part of Qualixar
|
|
4
|
-
|
|
5
|
-
SuperLocalMemory captures and recalls context automatically. Install it once, then forget about it — your AI assistant gets smarter over time without any manual effort.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## How Auto-Capture Works
|
|
10
|
-
|
|
11
|
-
When you work with an AI assistant that has SLM connected, certain types of information are automatically stored as memories:
|
|
12
|
-
|
|
13
|
-
| What gets captured | Example |
|
|
14
|
-
|-------------------|---------|
|
|
15
|
-
| **Decisions** | "Let's use WebSocket instead of SSE" |
|
|
16
|
-
| **Bug fixes** | "The crash was caused by a null pointer in the auth middleware" |
|
|
17
|
-
| **Architecture choices** | "We're going with a microservices approach for the payment system" |
|
|
18
|
-
| **Preferences** | "I prefer functional components over class components" |
|
|
19
|
-
| **Project context** | "The staging server is at 10.0.1.50, port 8080" |
|
|
20
|
-
| **People and roles** | "Sarah is the lead on the mobile team" |
|
|
21
|
-
| **Corrections** | "Actually, the deadline is March 20, not March 15" |
|
|
22
|
-
|
|
23
|
-
### What does NOT get captured
|
|
24
|
-
|
|
25
|
-
- Raw code blocks (too noisy, changes too fast)
|
|
26
|
-
- Casual conversation ("thanks", "sounds good")
|
|
27
|
-
- Repeated information already in memory
|
|
28
|
-
- Content filtered by the entropy gate (redundant or low-value)
|
|
29
|
-
|
|
30
|
-
### How the system decides what to capture
|
|
31
|
-
|
|
32
|
-
The ingestion pipeline scores each candidate memory on:
|
|
33
|
-
|
|
34
|
-
1. **Information value** — Does this add new knowledge not already stored?
|
|
35
|
-
2. **Specificity** — Is this a concrete fact or a vague statement?
|
|
36
|
-
3. **Reusability** — Is this likely to be useful in a future session?
|
|
37
|
-
|
|
38
|
-
Memories that score below the threshold are discarded. This keeps your database focused and retrieval quality high.
|
|
39
|
-
|
|
40
|
-
## How Auto-Recall Works
|
|
41
|
-
|
|
42
|
-
Before your AI assistant responds to a question, SLM automatically searches for relevant memories and injects them as context.
|
|
43
|
-
|
|
44
|
-
### The flow
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
You ask a question
|
|
48
|
-
|
|
|
49
|
-
v
|
|
50
|
-
SLM runs a recall query using your question as the search input
|
|
51
|
-
|
|
|
52
|
-
v
|
|
53
|
-
Relevant memories are injected into the AI's context window
|
|
54
|
-
|
|
|
55
|
-
v
|
|
56
|
-
The AI responds with awareness of your past decisions, preferences, and project context
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### What this looks like in practice
|
|
60
|
-
|
|
61
|
-
**Without SLM:**
|
|
62
|
-
> You: "What database should I use for the new service?"
|
|
63
|
-
> AI: Generic advice about PostgreSQL vs MySQL vs MongoDB...
|
|
64
|
-
|
|
65
|
-
**With SLM:**
|
|
66
|
-
> You: "What database should I use for the new service?"
|
|
67
|
-
> AI: "Based on your previous decision to standardize on PostgreSQL 16 (stored March 5), and your preference for managed services on AWS (stored February 20), I'd recommend Amazon RDS for PostgreSQL. Your auth service and payment service already use PostgreSQL, so this keeps the stack consistent."
|
|
68
|
-
|
|
69
|
-
The AI did not "remember" this on its own. SLM injected the relevant memories before the AI generated its response.
|
|
70
|
-
|
|
71
|
-
## Configuration
|
|
72
|
-
|
|
73
|
-
### Toggle auto-capture and auto-recall
|
|
74
|
-
|
|
75
|
-
In `~/.superlocalmemory/config.json`:
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"auto_capture": true,
|
|
80
|
-
"auto_recall": true
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Set either to `false` to disable. When disabled, you can still use `slm remember` and `slm recall` manually.
|
|
85
|
-
|
|
86
|
-
### Adjust recall sensitivity
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"max_recall_results": 10,
|
|
91
|
-
"recall_threshold": 0.3
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
| Setting | Default | Description |
|
|
96
|
-
|---------|---------|-------------|
|
|
97
|
-
| `max_recall_results` | `10` | Maximum memories injected per query |
|
|
98
|
-
| `recall_threshold` | `0.3` | Minimum relevance score (0.0 to 1.0). Lower = more memories, possibly less relevant. Higher = fewer but more precise. |
|
|
99
|
-
|
|
100
|
-
### Adjust capture sensitivity
|
|
101
|
-
|
|
102
|
-
```json
|
|
103
|
-
{
|
|
104
|
-
"capture_threshold": 0.5
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
| Setting | Default | Description |
|
|
109
|
-
|---------|---------|-------------|
|
|
110
|
-
| `capture_threshold` | `0.5` | Minimum information value to auto-capture. Lower = capture more. Higher = capture only high-value statements. |
|
|
111
|
-
|
|
112
|
-
## Manual Override
|
|
113
|
-
|
|
114
|
-
You always have full control:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
# Explicitly store something
|
|
118
|
-
slm remember "The API rate limit on production is 500 req/min, staging is 100 req/min"
|
|
119
|
-
|
|
120
|
-
# Explicitly recall
|
|
121
|
-
slm recall "rate limits"
|
|
122
|
-
|
|
123
|
-
# Delete a memory
|
|
124
|
-
slm forget --id 42
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Manual operations work regardless of auto-capture/auto-recall settings.
|
|
128
|
-
|
|
129
|
-
## Learning Over Time
|
|
130
|
-
|
|
131
|
-
SLM's adaptive learning system observes which memories are recalled frequently, which are marked helpful or outdated, and adjusts its behavior:
|
|
132
|
-
|
|
133
|
-
- **Frequently helpful memories** get higher ranking in future recalls
|
|
134
|
-
- **Memories marked "outdated"** are deprioritized or flagged for review
|
|
135
|
-
- **Usage patterns** inform what types of information to prioritize for capture
|
|
136
|
-
|
|
137
|
-
You can see what the system has learned:
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
slm patterns # Show learned patterns
|
|
141
|
-
slm patterns correct 5 # Correct pattern #5 if it's wrong
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Privacy
|
|
145
|
-
|
|
146
|
-
Auto-capture and auto-recall happen entirely within SLM on your machine. In Mode A, no data leaves your device at any point. In Mode C, recall queries are sent to your configured LLM provider, but the memories themselves remain local.
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
*SuperLocalMemory V3 — Copyright 2026 Varun Pratap Bhardwaj. Elastic License 2.0. Part of Qualixar.*
|
package/docs/cli-reference.md
DELETED
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
# CLI Reference
|
|
2
|
-
> SuperLocalMemory V3 Documentation
|
|
3
|
-
> https://superlocalmemory.com | Part of Qualixar
|
|
4
|
-
|
|
5
|
-
Complete reference for the `slm` command-line interface.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Setup & Configuration
|
|
10
|
-
|
|
11
|
-
### `slm setup`
|
|
12
|
-
|
|
13
|
-
Run the interactive setup wizard. Guides you through mode selection, IDE connection, and verification.
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
slm setup
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### `slm mode [a|b|c]`
|
|
20
|
-
|
|
21
|
-
Get or set the operating mode.
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
slm mode # Show current mode
|
|
25
|
-
slm mode a # Zero-cloud (no LLM, no API key)
|
|
26
|
-
slm mode b # Local LLM via Ollama
|
|
27
|
-
slm mode c # Cloud LLM (requires API key)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### `slm provider [set]`
|
|
31
|
-
|
|
32
|
-
Get or set the LLM provider for Mode B/C.
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
slm provider # Show current provider
|
|
36
|
-
slm provider set # Interactive provider selector
|
|
37
|
-
slm provider set openai # Set provider directly
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### `slm connect [ide]`
|
|
41
|
-
|
|
42
|
-
Configure IDE integrations.
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
slm connect # Auto-detect and configure all IDEs
|
|
46
|
-
slm connect cursor # Configure Cursor specifically
|
|
47
|
-
slm connect claude # Configure Claude Code specifically
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Supported IDEs: `claude`, `cursor`, `vscode`, `windsurf`, `gemini`, `jetbrains`, `continue`, `zed`
|
|
51
|
-
|
|
52
|
-
## Memory Operations
|
|
53
|
-
|
|
54
|
-
### `slm remember "content" [options]`
|
|
55
|
-
|
|
56
|
-
Store a memory.
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
slm remember "API rate limit is 100 req/min on staging"
|
|
60
|
-
slm remember "Use camelCase for JS, snake_case for Python" --tags "style,convention"
|
|
61
|
-
slm remember "Maria owns the auth service" --tags "team,ownership"
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
| Option | Description |
|
|
65
|
-
|--------|-------------|
|
|
66
|
-
| `--tags "a,b"` | Comma-separated tags for categorization |
|
|
67
|
-
| `--profile name` | Store in a specific profile (overrides active profile) |
|
|
68
|
-
|
|
69
|
-
### `slm recall "query" [options]`
|
|
70
|
-
|
|
71
|
-
Search your memories. Returns the most relevant results.
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
slm recall "rate limit"
|
|
75
|
-
slm recall "who owns auth" --limit 5
|
|
76
|
-
slm recall "database config" --profile work
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
| Option | Default | Description |
|
|
80
|
-
|--------|---------|-------------|
|
|
81
|
-
| `--limit N` | 10 | Maximum results to return |
|
|
82
|
-
| `--profile name` | active | Search in a specific profile |
|
|
83
|
-
|
|
84
|
-
### `slm search "query" [options]`
|
|
85
|
-
|
|
86
|
-
Alias for `slm recall`. Same behavior, same options.
|
|
87
|
-
|
|
88
|
-
### `slm forget "query" [options]`
|
|
89
|
-
|
|
90
|
-
Delete memories matching a query.
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
slm forget "old staging credentials"
|
|
94
|
-
slm forget --id 42 # Delete by memory ID
|
|
95
|
-
slm forget --before "2026-01-01" # Delete memories before a date
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
| Option | Description |
|
|
99
|
-
|--------|-------------|
|
|
100
|
-
| `--id N` | Delete a specific memory by ID |
|
|
101
|
-
| `--before "date"` | Delete all memories before this date |
|
|
102
|
-
| `--confirm` | Skip the confirmation prompt |
|
|
103
|
-
|
|
104
|
-
### `slm list [options]`
|
|
105
|
-
|
|
106
|
-
List recent memories.
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
slm list # Last 20 memories
|
|
110
|
-
slm list --limit 50 # Last 50 memories
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## V3 Features
|
|
114
|
-
|
|
115
|
-
### `slm trace "query"`
|
|
116
|
-
|
|
117
|
-
Recall with a channel-by-channel breakdown. Shows how each retrieval channel contributed to the results.
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
slm trace "database port"
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Output shows scores from each channel:
|
|
124
|
-
- Semantic (vector similarity)
|
|
125
|
-
- BM25 (keyword matching)
|
|
126
|
-
- Entity Graph (relationship traversal)
|
|
127
|
-
- Temporal (time-based relevance)
|
|
128
|
-
|
|
129
|
-
### `slm health`
|
|
130
|
-
|
|
131
|
-
Show diagnostics for the mathematical layers.
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
slm health
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Reports status of:
|
|
138
|
-
- Fisher-Rao similarity layer
|
|
139
|
-
- Sheaf consistency layer
|
|
140
|
-
- Langevin lifecycle dynamics
|
|
141
|
-
- Embedding model status
|
|
142
|
-
- Database integrity
|
|
143
|
-
|
|
144
|
-
### `slm consistency`
|
|
145
|
-
|
|
146
|
-
Run a consistency check across your memories. Detects contradictions and outdated information.
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
slm consistency
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
## Migration
|
|
153
|
-
|
|
154
|
-
### `slm migrate [options]`
|
|
155
|
-
|
|
156
|
-
Migrate a V2 database to V3 format.
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
slm migrate # Run migration
|
|
160
|
-
slm migrate --dry-run # Preview what will change
|
|
161
|
-
slm migrate --rollback # Undo migration (within 30 days)
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
| Option | Description |
|
|
165
|
-
|--------|-------------|
|
|
166
|
-
| `--dry-run` | Show what would change without modifying anything |
|
|
167
|
-
| `--rollback` | Revert to V2 format (backup must exist) |
|
|
168
|
-
|
|
169
|
-
## Profile Management
|
|
170
|
-
|
|
171
|
-
### `slm profile [command]`
|
|
172
|
-
|
|
173
|
-
Manage memory profiles (isolated memory contexts).
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
slm profile list # List all profiles
|
|
177
|
-
slm profile switch work # Switch to "work" profile
|
|
178
|
-
slm profile create client-acme # Create a new profile
|
|
179
|
-
slm profile delete old-project # Delete a profile
|
|
180
|
-
slm profile export work > backup.json # Export a profile
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## System & Maintenance
|
|
184
|
-
|
|
185
|
-
### `slm status`
|
|
186
|
-
|
|
187
|
-
Show system status: mode, profile, memory count, database location, health.
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
slm status
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### `slm compact`
|
|
194
|
-
|
|
195
|
-
Compress and optimize the memory database. Merges redundant memories and reclaims space.
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
slm compact
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### `slm backup`
|
|
202
|
-
|
|
203
|
-
Check backup status or create a manual backup.
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
slm backup # Show backup status
|
|
207
|
-
slm backup create # Create a backup now
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### `slm audit [options]`
|
|
211
|
-
|
|
212
|
-
View the audit trail. Shows all memory operations with timestamps and hash-chain verification.
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
slm audit # Recent audit entries
|
|
216
|
-
slm audit --limit 100 # Last 100 entries
|
|
217
|
-
slm audit --verify # Verify hash-chain integrity
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### `slm retention [policy]`
|
|
221
|
-
|
|
222
|
-
Manage retention policies.
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
slm retention # Show current policy
|
|
226
|
-
slm retention set gdpr-30d # Apply GDPR 30-day policy
|
|
227
|
-
slm retention set hipaa-7y # Apply HIPAA 7-year policy
|
|
228
|
-
slm retention set custom --days 90 # Custom retention period
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
## Global Options
|
|
232
|
-
|
|
233
|
-
These options work with any command:
|
|
234
|
-
|
|
235
|
-
| Option | Description |
|
|
236
|
-
|--------|-------------|
|
|
237
|
-
| `--help` | Show help for a command |
|
|
238
|
-
| `--version` | Show SLM version |
|
|
239
|
-
| `--verbose` | Show detailed output |
|
|
240
|
-
| `--json` | Output structured JSON with agent-native envelope (for AI agents, scripts, CI/CD) |
|
|
241
|
-
| `--profile name` | Override the active profile for this command |
|
|
242
|
-
|
|
243
|
-
## Agent-Native JSON Output
|
|
244
|
-
|
|
245
|
-
All data-returning commands support `--json` for structured output. The envelope follows the 2026 agent-native CLI standard:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"success": true,
|
|
250
|
-
"command": "recall",
|
|
251
|
-
"version": "3.0.22",
|
|
252
|
-
"data": {
|
|
253
|
-
"results": [
|
|
254
|
-
{"fact_id": "abc123", "score": 0.87, "content": "Database uses PostgreSQL 16"}
|
|
255
|
-
],
|
|
256
|
-
"count": 1,
|
|
257
|
-
"query_type": "semantic"
|
|
258
|
-
},
|
|
259
|
-
"next_actions": [
|
|
260
|
-
{"command": "slm list --json", "description": "List recent memories"}
|
|
261
|
-
]
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### Supported Commands
|
|
266
|
-
|
|
267
|
-
`recall`, `remember`, `list`, `status`, `health`, `trace`, `forget`, `delete`, `update`, `mode`, `profile`, `connect`
|
|
268
|
-
|
|
269
|
-
### Usage with jq
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
# Get first result content
|
|
273
|
-
slm recall "auth" --json | jq '.data.results[0].content'
|
|
274
|
-
|
|
275
|
-
# Get all fact IDs
|
|
276
|
-
slm list --json | jq '.data.results[].fact_id'
|
|
277
|
-
|
|
278
|
-
# Check current mode
|
|
279
|
-
slm status --json | jq '.data.mode'
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
### In CI/CD (GitHub Actions)
|
|
283
|
-
|
|
284
|
-
```yaml
|
|
285
|
-
- name: Store deployment info
|
|
286
|
-
run: slm remember "Deployed ${{ github.sha }} to production" --json
|
|
287
|
-
|
|
288
|
-
- name: Check memory health
|
|
289
|
-
run: slm status --json | jq -e '.success'
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## Examples
|
|
295
|
-
|
|
296
|
-
### Daily workflow
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
# Morning: check what you remembered yesterday
|
|
300
|
-
slm list --limit 10
|
|
301
|
-
|
|
302
|
-
# During work: store a decision
|
|
303
|
-
slm remember "Decided to use WebSocket instead of SSE for real-time updates" --tags "architecture"
|
|
304
|
-
|
|
305
|
-
# Later: recall the decision
|
|
306
|
-
slm recall "real-time communication approach"
|
|
307
|
-
|
|
308
|
-
# End of day: check system health
|
|
309
|
-
slm status
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### Project setup
|
|
313
|
-
|
|
314
|
-
```bash
|
|
315
|
-
# Create a profile for a new project
|
|
316
|
-
slm profile create mobile-app
|
|
317
|
-
slm profile switch mobile-app
|
|
318
|
-
|
|
319
|
-
# Store project context
|
|
320
|
-
slm remember "React Native 0.76 with Expo SDK 52"
|
|
321
|
-
slm remember "Backend is FastAPI on AWS ECS"
|
|
322
|
-
slm remember "CI/CD via GitHub Actions, deploys on merge to main"
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
---
|
|
326
|
-
|
|
327
|
-
*SuperLocalMemory V3 — Copyright 2026 Varun Pratap Bhardwaj. Elastic License 2.0. Part of Qualixar.*
|
package/docs/cloud-backup.md
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
# Cloud Backup — Google Drive & GitHub
|
|
2
|
-
|
|
3
|
-
SuperLocalMemory v3.4.10+ can automatically back up your memory databases to **Google Drive** and **GitHub**. All credentials are stored in your OS keychain (macOS Keychain, Windows Credential Locker, or Linux Secret Service) — never in plaintext.
|
|
4
|
-
|
|
5
|
-
## GitHub Backup (Recommended)
|
|
6
|
-
|
|
7
|
-
GitHub backup works out of the box. No additional setup needed beyond a Personal Access Token.
|
|
8
|
-
|
|
9
|
-
### Setup (2 minutes)
|
|
10
|
-
|
|
11
|
-
1. Open the SLM Dashboard: `http://localhost:8765`
|
|
12
|
-
2. Click the **account widget** in the sidebar (bottom), then click the **GitHub icon**
|
|
13
|
-
3. You'll see the "Connect GitHub" form:
|
|
14
|
-
|
|
15
|
-
- **Personal Access Token**: Click [Create one here](https://github.com/settings/tokens/new?scopes=repo&description=SLM+Backup) — this opens GitHub with the `repo` scope pre-selected. Click "Generate token" and copy it.
|
|
16
|
-
- **Repository Name**: Default is `slm-backup`. Change if you want.
|
|
17
|
-
|
|
18
|
-
4. Click **Connect**
|
|
19
|
-
|
|
20
|
-
That's it. SLM will:
|
|
21
|
-
- Verify your token
|
|
22
|
-
- Create a **private** repository (always private — your data is never public)
|
|
23
|
-
- Initialize it with a README
|
|
24
|
-
- Show your GitHub avatar and username in the sidebar
|
|
25
|
-
|
|
26
|
-
### How It Works
|
|
27
|
-
|
|
28
|
-
- Each backup creates a **GitHub Release** with your database files as assets
|
|
29
|
-
- ALL databases are included: memory.db, learning.db, audit_chain.db, code_graph.db, pending.db
|
|
30
|
-
- Only the last **5 releases** are kept — older ones are automatically deleted to prevent storage bloat
|
|
31
|
-
- Backups run in the background — the dashboard never freezes
|
|
32
|
-
|
|
33
|
-
### Restoring from GitHub
|
|
34
|
-
|
|
35
|
-
1. Go to your `slm-backup` repo on GitHub
|
|
36
|
-
2. Click **Releases** in the sidebar
|
|
37
|
-
3. Download the `.db` files from the latest release
|
|
38
|
-
4. Copy them to `~/.superlocalmemory/`
|
|
39
|
-
5. Run `slm restart`
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Google Drive Backup
|
|
44
|
-
|
|
45
|
-
Google Drive backup requires a one-time OAuth client setup through Google Cloud Console. This is a Google requirement for any application that accesses Drive on behalf of users.
|
|
46
|
-
|
|
47
|
-
### Why Is This Needed?
|
|
48
|
-
|
|
49
|
-
Google requires every application to register an "OAuth client" before it can access your Drive. This is a security measure — it ensures you know exactly which application is accessing your data. For GitHub, a simple Personal Access Token is enough, but Google's security model is stricter.
|
|
50
|
-
|
|
51
|
-
### Setup (5 minutes)
|
|
52
|
-
|
|
53
|
-
#### Step 1: Create a Google Cloud Project
|
|
54
|
-
|
|
55
|
-
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
|
|
56
|
-
2. Click the project dropdown (top bar) → **New Project**
|
|
57
|
-
3. Name it anything (e.g., `slm-backup`) → **Create**
|
|
58
|
-
4. Select the new project from the dropdown
|
|
59
|
-
|
|
60
|
-
#### Step 2: Enable APIs
|
|
61
|
-
|
|
62
|
-
1. Go to **APIs & Services** → **Library**
|
|
63
|
-
2. Search for and enable:
|
|
64
|
-
- **Google Drive API**
|
|
65
|
-
- **People API** (for showing your email/name)
|
|
66
|
-
|
|
67
|
-
#### Step 3: Configure OAuth Consent Screen
|
|
68
|
-
|
|
69
|
-
1. Go to **APIs & Services** → **OAuth consent screen**
|
|
70
|
-
2. Select **External** → **Create**
|
|
71
|
-
3. Fill in:
|
|
72
|
-
- **App name**: `SuperLocalMemory` (or anything)
|
|
73
|
-
- **User support email**: your Gmail
|
|
74
|
-
- **Developer contact email**: your Gmail
|
|
75
|
-
4. Click **Save and Continue** through the remaining steps
|
|
76
|
-
5. Go to **Test users** → **Add users** → add your Gmail address
|
|
77
|
-
|
|
78
|
-
#### Step 4: Create OAuth Client
|
|
79
|
-
|
|
80
|
-
1. Go to **APIs & Services** → **Credentials**
|
|
81
|
-
2. Click **Create Credentials** → **OAuth client ID**
|
|
82
|
-
3. Application type: **Web application**
|
|
83
|
-
4. Name: `SLM Dashboard` (or anything)
|
|
84
|
-
5. Under **Authorized redirect URIs**, add:
|
|
85
|
-
```
|
|
86
|
-
http://localhost:8765/api/backup/oauth/google/callback
|
|
87
|
-
```
|
|
88
|
-
6. Click **Create**
|
|
89
|
-
7. Copy the **Client ID** and **Client Secret** (you'll need both)
|
|
90
|
-
|
|
91
|
-
#### Step 5: Connect in SLM
|
|
92
|
-
|
|
93
|
-
1. Open the SLM Dashboard: `http://localhost:8765`
|
|
94
|
-
2. Click the **Google icon** in the sidebar account widget
|
|
95
|
-
3. Paste your **Client ID** and **Client Secret**
|
|
96
|
-
4. Click **Save & Connect Google Drive**
|
|
97
|
-
5. Google's login page opens — sign in and click **Allow**
|
|
98
|
-
6. You'll see "Google Drive Connected!" — close the popup
|
|
99
|
-
|
|
100
|
-
### How It Works
|
|
101
|
-
|
|
102
|
-
- Backups are uploaded to a `SLM-Backup` folder in your Google Drive
|
|
103
|
-
- Files are **replaced in-place** (no duplicates, no storage bloat)
|
|
104
|
-
- ALL databases are backed up, not just memory.db
|
|
105
|
-
- Your OAuth credentials are stored in your OS keychain
|
|
106
|
-
- Backups run in the background
|
|
107
|
-
|
|
108
|
-
### Restoring from Google Drive
|
|
109
|
-
|
|
110
|
-
1. Open Google Drive → `SLM-Backup` folder
|
|
111
|
-
2. Download all `.db` files
|
|
112
|
-
3. Copy them to `~/.superlocalmemory/`
|
|
113
|
-
4. Run `slm restart`
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Sync & Schedule
|
|
118
|
-
|
|
119
|
-
### Manual Sync
|
|
120
|
-
|
|
121
|
-
Click **Sync Now** (cloud upload icon) in the sidebar account widget, or go to **Settings** → **Cloud Backup** → **Sync Now**.
|
|
122
|
-
|
|
123
|
-
### Auto-Backup
|
|
124
|
-
|
|
125
|
-
SLM automatically creates local backups on a schedule (default: weekly). When cloud destinations are connected, backups are also pushed to the cloud after each auto-backup.
|
|
126
|
-
|
|
127
|
-
Configure the schedule in **Settings** → **Backup Configuration**:
|
|
128
|
-
- **Interval**: Daily or Weekly
|
|
129
|
-
- **Max backups**: How many local backups to keep (default: 10)
|
|
130
|
-
|
|
131
|
-
### Export
|
|
132
|
-
|
|
133
|
-
Click the **download icon** in the sidebar to export a compressed `.gz` backup file you can store anywhere.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## What Gets Backed Up
|
|
138
|
-
|
|
139
|
-
| Database | Contents | Typical Size |
|
|
140
|
-
|---|---|---|
|
|
141
|
-
| `memory.db` | Facts, entities, graph edges, embeddings, sessions | 50 MB — 2 GB |
|
|
142
|
-
| `learning.db` | Learning signals, behavioral patterns, ranker data | 0.5 — 5 MB |
|
|
143
|
-
| `audit_chain.db` | Audit trail, compliance provenance | 0.5 — 2 MB |
|
|
144
|
-
| `code_graph.db` | Code knowledge graph (if used) | 0.1 — 10 MB |
|
|
145
|
-
| `pending.db` | Pending operations queue | 0.1 — 1 MB |
|
|
146
|
-
|
|
147
|
-
All databases are backed up using SQLite's `sqlite3.backup()` API, which creates a consistent, atomic snapshot even while the daemon is running.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Security
|
|
152
|
-
|
|
153
|
-
- **GitHub repos are always private** — hardcoded, cannot be changed
|
|
154
|
-
- **Credentials stored in OS keychain** — macOS Keychain, Windows Credential Locker, or Linux Secret Service
|
|
155
|
-
- **Fallback**: On systems without a keychain (headless Linux), credentials are stored in `~/.superlocalmemory/.credentials.json` with `chmod 0600` (owner-only)
|
|
156
|
-
- **Google OAuth tokens** are refresh tokens — they can be revoked from your [Google Account Security page](https://myaccount.google.com/permissions)
|
|
157
|
-
- **GitHub PATs** can be revoked from [GitHub Settings → Tokens](https://github.com/settings/tokens)
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Troubleshooting
|
|
162
|
-
|
|
163
|
-
### "Sync failed" in the sidebar
|
|
164
|
-
Check the destination status in **Settings** → **Cloud Backup**. Common causes:
|
|
165
|
-
- GitHub: PAT expired or revoked → reconnect with a new token
|
|
166
|
-
- Google: OAuth token expired → click "Connect Google Drive" again to re-authorize
|
|
167
|
-
|
|
168
|
-
### Google Drive shows "Connection Failed"
|
|
169
|
-
- Make sure you added yourself as a **test user** in the OAuth consent screen
|
|
170
|
-
- Verify the redirect URI matches exactly: `http://localhost:8765/api/backup/oauth/google/callback`
|
|
171
|
-
- Check that the SLM daemon is running on port 8765
|
|
172
|
-
|
|
173
|
-
### Dashboard freezes during sync
|
|
174
|
-
This was fixed in v3.4.10 — syncs now run in a background thread. If you're on an older version, update: `pip install -U superlocalmemory`
|