claude-recall 0.2.16 → 0.2.18

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
@@ -35,7 +35,7 @@ npm install -g claude-recall@latest
35
35
 
36
36
  ### 2. Verify Installation
37
37
  ```bash
38
- claude-recall --version # Should show 0.2.15 or higher
38
+ claude-recall --version # Should show 0.2.18 or higher
39
39
  ```
40
40
 
41
41
  ### 3. Start Using Claude
@@ -174,6 +174,7 @@ Clear npm cache and reinstall:
174
174
  npm cache clean --force
175
175
  npm uninstall -g claude-recall
176
176
  npm install -g claude-recall@latest
177
+ claude-recall --version
177
178
  ```
178
179
 
179
180
  ### Performance issues?
@@ -260,7 +260,7 @@ async function main() {
260
260
  program
261
261
  .name('claude-recall')
262
262
  .description('Memory-enhanced Claude Code via MCP')
263
- .version('0.2.15')
263
+ .version('0.2.18')
264
264
  .option('--verbose', 'Enable verbose logging')
265
265
  .option('--config <path>', 'Path to custom config file');
266
266
  // MCP command
@@ -233,4 +233,4 @@ socket.on('queue:processed', (message) => {});
233
233
  ```
234
234
 
235
235
  ---
236
- *API Reference v0.2.15 - Last updated: August 2025*
236
+ *API Reference v0.2.18 - Last updated: August 2025*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "description": "Persistent memory for Claude Code with automatic capture via hooks and MCP server",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -9,6 +9,7 @@
9
9
  "files": [
10
10
  "dist/",
11
11
  "scripts/postinstall.js",
12
+ "scripts/postinstall-claude-md.js",
12
13
  "README.md",
13
14
  "LICENSE",
14
15
  "docs/"
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ /**
7
+ * Appends claude-recall instructions to project CLAUDE.md
8
+ * Only affects project-level CLAUDE.md, not global settings
9
+ */
10
+ function updateProjectClaudeMd() {
11
+ // Only update CLAUDE.md in the current project directory
12
+ const projectDir = process.cwd();
13
+ const claudeMdPath = path.join(projectDir, 'CLAUDE.md');
14
+
15
+ // Skip if we're in the claude-recall package directory itself
16
+ if (projectDir.includes('node_modules/claude-recall')) {
17
+ return;
18
+ }
19
+
20
+ // Minimal instructions for claude-recall
21
+ const claudeRecallInstructions = `
22
+ ## Claude Recall Integration
23
+ - IMPORTANT: Always search memories before creating new files or making decisions
24
+ - Use \`mcp__claude-recall__search_memory\` to check for stored preferences and project knowledge
25
+ - Memories include: coding preferences, file locations, project patterns, and team conventions
26
+ `;
27
+
28
+ const marker = '## Claude Recall Integration';
29
+
30
+ try {
31
+ let content = '';
32
+ let hasInstructions = false;
33
+
34
+ // Check if CLAUDE.md exists
35
+ if (fs.existsSync(claudeMdPath)) {
36
+ content = fs.readFileSync(claudeMdPath, 'utf8');
37
+ hasInstructions = content.includes(marker);
38
+ }
39
+
40
+ // Only append if instructions aren't already there
41
+ if (!hasInstructions) {
42
+ // Append to existing content or create new file
43
+ const updatedContent = content ?
44
+ content.trimEnd() + '\n' + claudeRecallInstructions :
45
+ `# Project Instructions\n${claudeRecallInstructions}`;
46
+
47
+ fs.writeFileSync(claudeMdPath, updatedContent);
48
+ console.log('✅ Added Claude Recall instructions to project CLAUDE.md');
49
+ console.log(` Location: ${claudeMdPath}`);
50
+ } else {
51
+ console.log('ℹ️ Claude Recall instructions already present in CLAUDE.md');
52
+ }
53
+ } catch (error) {
54
+ // Silently fail - don't break installation
55
+ console.log('⚠️ Could not update project CLAUDE.md (this is optional)');
56
+ }
57
+ }
58
+
59
+ // Run the update
60
+ updateProjectClaudeMd();
@@ -48,6 +48,14 @@ try {
48
48
 
49
49
  console.log('✅ Successfully configured Claude Recall in ~/.claude.json');
50
50
 
51
+ // Update project CLAUDE.md with minimal instructions
52
+ const { execSync } = require('child_process');
53
+ try {
54
+ execSync('node ' + path.join(__dirname, 'postinstall-claude-md.js'), { stdio: 'inherit' });
55
+ } catch (error) {
56
+ // Don't fail installation if CLAUDE.md update fails
57
+ }
58
+
51
59
  console.log('\n📝 Installation complete!');
52
60
  console.log(' Claude Recall MCP server is now configured.');
53
61
  console.log(' Restart Claude Code to activate the memory system.');