mnueron 0.5.0 → 0.6.1

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 (52) hide show
  1. package/INSTALL.md +125 -0
  2. package/LICENSE +28 -21
  3. package/NOTICE +164 -0
  4. package/README.md +443 -422
  5. package/dist/cli.js +114 -26
  6. package/dist/cli.js.map +1 -1
  7. package/dist/config.js +4 -1
  8. package/dist/config.js.map +1 -1
  9. package/dist/detectors/codex.js +138 -0
  10. package/dist/detectors/codex.js.map +1 -0
  11. package/dist/detectors/index.js +2 -0
  12. package/dist/detectors/index.js.map +1 -1
  13. package/dist/detectors/json_detector.js +1 -1
  14. package/dist/lib/context-engine/confidence.js +153 -0
  15. package/dist/lib/context-engine/confidence.js.map +1 -0
  16. package/dist/lib/context-engine/entities.js +179 -0
  17. package/dist/lib/context-engine/entities.js.map +1 -0
  18. package/dist/lib/context-engine/index.js +74 -0
  19. package/dist/lib/context-engine/index.js.map +1 -0
  20. package/dist/lib/context-engine/intent.js +139 -0
  21. package/dist/lib/context-engine/intent.js.map +1 -0
  22. package/dist/lib/context-engine/runbook-detector.js +206 -0
  23. package/dist/lib/context-engine/runbook-detector.js.map +1 -0
  24. package/dist/lib/date-anchors.js +351 -0
  25. package/dist/lib/date-anchors.js.map +1 -0
  26. package/dist/lib/temporal-intent.js +98 -0
  27. package/dist/lib/temporal-intent.js.map +1 -0
  28. package/dist/runbook/auto-extract.js +415 -0
  29. package/dist/runbook/auto-extract.js.map +1 -0
  30. package/dist/runbook/capture.js +214 -0
  31. package/dist/runbook/capture.js.map +1 -0
  32. package/dist/runbook/explain.js +154 -0
  33. package/dist/runbook/explain.js.map +1 -0
  34. package/dist/runbook/fingerprint.js +128 -0
  35. package/dist/runbook/fingerprint.js.map +1 -0
  36. package/dist/runbook/search.js +76 -0
  37. package/dist/runbook/search.js.map +1 -0
  38. package/dist/runbook/types.js +15 -0
  39. package/dist/runbook/types.js.map +1 -0
  40. package/dist/setup.js +32 -4
  41. package/dist/setup.js.map +1 -1
  42. package/dist/store/entity-extractor.js +69 -2
  43. package/dist/store/entity-extractor.js.map +1 -1
  44. package/dist/store/local-db.js +33 -0
  45. package/dist/store/local-db.js.map +1 -0
  46. package/dist/store/local.js +230 -229
  47. package/dist/store/local.js.map +1 -1
  48. package/dist/store/procedural.js +185 -0
  49. package/dist/store/procedural.js.map +1 -1
  50. package/dist/tools.js +222 -0
  51. package/dist/tools.js.map +1 -1
  52. package/package.json +63 -55
