memex-mvp 0.5.3 → 0.5.4

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 CHANGED
@@ -48,6 +48,24 @@ Or use one-shot `sudo npm install -g memex-mvp`.
48
48
  npx memex-mvp install
49
49
  ```
50
50
 
51
+ ### Install via AI skill (Claude Code / OpenClaw)
52
+
53
+ If you'd rather have an AI agent walk you through everything, drop the
54
+ [install-memex skill](skills/install-memex/) into `~/.claude/skills/`:
55
+
56
+ ```sh
57
+ mkdir -p ~/.claude/skills
58
+ curl -fsSL https://raw.githubusercontent.com/parallelclaw/memex-mvp/main/skills/install-memex/SKILL.md \
59
+ -o ~/.claude/skills/install-memex/SKILL.md
60
+ ```
61
+
62
+ Then in Claude Code (or any Skills-aware agent) just say:
63
+
64
+ > install memex
65
+
66
+ …or `/install-memex`. The agent handles `npm install`, MCP-config wiring,
67
+ auto-capture daemon, and verification — ~2 minutes.
68
+
51
69
  ---
52
70
 
53
71
  ## Connect to your MCP client
package/README.ru.md CHANGED
@@ -105,6 +105,22 @@ sudo npm install -g memex-mvp
105
105
 
106
106
  После установки `memex-sync install` поднимет фоновый daemon (`~/.memex/{inbox,data}/` создадутся автоматически при первом запуске).
107
107
 
108
+ ### Установка через AI-скилл (Claude Code / OpenClaw)
109
+
110
+ Если хочешь чтобы агент сам всё сделал — закинь [install-memex skill](skills/install-memex/) в `~/.claude/skills/`:
111
+
112
+ ```bash
113
+ mkdir -p ~/.claude/skills
114
+ curl -fsSL https://raw.githubusercontent.com/parallelclaw/memex-mvp/main/skills/install-memex/SKILL.md \
115
+ -o ~/.claude/skills/install-memex/SKILL.md
116
+ ```
117
+
118
+ Затем в Claude Code (или любом Skills-aware агенте) скажи:
119
+
120
+ > установи memex
121
+
122
+ …или `/install-memex`. Агент сам сделает `npm install`, пропишет MCP-config, поднимет daemon и проверит что всё работает — ~2 минуты.
123
+
108
124
  ### Подключение к Claude Code
109
125
 
110
126
  Сначала возьми **два абсолютных пути** в терминале:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memex-mvp",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Local-first MCP server for cross-agent AI memory. One SQLite + FTS5 corpus across Claude Code, Cowork, Cursor, Continue, Zed, Obsidian, and Telegram — passively captured, verbatim, searchable from any MCP-compatible client.",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -16,6 +16,7 @@
16
16
  "ingest.js",
17
17
  "lib/",
18
18
  "bot/",
19
+ "skills/",
19
20
  "HELP.md",
20
21
  "README.md",
21
22
  "LICENSE"
@@ -0,0 +1,58 @@
1
+ # install-memex skill
2
+
3
+ An [Anthropic Skill](https://docs.claude.com/docs/en/agents/skills) that
4
+ walks Claude Code (or any MCP-compatible agent that supports the Skills
5
+ spec) through installing **memex** on the user's machine — npm install,
6
+ MCP-config wiring, auto-capture daemon, and end-to-end verification.
7
+
8
+ Roughly 2 minutes wall-clock; requires Node.js and shell access.
9
+
10
+ ## Install the skill
11
+
12
+ ```sh
13
+ mkdir -p ~/.claude/skills
14
+ cp -r /path/to/memex-mvp/skills/install-memex ~/.claude/skills/
15
+ ```
16
+
17
+ Or via curl from this repo:
18
+ ```sh
19
+ mkdir -p ~/.claude/skills/install-memex
20
+ curl -fsSL https://raw.githubusercontent.com/parallelclaw/memex-mvp/main/skills/install-memex/SKILL.md \
21
+ -o ~/.claude/skills/install-memex/SKILL.md
22
+ ```
23
+
24
+ ## Use it
25
+
26
+ In any Skills-aware agent (Claude Code, OpenClaw, …):
27
+
28
+ ```
29
+ /install-memex
30
+ ```
31
+
32
+ …or just say "install memex" — the skill description is written so
33
+ Claude picks it up automatically from natural-language requests.
34
+
35
+ ## What it does (high level)
36
+
37
+ 1. **Discovery** — read-only checks for which MCP client you're using and which AI tool data already lives on this machine.
38
+ 2. **`npm install -g memex-mvp`** — with EACCES fallbacks (one-shot sudo OR permanent prefix-fix; user picks).
39
+ 3. **MCP config merge** — single absolute `"command": "<path from which memex>"` entry into your client's mcpServers config. Never overwrites your other servers.
40
+ 4. **`memex-sync install`** — registers the macOS LaunchAgent for live auto-capture.
41
+ 5. **`memex-sync scan`** — one-time backfill of every session that already exists on disk.
42
+ 6. **Verification + restart hint.**
43
+
44
+ ## Why a skill (vs. just copy-pasting the install prompt)
45
+
46
+ - **`/install-memex`** is shorter than "open the landing, click 'Copy install prompt', paste here"
47
+ - Skills are auto-discovered by name — `description` field lets Claude invoke this from any phrasing of "install memex"
48
+ - Future updates to the install flow auto-propagate if you re-fetch the skill, instead of relying on the user re-copying
49
+
50
+ ## Related
51
+
52
+ - 🏠 [memex.parallelclaw.ai](https://memex.parallelclaw.ai) — landing page (also has copy-paste version of this prompt)
53
+ - 📦 [memex-mvp on npm](https://www.npmjs.com/package/memex-mvp)
54
+ - 📖 [Main memex repo](https://github.com/parallelclaw/memex-mvp)
55
+
56
+ ## License
57
+
58
+ MIT — see [LICENSE](../../LICENSE) at the repo root.
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: install-memex
3
+ description: Install memex (local-first MCP server for cross-agent AI memory) on the user's machine. Detects which MCP client is active, registers memex in its config, sets up the auto-capture daemon, and verifies end-to-end. Use when the user says "install memex", "set up memex", "add memex to this", or similar. Takes ~2 minutes; requires Node.js and shell access.
4
+ ---
5
+
6
+ # Install memex
7
+
8
+ You are installing **memex** on this machine. Memex is a local-first MCP server that captures the user's AI conversations across Claude Code, Cowork (including subagents), Cursor, Obsidian, and Telegram exports into a searchable SQLite + FTS5 index that any MCP-compatible agent can query through 11 standard tools.
9
+
10
+ Repo: https://github.com/parallelclaw/memex-mvp
11
+ Landing: https://memex.parallelclaw.ai
12
+ npm: https://www.npmjs.com/package/memex-mvp
13
+
14
+ ## How memex works (read this so you don't get confused by paths below)
15
+
16
+ Memex has its OWN storage at `~/.memex/data/memex.db`. It READS from each tool's native data location automatically — Claude Code from `~/.claude/projects/`, Cursor from its `state.vscdb`, Cowork from its sessions dir, Obsidian from configured vaults. You do NOT need to change where Claude Code, Cursor, or any other tool saves its data. Memex is a passive observer.
17
+
18
+ ## Prerequisite
19
+
20
+ This skill only works if you are running INSIDE an AI agent that has direct access to the user's shell — i.e. one of: Claude Code (CLI), Cursor, Cline, Continue, or Zed. Web-based agents (ChatGPT in browser, Claude.ai web, Claude Desktop without tools, etc.) cannot execute `npm`/file operations. If you are NOT a CLI-based agent with shell access, stop now and tell the user to use the manual install at https://memex.parallelclaw.ai/#quickstart.
21
+
22
+ ## Discovery — do this BEFORE the numbered steps
23
+
24
+ Scan the user's setup so you can tailor advice and tell them exactly what memex will pick up.
25
+
26
+ 1. Identify which MCP client you're running inside (you should know from context — Claude Code CLI, Cursor, Cline, Continue, or Zed).
27
+ 2. Run these read-only checks one by one:
28
+ ```sh
29
+ ls -d ~/.claude/projects 2>/dev/null
30
+ ls -d ~/Library/Application\ Support/Claude/local-agent-mode-sessions 2>/dev/null
31
+ ls -d ~/Library/Application\ Support/Cursor 2>/dev/null
32
+ ls ~/.continue/config.json 2>/dev/null
33
+ ls -d ~/.config/zed 2>/dev/null
34
+ ```
35
+ 3. Report to the user in plain language:
36
+ - "You're running inside [X]. I will edit [path] in step 2 below."
37
+ - "Tools with data found on this machine: [list]"
38
+ - "Tools NOT found (memex won't capture from these): [list]"
39
+ - "After install, memex will auto-index conversations from: [detected sources]"
40
+ 4. Wait for the user's "ok" before starting step 1.
41
+
42
+ ## Five-step install
43
+
44
+ Do these in order. Show each command before running it. Stop and ask if anything fails or looks wrong.
45
+
46
+ ### 1. Install memex from npm
47
+
48
+ ```sh
49
+ npm install -g memex-mvp
50
+ ```
51
+
52
+ If you get `EACCES` (macOS system Node), tell the user to choose:
53
+
54
+ **Option A** — one-shot sudo:
55
+ ```sh
56
+ sudo npm install -g memex-mvp
57
+ ```
58
+
59
+ **Option B** — fix prefix permanently (better long-term):
60
+ ```sh
61
+ mkdir -p ~/.npm-global
62
+ npm config set prefix ~/.npm-global
63
+ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
64
+ source ~/.zshrc
65
+ npm install -g memex-mvp
66
+ ```
67
+
68
+ **Ask which the user prefers — don't guess.**
69
+
70
+ If `node` or `npm` are missing, STOP and tell the user to install Node.js (recommend nvm.sh or `brew install node`). Don't try to install Node yourself.
71
+
72
+ **Verify:** `which memex` prints an absolute path; `memex-sync --help` runs without error.
73
+
74
+ ### 2. Wire memex into the MCP client
75
+
76
+ Common config locations:
77
+
78
+ | Client | Config file |
79
+ |--------------|-----------------------------------------------------|
80
+ | Claude Code | `~/.claude/config.json` (or platform equivalent) |
81
+ | Cursor | `~/.cursor/mcp.json` |
82
+ | Cline | VS Code `settings.json` (`cline.mcpServers`) |
83
+ | Continue | `~/.continue/config.json` |
84
+ | Zed | `~/.config/zed/settings.json` (`context_servers`) |
85
+
86
+ Tell the user which one you've inferred and which file you'll edit. If unclear, ask.
87
+
88
+ Read the existing config (if present). Show the user a diff before saving.
89
+
90
+ Get the **absolute** path to the memex binary — GUI apps (Cursor, Cline, Claude Desktop) on macOS often don't inherit shell PATH, so a bare `"command": "memex"` fails with `spawn memex ENOENT`. Run:
91
+
92
+ ```sh
93
+ which memex
94
+ ```
95
+
96
+ Capture that path (e.g. `/Users/<you>/.npm-global/bin/memex` or `/usr/local/bin/memex`). If it's a shim, also run `realpath $(which memex)` to resolve to the real binary.
97
+
98
+ MERGE this entry into `mcpServers` — never overwrite other servers the user has:
99
+
100
+ ```json
101
+ {
102
+ "mcpServers": {
103
+ "memex": {
104
+ "command": "<absolute path from which memex>"
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ One path, no `args`. The published npm package wires up its own entry point.
111
+
112
+ If the config file doesn't exist, create the parent directory and write a minimal valid file with just memex.
113
+
114
+ **Verify:** re-read the file after save; confirm `memex` entry is present and `command` is an absolute path.
115
+
116
+ ### 3. Turn on live auto-capture
117
+
118
+ ```sh
119
+ memex-sync install
120
+ memex-sync status
121
+ ```
122
+
123
+ `status` should print "daemon installed", "running (PID …)", "watching N sessions".
124
+
125
+ **Verify:** status output shows a non-zero PID.
126
+
127
+ ### 4. Backfill existing history
128
+
129
+ The daemon only catches NEW sessions going forward. To index everything already on disk:
130
+
131
+ ```sh
132
+ memex-sync scan
133
+ ```
134
+
135
+ This walks `~/.claude/projects/`, Cowork sessions, Cursor `state.vscdb`, and any configured Obsidian vaults once, ingesting whatever exists.
136
+
137
+ Optionally:
138
+ ```sh
139
+ memex-sync backfill-projects
140
+ ```
141
+
142
+ Tags older conversations with their `project_path` so `memex_list_projects` works on them.
143
+
144
+ **Verify:** after scan, `memex-sync status` shows a non-zero "ingested" count.
145
+
146
+ ### 5. Tell the user what to do next
147
+
148
+ Tell the user to fully quit and reopen the MCP client (Cmd+Q on macOS) so it picks up the new memex tools.
149
+
150
+ After restart, suggest they try any of:
151
+ - "show me what memex has in memory" → triggers `memex_overview`
152
+ - "what projects has memex captured" → triggers `memex_list_projects`
153
+ - "search memex for [recent topic]" → triggers `memex_search`
154
+
155
+ These confirm everything works end-to-end.
156
+
157
+ ## Safety rules — read before starting
158
+
159
+ - If `node` or `npm` aren't installed, stop and tell the user to install Node.js (recommend nvm.sh or `brew install node`). Don't try to install Node yourself.
160
+ - Never run `rm`, `sudo`, or anything destructive without explicit confirmation from the user.
161
+ - Show every command before running it. If the user says "no" or "stop", halt and explain.
162
+ - If a step fails, do NOT auto-retry or auto-fix — tell the user what failed and ask how to proceed.
163
+ - When editing the MCP config, always preserve existing entries. If you can't merge cleanly, abort and tell the user.
164
+ - Do NOT modify the host application's settings beyond adding the memex entry to its `mcpServers` config. Specifically: do not redirect where Cursor / Claude Code / any other tool saves its data. Memex reads from each tool's native location automatically. The only file you should touch is the MCP config file listed in step 2.
165
+ - Stay focused on the main install task. If sidetracked into a sub-task (changing workspace, fixing an unrelated config issue, looking up something else), once it's done you MUST return to the memex install and explicitly tell the user: "OK, back to memex install. We were at step N — should I continue?". Don't go silent after a side task. Don't assume the user wants to abandon the install — always confirm.
166
+
167
+ ## Begin
168
+
169
+ Greet the user, confirm which MCP client you're running inside, and run the Discovery checks before any install actions.