clawvault 1.1.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/README.md ADDED
@@ -0,0 +1,216 @@
1
+ # ClawVault 🐘
2
+
3
+ **An elephant never forgets.**
4
+
5
+ Structured memory system for AI agents. Store, search, and link memories across sessions.
6
+
7
+ ## Requirements
8
+
9
+ - **Node.js 18+**
10
+ - **[qmd](https://github.com/Versatly/qmd)** — Local semantic search (required)
11
+
12
+ ```bash
13
+ # Install qmd first
14
+ bun install -g qmd # or: npm install -g qmd
15
+
16
+ # Then install clawvault
17
+ npm install -g clawvault
18
+ ```
19
+
20
+ ## Why ClawVault?
21
+
22
+ AI agents forget things. Context windows overflow, sessions end, important details get lost. ClawVault fixes that:
23
+
24
+ - **Structured storage** — Organized categories, not random notes
25
+ - **Local search** — qmd provides BM25 + semantic search with local embeddings (no API quotas)
26
+ - **Wiki-links** — `[[connections]]` visible in Obsidian's graph view
27
+ - **Session continuity** — Handoff/recap system for context death
28
+ - **Token efficient** — Search instead of loading entire memory files
29
+
30
+ ## Quick Start
31
+
32
+ ```bash
33
+ # Initialize vault with qmd collection
34
+ clawvault init ~/memory --qmd-collection my-memory
35
+
36
+ # Store memories
37
+ clawvault remember decision "Use qmd" --content "Local embeddings, no API limits"
38
+ clawvault remember lesson "Context death is survivable" --content "Write it down"
39
+ clawvault capture "Quick note to process later"
40
+
41
+ # Search (uses qmd)
42
+ clawvault search "decision" # BM25 keyword search
43
+ clawvault vsearch "what did I decide" # Semantic search
44
+
45
+ # Session management
46
+ clawvault handoff --working-on "task1" --next "task2" # Before context death
47
+ clawvault recap # On session start
48
+ ```
49
+
50
+ **Tip:** Set `CLAWVAULT_PATH` environment variable to skip directory walk:
51
+ ```bash
52
+ echo 'export CLAWVAULT_PATH="$HOME/memory"' >> ~/.bashrc
53
+ ```
54
+
55
+ ## Search: qmd vs memory_search
56
+
57
+ **Use `qmd` (or `clawvault search`) — not `memory_search`**
58
+
59
+ | Tool | Backend | Speed | API Limits |
60
+ |------|---------|-------|------------|
61
+ | `qmd search` / `clawvault search` | Local BM25 | Instant | None |
62
+ | `qmd vsearch` / `clawvault vsearch` | Local embeddings | Fast | None |
63
+ | `memory_search` | Gemini API | Variable | **Yes, hits quotas** |
64
+
65
+ ```bash
66
+ # ✅ Use this
67
+ qmd search "query" -c my-memory
68
+ clawvault search "query"
69
+
70
+ # ❌ Avoid (API quotas)
71
+ memory_search
72
+ ```
73
+
74
+ ## Vault Structure
75
+
76
+ ```
77
+ my-memory/
78
+ ├── .clawvault.json # Config (includes qmd collection name)
79
+ ├── decisions/ # Choices with reasoning
80
+ ├── lessons/ # Things learned
81
+ ├── people/ # One file per person
82
+ ├── projects/ # Active work
83
+ ├── commitments/ # Promises and deadlines
84
+ ├── inbox/ # Quick capture (process later)
85
+ └── handoffs/ # Session continuity
86
+ ```
87
+
88
+ ## Commands
89
+
90
+ ### Store Memories
91
+
92
+ ```bash
93
+ # With type classification (recommended)
94
+ clawvault remember <type> <title> --content "..."
95
+ # Types: decision, lesson, fact, commitment, project, person
96
+
97
+ # Quick capture
98
+ clawvault capture "Note to self"
99
+
100
+ # Manual store
101
+ clawvault store -c decisions -t "Title" --content "..."
102
+ ```
103
+
104
+ **Note:** All write commands auto-update the qmd index. Use `--no-index` to skip.
105
+
106
+ ### Search
107
+
108
+ ```bash
109
+ clawvault search "query" # BM25 keyword
110
+ clawvault search "query" -c people # Filter by category
111
+ clawvault vsearch "query" # Semantic (local embeddings)
112
+ ```
113
+
114
+ ### Browse
115
+
116
+ ```bash
117
+ clawvault list # All documents
118
+ clawvault list decisions # By category
119
+ clawvault get decisions/title # Specific document
120
+ clawvault stats # Vault overview
121
+ ```
122
+
123
+ ### Session Continuity
124
+
125
+ ```bash
126
+ # Before context death (long pause, session end, hitting limits)
127
+ clawvault handoff \
128
+ --working-on "building CRM, fixing webhook" \
129
+ --blocked "waiting for API key" \
130
+ --next "deploy to production" \
131
+ --decisions "chose Supabase over Firebase" \
132
+ --feeling "focused"
133
+
134
+ # On session start
135
+ clawvault recap # Full markdown recap
136
+ clawvault recap --brief # Token-efficient version
137
+ clawvault recap --json # For programmatic use
138
+
139
+ # Health check
140
+ clawvault doctor
141
+ ```
142
+
143
+ ## Agent Setup (AGENTS.md)
144
+
145
+ Add this to your `AGENTS.md` to ensure proper memory habits:
146
+
147
+ ```markdown
148
+ ## Memory
149
+
150
+ **Write everything down. Memory doesn't survive session restarts.**
151
+
152
+ ### Search (use qmd, not memory_search)
153
+ \`\`\`bash
154
+ qmd search "query" -c your-memory # Fast keyword
155
+ qmd vsearch "query" -c your-memory # Semantic
156
+ \`\`\`
157
+
158
+ ### Store
159
+ \`\`\`bash
160
+ clawvault remember decision "Title" --content "..."
161
+ clawvault remember lesson "Title" --content "..."
162
+ \`\`\`
163
+
164
+ ### Session Handoff
165
+ Before context death:
166
+ \`\`\`bash
167
+ clawvault handoff --working-on "..." --next "..."
168
+ \`\`\`
169
+
170
+ On wake:
171
+ \`\`\`bash
172
+ clawvault recap
173
+ \`\`\`
174
+
175
+ ### Why qmd over memory_search?
176
+ - Local embeddings — no API quotas
177
+ - Always works — no external dependencies
178
+ - Fast — instant BM25, quick semantic
179
+ ```
180
+
181
+ ## Templates
182
+
183
+ ClawVault includes templates for common memory types:
184
+
185
+ - `decision.md` — Choices with context and reasoning
186
+ - `lesson.md` — Things learned
187
+ - `person.md` — People you work with
188
+ - `project.md` — Active work
189
+ - `handoff.md` — Session state before context death
190
+ - `daily.md` — Daily notes
191
+
192
+ Use with: `clawvault store -c category -t "Title" -f decision`
193
+
194
+ ## Library Usage
195
+
196
+ ```typescript
197
+ import { ClawVault, createVault, findVault } from 'clawvault';
198
+
199
+ const vault = await createVault('./memory', { qmdCollection: 'my-memory' });
200
+
201
+ await vault.store({
202
+ category: 'decisions',
203
+ title: 'Use ClawVault',
204
+ content: 'Decided to use ClawVault for memory.',
205
+ });
206
+
207
+ const results = await vault.find('memory', { limit: 5 });
208
+ ```
209
+
210
+ ## License
211
+
212
+ MIT
213
+
214
+ ---
215
+
216
+ *"An elephant never forgets." — Now neither do you.* 🐘