persisted-memory 1.0.0 → 1.0.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.
package/README.md CHANGED
@@ -51,28 +51,63 @@ ollama pull llama3.2
51
51
 
52
52
  ## Installation
53
53
 
54
- ### From npm
54
+ ### Step 1: Install the package
55
55
 
56
56
  ```bash
57
57
  npm install -g persisted-memory
58
58
  ```
59
59
 
60
- ### From source
60
+ ### Step 2: Register the MCP server with Claude Code
61
61
 
62
62
  ```bash
63
- git clone <this-repo> ~/Works/persisted_memory
63
+ claude mcp add --scope user memory -- persisted-memory
64
+ ```
65
+
66
+ ### Step 3: Register hooks
67
+
68
+ Create or edit `~/.claude/settings.json` to add the lifecycle hooks. Run the setup script that comes with the package:
69
+
70
+ ```bash
71
+ # Find where the package is installed
72
+ INSTALL_DIR=$(npm root -g)/persisted-memory
73
+
74
+ # Run the setup script
75
+ bash "$INSTALL_DIR/scripts/install.sh"
76
+ ```
77
+
78
+ The install script will:
79
+ 1. Register the MCP server at user-level (`claude mcp add`)
80
+ 2. Register hooks in `~/.claude/settings.json` (SessionStart, PreCompact, PostToolUse, Stop, SessionEnd)
81
+ 3. Add memory instructions to `~/.claude/CLAUDE.md`
82
+
83
+ ### Step 4: Restart Claude Code
84
+
85
+ The MCP server and hooks activate on restart.
86
+
87
+ ### Alternative: Install from source
88
+
89
+ ```bash
90
+ git clone <repo-url> ~/Works/persisted_memory
64
91
  cd ~/Works/persisted_memory
65
92
  npm install && npm run build
66
93
  bash scripts/install.sh
67
94
  ```
68
95
 
69
- The install script will:
70
- 1. Install dependencies and build
71
- 2. Register the MCP server at user-level (`claude mcp add`)
72
- 3. Register hooks in `~/.claude/settings.json`
73
- 4. Add memory instructions to `~/.claude/CLAUDE.md`
96
+ ## Setup for an Existing Project
97
+
98
+ No per-project setup is needed. Once installed globally, persisted-memory works automatically in **every project** you open with Claude Code.
99
+
100
+ On first use in a project, it creates the memory directory at:
101
+ ```
102
+ <your-project>/.claude/memory/
103
+ ```
104
+
105
+ The only recommended step is to add the LanceDB index to your `.gitignore`:
106
+ ```bash
107
+ echo ".claude/memory/.lance/" >> .gitignore
108
+ ```
74
109
 
75
- **Restart Claude Code** after installation.
110
+ The `.md` and `.json` files in `.claude/memory/` are human-readable and optionally committable -- they provide shareable context for team members.
76
111
 
77
112
  ## Verification
78
113
 
@@ -198,13 +233,6 @@ Each project gets its own memory directory:
198
233
  └── decisions.md # Append-only decisions log
199
234
  ```
200
235
 
201
- Add to your project's `.gitignore`:
202
- ```
203
- .claude/memory/.lance/
204
- ```
205
-
206
- The `.md` and `.json` files are optionally committable -- they provide shareable context for team members.
207
-
208
236
  ## Search
209
237
 
210
238
  Search uses a **hybrid approach**:
@@ -223,7 +251,13 @@ Markdown files are the source of truth. If LanceDB data corrupts:
223
251
  ## Uninstallation
224
252
 
225
253
  ```bash
254
+ # If installed from source
226
255
  bash ~/Works/persisted_memory/scripts/uninstall.sh
256
+
257
+ # If installed globally via npm
258
+ INSTALL_DIR=$(npm root -g)/persisted-memory
259
+ bash "$INSTALL_DIR/scripts/uninstall.sh"
260
+ npm uninstall -g persisted-memory
227
261
  ```
228
262
 
229
263
  This removes the MCP server and hooks. Per-project memory data at `<project>/.claude/memory/` is **preserved** -- delete manually if no longer needed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "persisted-memory",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Persistent memory system for Claude Code via MCP — dual-write to Markdown + LanceDB with hybrid semantic search",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "https://github.com/saharat/persisted-memory"
33
+ "url": "https://gitlab.com/uppercase-m/claude-persisted-memory"
34
34
  },
35
35
  "license": "MIT",
36
36
  "author": "saharat",
@@ -11,8 +11,8 @@ echo ""
11
11
  # 1. Build
12
12
  echo "Building persisted-memory..."
13
13
  cd "$SCRIPT_DIR"
14
- yarn install --immutable 2>/dev/null || yarn install
15
- yarn build
14
+ npm install
15
+ npm run build
16
16
  echo " Build complete."
17
17
  echo ""
18
18