package/README.md CHANGED
@@ -1,422 +1,443 @@
1
- <p align="center">
2
- <img src="https://raw.githubusercontent.com/randi2160/mnueron/main/assets/promo-large-dark.png" alt="mnueron — memory for every AI" width="420" />
3
- </p>
4
-
5
- <p align="center"><strong>One memory layer. Every LLM. Every dev tool. Every app you build.</strong></p>
6
- <p align="center"><sub>Persistent memory for Claude Desktop · Claude Code · Cursor · Windsurf · Cline — local-first, free forever, open source (MIT).</sub></p>
7
-
8
- ---
9
-
10
- ```
11
- ┌─────────────────────────────────────────────────────────────────────────┐
12
- │ │
13
- │ Dev tools: │
14
- │ Claude Desktop · Claude Code · Cursor · Windsurf · Cline ──► MCP ─┐ │
15
- │ │ │
16
- │ Your apps: ├─► │
17
- │ Python SDK · C# SDK · TypeScript · REST ─────────────────────────┘ │
18
- │ │
19
- │ mnueron ──► [local SQLite] FREE │
20
- │ ──► [hosted Postgres] $ optional │
21
- │ │
22
- └─────────────────────────────────────────────────────────────────────────┘
23
- ```
24
-
25
- ## Why this exists
26
-
27
- AI tools and AI apps are stateless by default. Every new chat session, your
28
- AI starts from zero — you re-explain the same conventions, the same project
29
- context, the same user preferences, every time. MNUERON gives your AI a
30
- persistent memory that follows you across sessions, across machines, across
31
- tools, and across LLM providers.
32
-
33
- What changes day-to-day:
34
-
35
- - **In Claude Desktop / Cursor:** A new chat starts knowing your project conventions, past decisions, and where you left off.
36
- - **In your apps:** When a user comes back, the AI already knows their preferences — without you wiring it up per-provider.
37
- - **Across providers:** Switch from OpenAI to Claude to Mistral without losing your customer's history. The memory layer is the constant.
38
-
39
- ## What's new
40
-
41
- See [CHANGELOG.md](CHANGELOG.md) for the full history. Headlines:
42
-
43
- - **`mnueron primer`**emit a CLAUDE.md / cursorrules-style memory primer (`mnueron primer > CLAUDE.md`)
44
- - **5 more IDE detectors** Continue, Zed, Aider, Goose, OpenCode
45
- - **Platform API gaps closed** — date-range filter, PATCH update, bulk search, metadata-field filter
46
- - **Webhook subscriptions** — HMAC-signed POSTs on memory events
47
- - **Fact extraction** — long assistant responses get distilled into searchable facts
48
- - **Backend secret redaction** — defense in depth on top of the client-side redactor
49
- - **Chrome extension v0.2.0** — Local/Hosted toggle, recall + inject, ambient context, build-prompt multi-select
50
- - **SDKs refreshed** — Python `0.3.1` + .NET `0.3` cover the new endpoints (date filters, PATCH, bulk search, webhook CRUD, HMAC verifier)
51
- - **Claude Desktop import** — `mnueron import --claude-desktop` probes for and ingests Claude Desktop's export JSON
52
-
53
- Full API docs at [mnueron.com/docs/api/overview](https://mnueron.com/docs/api/overview).
54
-
55
- ## What you get out of the box — free, forever
56
-
57
- Run `mnueron setup` and every single one of these is yours. No account, no credit card, no telemetry. Your data lives at `~/.mnueron/memories.db` and never leaves your computer unless you explicitly opt into hosted mode.
58
-
59
- | ✓ | What | Why it matters |
60
- | :-: | --- | --- |
61
- | | **Local MCP server** with six tools (`memory_save`, `memory_recall`, `memory_get`, `memory_list`, `memory_delete`, `memory_namespaces`) | Wires into Claude Desktop, Claude Code, Cursor, Windsurf, Cline. One memory layer, every tool. |
62
- | ✓ | **One-command setup wizard** | Auto-detects every installed AI dev tool and configures each. Restart, you're live. |
63
- | ✓ | **Hybrid local search** BM25 keyword (SQLite FTS5) + semantic vector (Transformers.js + sqlite-vec) | Find memories by meaning, not just keywords. No OpenAI API key, no cloud calls, runs on CPU. |
64
- | ✓ | **Web dashboard** (`mnueron dashboard`) | Browse, search, delete, drag-drop import all from `localhost:3122`. |
65
- | ✓ | **Chrome extension** for claude.ai and chatgpt.com | One-click **Capture chat** button. One-click **Backfill all history** pulls your entire past claude.ai conversation list via their internal API in ~60 seconds. |
66
- | ✓ | **Bulk importer** for Claude and ChatGPT export JSON files | Bring months of conversation history in one command. |
67
- | ✓ | **Python + C# SDKs** | Use mnueron from your own apps with three lines of code. Provider-agnostic (works with OpenAI, Anthropic, Mistral, anything). |
68
- | ✓ | **Plugin system** | Bring your own processors PII redaction example included. |
69
- | ✓ | **Self-host the hosted backend** | The multi-tenant Postgres + pgvector + RLS code in `server/` is yours. Run it on your own VPC if you want all the features below without paying us. |
70
-
71
- All MIT-licensed. Fork, embed, modify, sell — whatever.
72
-
73
- ## Optional upgrade — hosted plan
74
-
75
- When you want cross-machine sync or are running this for a team, the hosted plan handles it. Same client code; one env-var flip.
76
-
77
- | Feature | Local (free) | Hosted |
78
- | --- | :-: | :-: |
79
- | All the local capabilities above | | |
80
- | Cross-machine sync (laptop / desktop / work box) | | ✓ |
81
- | Hosted web dashboard with login | — | ✓ |
82
- | Team / org-shared namespaces, role-based access | — | ✓ |
83
- | Audit log + retention policies | — | ✓ |
84
- | Embedding into your own SaaS (multi-tenant API) | self-host | ✓ |
85
- | SSO / SAML, BAAs, SLAs | | enterprise tier |
86
-
87
- Pricing: **$9/mo Personal · $25/user/mo Team · custom Enterprise**. Full plan details at [mnueron.com/pricing](https://mnueron.com/pricing).
88
-
89
- To flip a machine to hosted mode:
90
-
91
- ```bash
92
- mnueron setup --hosted https://api.your-mnueron.com --token mnu_xxx
93
- ```
94
-
95
- ## Install
96
-
97
- ### Prerequisites
98
-
99
- You need **Node.js 20 or newer** and **npm 10 or newer**. Check what you have:
100
-
101
- ```bash
102
- node --version # need v20.x or higher
103
- npm --version # need 10.x or higher
104
- ```
105
-
106
- Don't have Node? Install from **<https://nodejs.org/en/download>** (pick LTS).
107
- On macOS you can also use `brew install node@20`; on Ubuntu/Debian `sudo apt install nodejs`.
108
-
109
- ### Install mnueron
110
-
111
- ```bash
112
- npm install -g mnueron
113
- mnueron setup
114
- ```
115
-
116
- That's it. Published on npm: <https://www.npmjs.com/package/mnueron>.
117
-
118
- #### From source (for contributors)
119
-
120
- If you want to hack on mnueron itself, install from a local clone:
121
-
122
- ```bash
123
- git clone https://github.com/randi2160/mnueron.git
124
- cd mnueron
125
- npm install
126
- npm run build
127
- npm link # makes your local build the global `mnueron` command
128
- mnueron setup
129
- ```
130
-
131
- To switch back to the published version: `npm unlink -g mnueron && npm install -g mnueron`.
132
-
133
- ### What `mnueron setup` does
134
-
135
- The setup wizard detects every AI dev tool you have installed, configures
136
- each one, and reports back. Restart your tools and your AI remembers.
137
-
138
- ```
139
- 🧠 mnueron persistent memory for AI dev tools
140
- mode: local SQLite
141
-
142
- Configured:
143
- ✓ Claude Desktop added
144
- Claude Code added via `claude mcp add`
145
- Cursor added
146
-
147
- Not detected:
148
- Windsurf
149
- Cline (VS Code)
150
-
151
- Done. Restart any running AI tool to load the memory plugin.
152
- ```
153
-
154
- ## What your AI gets
155
-
156
- Six new tools available to any MCP-compatible AI:
157
-
158
- | Tool | What it does |
159
- | --- | --- |
160
- | `memory_save` | Save a memory (content, namespace, tags). |
161
- | `memory_recall` | Search by relevance — called when you reference prior context. |
162
- | `memory_list` | List recent memories, optionally filtered. |
163
- | `memory_delete` | Delete by id. |
164
- | `memory_namespaces` | List namespaces and their counts. |
165
- | `memory_import_chat` | Bulk-import a Claude/ChatGPT export file. |
166
-
167
- ## Import your existing chat history
168
-
169
- Bring months of Claude or ChatGPT conversations into your memory in one shot:
170
-
171
- ```bash
172
- # Export from claude.ai Settings Privacy → Export data
173
- # Export from chatgpt.com → Settings → Data Controls → Export
174
-
175
- mnueron import ~/Downloads/conversations.json --ns my-project
176
- ```
177
-
178
- Auto-detects Claude vs OpenAI format. Each conversation becomes a searchable
179
- memory tagged `imported`.
180
-
181
- ### Import your Claude Cowork sessions
182
-
183
- If you use Claude's "Cowork" mode (the desktop app's local agent mode), every
184
- chat is already on disk as a JSONL transcript. mnueron can find and import
185
- all of them with no export step.
186
-
187
- #### CLI — one-shot import
188
-
189
- ```bash
190
- # See what would be imported without saving anything
191
- mnueron import --claude-cowork --probe
192
-
193
- # Import every Cowork session into the default namespace ("claude-cowork")
194
- mnueron import --claude-cowork
195
-
196
- # Import into a custom namespace (e.g. group with one of your projects)
197
- mnueron import --claude-cowork --ns elevizio
198
-
199
- # Only import the 10 most recent Cowork sessions
200
- mnueron import --claude-cowork --limit 10 --ns elevizio
201
-
202
- # Parse everything but do NOT save — useful to confirm the parse is clean
203
- mnueron import --claude-cowork --dry-run
204
- ```
205
-
206
- Re-runs are safe: each session is upserted by `source_ref="cowork:<sessionId>"`,
207
- so importing twice just refreshes any sessions whose transcripts have changed.
208
-
209
- Where mnueron looks for transcripts:
210
-
211
- | OS | Paths scanned |
212
- |---|---|
213
- | Windows (regular install) | `%APPDATA%\Claude\local-agent-mode-sessions\` |
214
- | Windows (Microsoft Store install) | `%LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude\local-agent-mode-sessions\` |
215
- | macOS | `~/Library/Application Support/Claude/local-agent-mode-sessions/` |
216
- | Linux | `~/.config/Claude/local-agent-mode-sessions/` |
217
- | All | `~/.claude/projects/` (regular Claude Code) |
218
-
219
- Each Cowork session becomes one memory. The chunker then splits long
220
- transcripts per-turn so search returns the specific exchange, not the whole
221
- 6000-message session.
222
-
223
- #### CLI background watcher
224
-
225
- Long-running mode: keeps Cowork in step with mnueron memory by re-importing
226
- any session whose transcript file changes.
227
-
228
- ```bash
229
- # Default: poll every 5 minutes, save into the "claude-cowork" namespace,
230
- # run forever (Ctrl+C to stop).
231
- mnueron watch --claude-cowork
232
-
233
- # Custom interval (poll every 2 minutes) and namespace
234
- mnueron watch --claude-cowork --interval 2 --ns elevizio
235
-
236
- # Run exactly one sync tick and exit useful for cron / Task Scheduler
237
- mnueron watch --claude-cowork --once
238
- ```
239
-
240
- The watcher persists last-synced mtimes per session at
241
- `~/.mnueron/cowork-sync.json`, so restarting it doesn't re-import everything.
242
-
243
- #### Dashboard — one-click import
244
-
245
- ```bash
246
- # Open the dashboard at localhost:3122 in your browser
247
- mnueron dashboard
248
- ```
249
-
250
- Then click the **Import Cowork** button in the toolbar (next to the existing
251
- **Import…** button). You'll get a confirmation showing the session and
252
- message count before the import runs.
253
-
254
- #### MCP — trigger from inside any Claude session
255
-
256
- mnueron's MCP server exposes a `memory_import_cowork` tool. Once mnueron is
257
- wired into Claude Desktop / Claude Code (`mnueron setup`), just say:
258
-
259
- > "Import my cowork chats."
260
-
261
- Claude will call the tool with sensible defaults. To pass specific options:
262
-
263
- > "Use the `memory_import_cowork` tool with `namespace="elevizio"` and `limit=5`."
264
-
265
- The tool accepts:
266
- - `namespace` (string, default `"claude-cowork"`) where to save the memories
267
- - `limit` (number, optional) cap how many sessions to import in this call
268
- - `probe_only` (boolean, default `false`) — report what would be imported, don't save
269
-
270
- #### Daily scheduled task
271
-
272
- The Claude desktop app's scheduled-tasks feature can run the import on a
273
- cron. Example: every weekday at 7am.
274
-
275
- - Cron expression: `0 7 * * 1-5`
276
- - Prompt for the scheduled task:
277
-
278
- ```
279
- Run the daily mnueron Cowork sync by calling the memory_import_cowork
280
- MCP tool with no arguments. Report a one-line digest of saved chunks
281
- vs total sessions.
282
- ```
283
-
284
- This runs while the Claude app is open; if it's closed when the task is
285
- due, it fires on next launch.
286
-
287
- ## Use it in your apps (Python)
288
-
289
- ```bash
290
- pip install mnueron
291
- ```
292
-
293
- ```python
294
- from mnueron import Mnueron
295
- from openai import OpenAI
296
-
297
- mem = Mnueron(api_key="mnu_...")
298
- llm = OpenAI()
299
-
300
- # Pull memory before the LLM call provider-agnostic
301
- context = mem.search(user_message, namespace=f"user-{user.id}", k=5)
302
- context_str = "\n".join(m.content for m in context)
303
-
304
- # Use any LLM you want — OpenAI shown here, swap for anthropic/mistral/gemini freely
305
- resp = llm.chat.completions.create(
306
- model="gpt-4o-mini",
307
- messages=[
308
- {"role": "system", "content": f"What you know about this user:\n{context_str}"},
309
- {"role": "user", "content": user_message},
310
- ],
311
- )
312
-
313
- # Save anything worth remembering — same call regardless of provider
314
- mem.save(extract_facts(resp), namespace=f"user-{user.id}", source="auto")
315
- ```
316
-
317
- The same pattern works with Anthropic, Mistral, Gemini, or any other client —
318
- mnueron doesn't know or care which LLM you're using.
319
-
320
- ## Use it in your apps (.NET / C#)
321
-
322
- ```csharp
323
- using Mnueron;
324
-
325
- using var mem = new MnueronClient("mnu_...");
326
- var context = await mem.SearchAsync(question, $"user-{userId}", k: 5);
327
- // Call any LLM API with `context` injected into the prompt
328
- await mem.SaveAsync(newFact, $"user-{userId}");
329
- ```
330
-
331
- Single-file C# client. Drop `MnueronClient.cs` into any .NET 6+ project. No
332
- NuGet package required.
333
-
334
- ## CLI reference
335
-
336
- ```
337
- mnueron setup Detect and configure all installed AI tools
338
- [--only <tool>] claude-desktop | claude-code | cursor | windsurf | cline
339
- [--hosted <url> --token <t>] Hosted mode instead of local SQLite
340
- [--dry-run] Show what would change
341
- [--uninstall] Remove from all detected tools
342
- mnueron import <file> Bulk-import a Claude/OpenAI export
343
- mnueron search <query> Quick terminal search
344
- mnueron stats Counts by namespace
345
- mnueron namespaces List namespaces
346
- ```
347
-
348
- ## Self-host the hosted backend
349
-
350
- The hosted backend in `server/` is yours — multi-tenant Postgres + pgvector
351
- with row-level security. Step-by-step on Supabase free tier in
352
- `server/SUPABASE_SETUP.md` (~15 minutes from empty database to working API).
353
-
354
- ```bash
355
- # Quick start (Supabase recommended over RDS see SUPABASE_SETUP.md)
356
- psql $DATABASE_URL < server/supabase_schema.sql
357
- cd server && npm install && npx tsx index.ts
358
- ```
359
-
360
- ## Supported AI dev tools
361
-
362
- | Tool | Auto-configured | Notes |
363
- | --- | --- | --- |
364
- | Claude Desktop | ✓ | All platforms (macOS, Windows, Linux) |
365
- | Claude Code | ✓ | Uses `claude mcp add` CLI when available |
366
- | Cursor | | `~/.cursor/mcp.json` |
367
- | Windsurf | | `~/.codeium/windsurf/mcp_config.json` |
368
- | Cline (VS Code) | | VS Code globalStorage |
369
- | Aider, OpenCode, Goose, Continue.dev, Zed | manual | All speak MCP |
370
-
371
- ## Repo layout
372
-
373
- ```
374
- mnueron/
375
- ├── src/ Local MCP server (Node, stdio)
376
- │ ├── index.ts Server entry point
377
- │ ├── cli.ts setup | import | search | stats
378
- │ ├── setup.ts 1-click wizard orchestration
379
- │ ├── detectors/ One file per supported dev tool
380
- │ ├── tools.ts MCP tool definitions + handlers
381
- │ ├── config.ts Local vs remote provider switch
382
- │ ├── store/ Storage providers (SQLite local, HTTP remote)
383
- │ └── import/ Claude / OpenAI export parsers
384
- ├── server/ Hosted multi-tenant backend
385
- │ ├── schema.sql Standalone Postgres schema
386
- │ ├── supabase_schema.sql Supabase-adapted schema
387
- │ ├── index.ts Express reference implementation
388
- │ ├── README.md
389
- │ └── SUPABASE_SETUP.md 15-minute step-by-step
390
- ├── sdks/
391
- │ ├── python/ Python SDK (sync + async)
392
- │ │ ├── mnueron.py
393
- │ │ ├── pyproject.toml
394
- │ │ └── README.md
395
- │ └── csharp/ .NET / C# SDK
396
- ├── MnueronClient.cs
397
- └── README.md
398
- ├── INSTALL.md Full install guide (this is what most users read)
399
- ├── ARCHITECTURE.md Multi-tenant design + threat model
400
- ├── LICENSE MIT
401
- └── README.md You're here
402
- ```
403
-
404
- ## License
405
-
406
- mnueron uses an **open-core** model. Full details in [`LICENSE-OVERVIEW.md`](LICENSE-OVERVIEW.md).
407
-
408
- | Directory | License | What it means |
409
- | --- | --- | --- |
410
- | `src/`, `dashboard/`, `extension/`, `sdks/`, `examples/`, `scripts/` | **MIT** | Use, fork, embed, sell — no restrictions. Drop the SDK into commercial products freely. |
411
- | `server/` (and future `dashboard-web/`) | **[FSL-1.1-Apache-2.0](server/LICENSE)** | Read, modify, contribute, self-host for your own use. You cannot launch a competing commercial memory-as-a-service. Each version auto-converts to Apache 2.0 two years after release. |
412
-
413
- In short: **the client is fully open source. The hosted backend is source-available.** This is the same model Sentry uses, and it lets us welcome contributions while keeping a viable hosted business.
414
-
415
- ## Contributing
416
-
417
- Contributions welcome — see [`CONTRIBUTING.md`](CONTRIBUTING.md). All contributors sign a one-time [Contributor License Agreement](CLA.md) (same pattern as Apache, Google, Microsoft).
418
-
419
- ## Status
420
-
421
- Pre-alpha — works end-to-end but is still being shaped. If you find a rough
422
- edge, file an issue; if you fix it, PRs welcome.
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/randi2160/mnueron/main/assets/promo-large-dark.png" alt="mnueron — memory for every AI" width="420" />
3
+ </p>
4
+
5
+ <p align="center"><strong>One memory layer. Every LLM. Every dev tool. Every app you build.</strong></p>
6
+ <p align="center"><sub>Persistent memory for Claude Desktop · Claude Code · Codex · Cursor · Windsurf · Cline — local-first, free forever, open source (MIT).</sub></p>
7
+
8
+ ---
9
+
10
+ ```
11
+ ┌─────────────────────────────────────────────────────────────────────────┐
12
+ │ │
13
+ │ Dev tools: │
14
+ │ Claude Desktop · Claude Code · Codex · Cursor · Windsurf · Cline ──► MCP ─┐ │
15
+ │ │ │
16
+ │ Your apps: ├─► │
17
+ │ Python SDK · C# SDK · TypeScript · REST ─────────────────────────┘ │
18
+ │ │
19
+ │ mnueron ──► [local SQLite] FREE │
20
+ │ ──► [hosted Postgres] $ optional │
21
+ │ │
22
+ └─────────────────────────────────────────────────────────────────────────┘
23
+ ```
24
+
25
+ ## Why this exists
26
+
27
+ AI tools and AI apps are stateless by default. Every new chat session, your
28
+ AI starts from zero — you re-explain the same conventions, the same project
29
+ context, the same user preferences, every time. MNUERON gives your AI a
30
+ persistent memory that follows you across sessions, across machines, across
31
+ tools, and across LLM providers.
32
+
33
+ What changes day-to-day:
34
+
35
+ - **In Claude Desktop / Cursor:** A new chat starts knowing your project conventions, past decisions, and where you left off.
36
+ - **In your apps:** When a user comes back, the AI already knows their preferences — without you wiring it up per-provider.
37
+ - **Across providers:** Switch from OpenAI to Claude to Mistral without losing your customer's history. The memory layer is the constant.
38
+
39
+ ## What's new
40
+
41
+ See [CHANGELOG.md](CHANGELOG.md) for the full history. Headlines:
42
+
43
+ - **Codex officially supported** `mnueron setup --only codex` writes `~/.codex/config.toml` and the nine `memory_*` tools plus the procedural/runbook surface light up after a clean Codex restart. See [INSTALL.md](INSTALL.md#troubleshooting) for the Windows multi-process restart gotcha.
44
+ - **`mnueron primer`** emit a CLAUDE.md / cursorrules-style memory primer (`mnueron primer > CLAUDE.md`)
45
+ - **5 more IDE detectors** — Continue, Zed, Aider, Goose, OpenCode
46
+ - **Platform API gaps closed** — date-range filter, PATCH update, bulk search, metadata-field filter
47
+ - **Webhook subscriptions** — HMAC-signed POSTs on memory events
48
+ - **Fact extraction** — long assistant responses get distilled into searchable facts
49
+ - **Backend secret redaction** — defense in depth on top of the client-side redactor
50
+ - **Chrome extension v0.2.0** Local/Hosted toggle, recall + inject, ambient context, build-prompt multi-select
51
+ - **SDKs refreshed** — Python `0.3.1` + .NET `0.3` cover the new endpoints (date filters, PATCH, bulk search, webhook CRUD, HMAC verifier)
52
+ - **Claude Desktop import** — `mnueron import --claude-desktop` probes for and ingests Claude Desktop's export JSON
53
+
54
+ Full API docs at [mnueron.com/docs/api/overview](https://mnueron.com/docs/api/overview).
55
+
56
+ ## What you get out of the box — free, forever
57
+
58
+ Run `mnueron setup` and every single one of these is yours. No account, no credit card, no telemetry. Your data lives at `~/.mnueron/memories.db` and never leaves your computer unless you explicitly opt into hosted mode.
59
+
60
+ | | What | Why it matters |
61
+ | :-: | --- | --- |
62
+ | ✓ | **Local MCP server** with six tools (`memory_save`, `memory_recall`, `memory_get`, `memory_list`, `memory_delete`, `memory_namespaces`) | Wires into Claude Desktop, Claude Code, Cursor, Windsurf, Cline. One memory layer, every tool. |
63
+ | ✓ | **One-command setup wizard** | Auto-detects every installed AI dev tool and configures each. Restart, you're live. |
64
+ | ✓ | **Hybrid local search** — BM25 keyword (SQLite FTS5) + semantic vector (Transformers.js + sqlite-vec) | Find memories by meaning, not just keywords. No OpenAI API key, no cloud calls, runs on CPU. |
65
+ | ✓ | **Web dashboard** (`mnueron dashboard`) | Browse, search, delete, drag-drop importall from `localhost:3122`. |
66
+ | ✓ | **Chrome extension** for claude.ai and chatgpt.com | One-click **Capture chat** button. One-click **Backfill all history** — pulls your entire past claude.ai conversation list via their internal API in ~60 seconds. |
67
+ | ✓ | **Bulk importer** for Claude and ChatGPT export JSON files | Bring months of conversation history in one command. |
68
+ | ✓ | **Python + C# SDKs** | Use mnueron from your own apps with three lines of code. Provider-agnostic (works with OpenAI, Anthropic, Mistral, anything). |
69
+ | ✓ | **Plugin system** | Bring your own processors PII redaction example included. |
70
+ | ✓ | **Self-host the hosted backend** | The multi-tenant Postgres + pgvector + RLS code in `server/` is yours. Run it on your own VPC if you want all the features below without paying us. |
71
+
72
+ All MIT-licensed. Fork, embed, modify, sell — whatever.
73
+
74
+ ## Optional upgrade — hosted plan
75
+
76
+ When you want cross-machine sync or are running this for a team, the hosted plan handles it. Same client code; one env-var flip.
77
+
78
+ | Feature | Local (free) | Hosted |
79
+ | --- | :-: | :-: |
80
+ | All the local capabilities above | | ✓ |
81
+ | Cross-machine sync (laptop / desktop / work box) | — | ✓ |
82
+ | Hosted web dashboard with login | — | ✓ |
83
+ | Team / org-shared namespaces, role-based access | — | ✓ |
84
+ | Audit log + retention policies | | ✓ |
85
+ | Embedding into your own SaaS (multi-tenant API) | self-host | |
86
+ | SSO / SAML, BAAs, SLAs | — | enterprise tier |
87
+
88
+ Pricing: **$9/mo Personal · $25/user/mo Team · custom Enterprise**. Full plan details at [mnueron.com/pricing](https://mnueron.com/pricing).
89
+
90
+ To flip a machine to hosted mode:
91
+
92
+ ```bash
93
+ mnueron setup --hosted https://api.your-mnueron.com --token mnu_xxx
94
+ ```
95
+
96
+ ## Install
97
+
98
+ ### Prerequisites
99
+
100
+ You need **Node.js 20 or newer** and **npm 10 or newer**. Check what you have:
101
+
102
+ ```bash
103
+ node --version # need v20.x or higher
104
+ npm --version # need 10.x or higher
105
+ ```
106
+
107
+ Don't have Node? Install from **<https://nodejs.org/en/download>** (pick LTS).
108
+ On macOS you can also use `brew install node@20`; on Ubuntu/Debian `sudo apt install nodejs`.
109
+
110
+ ### Install mnueron
111
+
112
+ ```bash
113
+ npm install -g mnueron
114
+ mnueron setup
115
+ ```
116
+
117
+ That's it. Published on npm: <https://www.npmjs.com/package/mnueron>.
118
+
119
+ #### From source (for contributors)
120
+
121
+ If you want to hack on mnueron itself, the contributor quick start is one screen:
122
+
123
+ ```bash
124
+ # 1. Clone + install
125
+ git clone https://github.com/randi2160/mnueron.git
126
+ cd mnueron
127
+ npm install
128
+
129
+ # 2. Build + smoke test (~30 seconds — verifies your environment)
130
+ npm run build
131
+ npm test # runs scripts/smoke.mjs end-to-end
132
+
133
+ # 3. Make your local build the global `mnueron` command
134
+ npm link
135
+ mnueron setup # wire it into your AI tools
136
+
137
+ # 4. Iterate
138
+ npm run dev # tsx watch mode — re-runs on save
139
+ npm run typecheck # tsc --noEmit, catches type errors fast
140
+ ```
141
+
142
+ To switch back to the published version: `npm unlink -g mnueron && npm install -g mnueron`.
143
+
144
+ **Your first PR in 5 minutes:** read [`CONTRIBUTING.md`](CONTRIBUTING.md) (branch
145
+ naming, CLA, PR checklist) and [`DEVELOPMENT.md`](DEVELOPMENT.md) (engineering
146
+ runbook, verification recipes per subsystem). Both are short and assume you've
147
+ already done the steps above.
148
+
149
+ ### What `mnueron setup` does
150
+
151
+ The setup wizard detects every AI dev tool you have installed, configures
152
+ each one, and reports back. Restart your tools and your AI remembers.
153
+
154
+ ```
155
+ 🧠 mnueron — persistent memory for AI dev tools
156
+ mode: local SQLite
157
+
158
+ Configured:
159
+ Claude Desktop added
160
+ Claude Code added via `claude mcp add`
161
+ Cursor added
162
+
163
+ Not detected:
164
+ Windsurf
165
+ Cline (VS Code)
166
+
167
+ Done. Restart any running AI tool to load the memory plugin.
168
+ ```
169
+
170
+ ## What your AI gets
171
+
172
+ Six new tools available to any MCP-compatible AI:
173
+
174
+ | Tool | What it does |
175
+ | --- | --- |
176
+ | `memory_save` | Save a memory (content, namespace, tags). |
177
+ | `memory_recall` | Search by relevance — called when you reference prior context. |
178
+ | `memory_list` | List recent memories, optionally filtered. |
179
+ | `memory_delete` | Delete by id. |
180
+ | `memory_namespaces` | List namespaces and their counts. |
181
+ | `memory_import_chat` | Bulk-import a Claude/ChatGPT export file. |
182
+
183
+ ## Import your existing chat history
184
+
185
+ Bring months of Claude or ChatGPT conversations into your memory in one shot:
186
+
187
+ ```bash
188
+ # Export from claude.ai → Settings → Privacy → Export data
189
+ # Export from chatgpt.com → Settings → Data Controls → Export
190
+
191
+ mnueron import ~/Downloads/conversations.json --ns my-project
192
+ ```
193
+
194
+ Auto-detects Claude vs OpenAI format. Each conversation becomes a searchable
195
+ memory tagged `imported`.
196
+
197
+ ### Import your Claude Cowork sessions
198
+
199
+ If you use Claude's "Cowork" mode (the desktop app's local agent mode), every
200
+ chat is already on disk as a JSONL transcript. mnueron can find and import
201
+ all of them with no export step.
202
+
203
+ #### CLI — one-shot import
204
+
205
+ ```bash
206
+ # See what would be imported without saving anything
207
+ mnueron import --claude-cowork --probe
208
+
209
+ # Import every Cowork session into the default namespace ("claude-cowork")
210
+ mnueron import --claude-cowork
211
+
212
+ # Import into a custom namespace (e.g. group with one of your projects)
213
+ mnueron import --claude-cowork --ns elevizio
214
+
215
+ # Only import the 10 most recent Cowork sessions
216
+ mnueron import --claude-cowork --limit 10 --ns elevizio
217
+
218
+ # Parse everything but do NOT save — useful to confirm the parse is clean
219
+ mnueron import --claude-cowork --dry-run
220
+ ```
221
+
222
+ Re-runs are safe: each session is upserted by `source_ref="cowork:<sessionId>"`,
223
+ so importing twice just refreshes any sessions whose transcripts have changed.
224
+
225
+ Where mnueron looks for transcripts:
226
+
227
+ | OS | Paths scanned |
228
+ |---|---|
229
+ | Windows (regular install) | `%APPDATA%\Claude\local-agent-mode-sessions\` |
230
+ | Windows (Microsoft Store install) | `%LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude\local-agent-mode-sessions\` |
231
+ | macOS | `~/Library/Application Support/Claude/local-agent-mode-sessions/` |
232
+ | Linux | `~/.config/Claude/local-agent-mode-sessions/` |
233
+ | All | `~/.claude/projects/` (regular Claude Code) |
234
+
235
+ Each Cowork session becomes one memory. The chunker then splits long
236
+ transcripts per-turn so search returns the specific exchange, not the whole
237
+ 6000-message session.
238
+
239
+ #### CLI — background watcher
240
+
241
+ Long-running mode: keeps Cowork in step with mnueron memory by re-importing
242
+ any session whose transcript file changes.
243
+
244
+ ```bash
245
+ # Default: poll every 5 minutes, save into the "claude-cowork" namespace,
246
+ # run forever (Ctrl+C to stop).
247
+ mnueron watch --claude-cowork
248
+
249
+ # Custom interval (poll every 2 minutes) and namespace
250
+ mnueron watch --claude-cowork --interval 2 --ns elevizio
251
+
252
+ # Run exactly one sync tick and exit — useful for cron / Task Scheduler
253
+ mnueron watch --claude-cowork --once
254
+ ```
255
+
256
+ The watcher persists last-synced mtimes per session at
257
+ `~/.mnueron/cowork-sync.json`, so restarting it doesn't re-import everything.
258
+
259
+ #### Dashboard one-click import
260
+
261
+ ```bash
262
+ # Open the dashboard at localhost:3122 in your browser
263
+ mnueron dashboard
264
+ ```
265
+
266
+ Then click the **Import Cowork** button in the toolbar (next to the existing
267
+ **Import…** button). You'll get a confirmation showing the session and
268
+ message count before the import runs.
269
+
270
+ #### MCP trigger from inside any Claude session
271
+
272
+ mnueron's MCP server exposes a `memory_import_cowork` tool. Once mnueron is
273
+ wired into Claude Desktop / Claude Code (`mnueron setup`), just say:
274
+
275
+ > "Import my cowork chats."
276
+
277
+ Claude will call the tool with sensible defaults. To pass specific options:
278
+
279
+ > "Use the `memory_import_cowork` tool with `namespace="elevizio"` and `limit=5`."
280
+
281
+ The tool accepts:
282
+ - `namespace` (string, default `"claude-cowork"`) — where to save the memories
283
+ - `limit` (number, optional) — cap how many sessions to import in this call
284
+ - `probe_only` (boolean, default `false`) report what would be imported, don't save
285
+
286
+ #### Daily scheduled task
287
+
288
+ The Claude desktop app's scheduled-tasks feature can run the import on a
289
+ cron. Example: every weekday at 7am.
290
+
291
+ - Cron expression: `0 7 * * 1-5`
292
+ - Prompt for the scheduled task:
293
+
294
+ ```
295
+ Run the daily mnueron Cowork sync by calling the memory_import_cowork
296
+ MCP tool with no arguments. Report a one-line digest of saved chunks
297
+ vs total sessions.
298
+ ```
299
+
300
+ This runs while the Claude app is open; if it's closed when the task is
301
+ due, it fires on next launch.
302
+
303
+ ## Use it in your apps (Python)
304
+
305
+ ```bash
306
+ pip install mnueron
307
+ ```
308
+
309
+ ```python
310
+ from mnueron import Mnueron
311
+ from openai import OpenAI
312
+
313
+ mem = Mnueron(api_key="mnu_...")
314
+ llm = OpenAI()
315
+
316
+ # Pull memory before the LLM call — provider-agnostic
317
+ context = mem.search(user_message, namespace=f"user-{user.id}", k=5)
318
+ context_str = "\n".join(m.content for m in context)
319
+
320
+ # Use any LLM you want OpenAI shown here, swap for anthropic/mistral/gemini freely
321
+ resp = llm.chat.completions.create(
322
+ model="gpt-4o-mini",
323
+ messages=[
324
+ {"role": "system", "content": f"What you know about this user:\n{context_str}"},
325
+ {"role": "user", "content": user_message},
326
+ ],
327
+ )
328
+
329
+ # Save anything worth remembering — same call regardless of provider
330
+ mem.save(extract_facts(resp), namespace=f"user-{user.id}", source="auto")
331
+ ```
332
+
333
+ The same pattern works with Anthropic, Mistral, Gemini, or any other client —
334
+ mnueron doesn't know or care which LLM you're using.
335
+
336
+ ## Use it in your apps (.NET / C#)
337
+
338
+ ```csharp
339
+ using Mnueron;
340
+
341
+ using var mem = new MnueronClient("mnu_...");
342
+ var context = await mem.SearchAsync(question, $"user-{userId}", k: 5);
343
+ // Call any LLM API with `context` injected into the prompt
344
+ await mem.SaveAsync(newFact, $"user-{userId}");
345
+ ```
346
+
347
+ Single-file C# client. Drop `MnueronClient.cs` into any .NET 6+ project. No
348
+ NuGet package required.
349
+
350
+ ## CLI reference
351
+
352
+ ```
353
+ mnueron setup Detect and configure all installed AI tools
354
+ [--only <tool>] claude-desktop | claude-code | codex | cursor | windsurf | cline
355
+ [--hosted <url> --token <t>] Hosted mode instead of local SQLite
356
+ [--dry-run] Show what would change
357
+ [--uninstall] Remove from all detected tools
358
+ mnueron import <file> Bulk-import a Claude/OpenAI export
359
+ mnueron search <query> Quick terminal search
360
+ mnueron stats Counts by namespace
361
+ mnueron namespaces List namespaces
362
+ ```
363
+
364
+ ## Self-host the hosted backend
365
+
366
+ The hosted backend in `server/` is yours — multi-tenant Postgres + pgvector
367
+ with row-level security. Step-by-step on Supabase free tier in
368
+ `server/SUPABASE_SETUP.md` (~15 minutes from empty database to working API).
369
+
370
+ ```bash
371
+ # Quick start (Supabase recommended over RDS — see SUPABASE_SETUP.md)
372
+ psql $DATABASE_URL < server/supabase_schema.sql
373
+ cd server && npm install && npx tsx index.ts
374
+ ```
375
+
376
+ ## Supported AI dev tools
377
+
378
+ | Tool | Auto-configured | Notes |
379
+ | --- | --- | --- |
380
+ | Claude Desktop | | All platforms (macOS, Windows, Linux) |
381
+ | Claude Code | | Uses `claude mcp add` CLI when available |
382
+ | Codex | | `~/.codex/config.toml` |
383
+ | Cursor | | `~/.cursor/mcp.json` |
384
+ | Windsurf | ✓ | `~/.codeium/windsurf/mcp_config.json` |
385
+ | Cline (VS Code) | ✓ | VS Code globalStorage |
386
+ | Aider, OpenCode, Goose, Continue.dev, Zed | manual | All speak MCP |
387
+
388
+ `mnueron setup` is the intended out-of-the-box path. If a tool changes its MCP
389
+ config format or needs manual verification, see the exact config file paths and
390
+ JSON block in [INSTALL.md](INSTALL.md#manual-mcp-config-fallback).
391
+
392
+ ## Repo layout
393
+
394
+ ```
395
+ mnueron/
396
+ ├── src/ Local MCP server (Node, stdio)
397
+ ├── index.ts Server entry point
398
+ ├── cli.ts setup | import | search | stats
399
+ ├── setup.ts 1-click wizard orchestration
400
+ ├── detectors/ One file per supported dev tool
401
+ │ ├── tools.ts MCP tool definitions + handlers
402
+ │ ├── config.ts Local vs remote provider switch
403
+ │ ├── store/ Storage providers (SQLite local, HTTP remote)
404
+ │ └── import/ Claude / OpenAI export parsers
405
+ ├── server/ Hosted multi-tenant backend
406
+ │ ├── schema.sql Standalone Postgres schema
407
+ │ ├── supabase_schema.sql Supabase-adapted schema
408
+ │ ├── index.ts Express reference implementation
409
+ │ ├── README.md
410
+ │ └── SUPABASE_SETUP.md 15-minute step-by-step
411
+ ├── sdks/
412
+ │ ├── python/ Python SDK (sync + async)
413
+ │ │ ├── mnueron.py
414
+ │ │ ├── pyproject.toml
415
+ │ │ └── README.md
416
+ │ └── csharp/ .NET / C# SDK
417
+ │ ├── MnueronClient.cs
418
+ │ └── README.md
419
+ ├── INSTALL.md Full install guide (this is what most users read)
420
+ ├── ARCHITECTURE.md Multi-tenant design + threat model
421
+ ├── LICENSE MIT
422
+ └── README.md You're here
423
+ ```
424
+
425
+ ## License
426
+
427
+ mnueron uses an **open-core** model. Full details in [`LICENSE-OVERVIEW.md`](LICENSE-OVERVIEW.md).
428
+
429
+ | Directory | License | What it means |
430
+ | --- | --- | --- |
431
+ | `src/`, `dashboard/`, `extension/`, `sdks/`, `examples/`, `scripts/` | **MIT** | Use, fork, embed, sell — no restrictions. Drop the SDK into commercial products freely. |
432
+ | `server/` (and future `dashboard-web/`) | **[FSL-1.1-Apache-2.0](server/LICENSE)** | Read, modify, contribute, self-host for your own use. You cannot launch a competing commercial memory-as-a-service. Each version auto-converts to Apache 2.0 two years after release. |
433
+
434
+ In short: **the client is fully open source. The hosted backend is source-available.** This is the same model Sentry uses, and it lets us welcome contributions while keeping a viable hosted business.
435
+
436
+ ## Contributing
437
+
438
+ Contributions welcome — see [`CONTRIBUTING.md`](CONTRIBUTING.md). All contributors sign a one-time [Contributor License Agreement](CLA.md) (same pattern as Apache, Google, Microsoft).
439
+
440
+ ## Status
441
+
442
+ Pre-alpha — works end-to-end but is still being shaped. If you find a rough
443
+ edge, file an issue; if you fix it, PRs welcome.