claude-mem 3.9.14 → 9.0.7

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 (128) hide show
  1. package/README.md +220 -374
  2. package/dist/index.d.ts +7 -0
  3. package/dist/index.js +8 -0
  4. package/dist/sdk/index.d.ts +109 -0
  5. package/dist/sdk/index.js +183 -0
  6. package/package.json +79 -29
  7. package/plugin/.claude-plugin/CLAUDE.md +23 -0
  8. package/plugin/.claude-plugin/plugin.json +17 -0
  9. package/plugin/.mcp.json +8 -0
  10. package/plugin/CLAUDE.md +11 -0
  11. package/plugin/commands/CLAUDE.md +18 -0
  12. package/plugin/commands/do.md +43 -0
  13. package/plugin/commands/make-plan.md +66 -0
  14. package/plugin/hooks/CLAUDE.md +37 -0
  15. package/plugin/hooks/bugfixes-2026-01-10.md +92 -0
  16. package/plugin/hooks/hooks.json +81 -0
  17. package/plugin/modes/CLAUDE.md +7 -0
  18. package/plugin/modes/code--ar.json +24 -0
  19. package/plugin/modes/code--bn.json +24 -0
  20. package/plugin/modes/code--chill.json +8 -0
  21. package/plugin/modes/code--cs.json +24 -0
  22. package/plugin/modes/code--da.json +24 -0
  23. package/plugin/modes/code--de.json +24 -0
  24. package/plugin/modes/code--el.json +24 -0
  25. package/plugin/modes/code--es.json +24 -0
  26. package/plugin/modes/code--fi.json +24 -0
  27. package/plugin/modes/code--fr.json +24 -0
  28. package/plugin/modes/code--he.json +24 -0
  29. package/plugin/modes/code--hi.json +24 -0
  30. package/plugin/modes/code--hu.json +24 -0
  31. package/plugin/modes/code--id.json +24 -0
  32. package/plugin/modes/code--it.json +24 -0
  33. package/plugin/modes/code--ja.json +24 -0
  34. package/plugin/modes/code--ko.json +24 -0
  35. package/plugin/modes/code--nl.json +24 -0
  36. package/plugin/modes/code--no.json +24 -0
  37. package/plugin/modes/code--pl.json +24 -0
  38. package/plugin/modes/code--pt-br.json +24 -0
  39. package/plugin/modes/code--ro.json +24 -0
  40. package/plugin/modes/code--ru.json +24 -0
  41. package/plugin/modes/code--sv.json +24 -0
  42. package/plugin/modes/code--th.json +24 -0
  43. package/plugin/modes/code--tr.json +24 -0
  44. package/plugin/modes/code--uk.json +24 -0
  45. package/plugin/modes/code--vi.json +24 -0
  46. package/plugin/modes/code--zh.json +24 -0
  47. package/plugin/modes/code.json +125 -0
  48. package/plugin/modes/email-investigation.json +120 -0
  49. package/plugin/package.json +12 -0
  50. package/plugin/scripts/CLAUDE.md +125 -0
  51. package/plugin/scripts/context-generator.cjs +544 -0
  52. package/plugin/scripts/mcp-server.cjs +77 -0
  53. package/plugin/scripts/smart-install.js +438 -0
  54. package/plugin/scripts/worker-cli.js +19 -0
  55. package/plugin/scripts/worker-service.cjs +1599 -0
  56. package/plugin/scripts/worker-wrapper.cjs +2 -0
  57. package/plugin/skills/mem-search/CLAUDE.md +17 -0
  58. package/plugin/ui/CLAUDE.md +62 -0
  59. package/plugin/ui/assets/fonts/CLAUDE.md +99 -0
  60. package/plugin/ui/assets/fonts/monaspace-radon-var.woff +0 -0
  61. package/plugin/ui/assets/fonts/monaspace-radon-var.woff2 +0 -0
  62. package/{claude-mem-logo-dm.webp → plugin/ui/claude-mem-logo-for-dark-mode.webp} +0 -0
  63. package/plugin/ui/claude-mem-logomark.webp +0 -0
  64. package/plugin/ui/icon-thick-completed.svg +8 -0
  65. package/plugin/ui/icon-thick-investigated.svg +8 -0
  66. package/plugin/ui/icon-thick-learned.svg +12 -0
  67. package/plugin/ui/icon-thick-next-steps.svg +8 -0
  68. package/plugin/ui/viewer-bundle.js +48 -0
  69. package/plugin/ui/viewer.html +2876 -0
  70. package/CHANGELOG.md +0 -119
  71. package/README_WINDOWS.md +0 -265
  72. package/claude-mem-logo-lm.webp +0 -0
  73. package/commands/claude-mem.md +0 -23
  74. package/commands/remember.md +0 -1
  75. package/commands/save.md +0 -7
  76. package/dist/claude-mem.min.js +0 -662
  77. package/hook-templates/post-tool-use.js +0 -150
  78. package/hook-templates/session-start.js +0 -57
  79. package/hook-templates/shared/config-loader.js +0 -26
  80. package/hook-templates/shared/hook-helpers.js +0 -430
  81. package/hook-templates/shared/hook-prompt-renderer.js +0 -278
  82. package/hook-templates/shared/hook-prompts.config.js +0 -217
  83. package/hook-templates/shared/path-resolver.js +0 -108
  84. package/hook-templates/stop.js +0 -134
  85. package/hook-templates/user-prompt-submit.js +0 -157
  86. package/src/bin/cli.ts +0 -275
  87. package/src/commands/changelog.ts +0 -744
  88. package/src/commands/chroma-mcp.ts +0 -196
  89. package/src/commands/doctor.ts +0 -100
  90. package/src/commands/generate-title.ts +0 -181
  91. package/src/commands/install.ts +0 -604
  92. package/src/commands/load-context.ts +0 -461
  93. package/src/commands/logs.ts +0 -84
  94. package/src/commands/restore.ts +0 -24
  95. package/src/commands/status.ts +0 -213
  96. package/src/commands/store-memory.ts +0 -154
  97. package/src/commands/store-overview.ts +0 -45
  98. package/src/commands/trash-empty.ts +0 -66
  99. package/src/commands/trash-view.ts +0 -124
  100. package/src/commands/trash.ts +0 -60
  101. package/src/commands/uninstall.ts +0 -198
  102. package/src/commands/update-session-metadata.ts +0 -80
  103. package/src/constants.ts +0 -25
  104. package/src/lib/time-utils.ts +0 -64
  105. package/src/prompts/README.md +0 -224
  106. package/src/prompts/hook-prompt-renderer.ts +0 -159
  107. package/src/prompts/hook-prompts.config.ts +0 -306
  108. package/src/prompts/templates/context/ContextTemplates.ts +0 -491
  109. package/src/services/path-discovery.ts +0 -373
  110. package/src/services/sqlite/Database.ts +0 -179
  111. package/src/services/sqlite/DiagnosticsStore.ts +0 -229
  112. package/src/services/sqlite/MemoryStore.ts +0 -287
  113. package/src/services/sqlite/OverviewStore.ts +0 -241
  114. package/src/services/sqlite/SessionStore.ts +0 -195
  115. package/src/services/sqlite/StreamingSessionStore.ts +0 -266
  116. package/src/services/sqlite/TranscriptEventStore.ts +0 -107
  117. package/src/services/sqlite/index.ts +0 -46
  118. package/src/services/sqlite/migrations.ts +0 -212
  119. package/src/services/sqlite/types.ts +0 -184
  120. package/src/shared/config.ts +0 -51
  121. package/src/shared/logger.ts +0 -67
  122. package/src/shared/paths.ts +0 -91
  123. package/src/shared/rolling-log.ts +0 -42
  124. package/src/shared/rolling-settings.ts +0 -87
  125. package/src/shared/settings.ts +0 -98
  126. package/src/shared/storage.ts +0 -402
  127. package/src/shared/types.ts +0 -48
  128. package/src/utils/platform.ts +0 -112
package/README.md CHANGED
@@ -1,470 +1,316 @@
1
- <div align="center">
1
+ <p align="center">
2
+ Official $CMEM Links:
3
+ <a href="https://bags.fm/2TsmuYUrsctE57VLckZBYEEzdokUF8j8e1GavekWBAGS">Bags.fm</a> •
4
+ <a href="https://jup.ag/tokens/2TsmuYUrsctE57VLckZBYEEzdokUF8j8e1GavekWBAGS">Jupiter</a> •
5
+ <a href="https://photon-sol.tinyastro.io/en/lp/6MzFAkWnac6GSK1EdFX93dZeukGfzrFq4UHWarhGSQyd">Photon</a> •
6
+ <a href="https://dexscreener.com/solana/6mzfakwnac6gsk1edfx93dzeukgfzrfq4uhwarhgsqyd">DEXScreener</a>
7
+ </p>
2
8
 
3
- <img src="claude-mem-logo-lm.webp#gh-light-mode-only" alt="claude-mem logo" width="360" height="auto" />
4
- <img src="claude-mem-logo-dm.webp#gh-dark-mode-only" alt="claude-mem logo" width="360" height="auto" />
9
+ <p align="center">Official CA: 2TsmuYUrsctE57VLckZBYEEzdokUF8j8e1GavekWBAGS (on Solana)</p>
5
10
 
6
- <p>
7
- Memory compression and persistence system for Claude Code conversations
8
- </p>
11
+ <h1 align="center">
12
+ <br>
13
+ <a href="https://github.com/thedotmack/claude-mem">
14
+ <picture>
15
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/thedotmack/claude-mem/main/docs/public/claude-mem-logo-for-dark-mode.webp">
16
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/thedotmack/claude-mem/main/docs/public/claude-mem-logo-for-light-mode.webp">
17
+ <img src="https://raw.githubusercontent.com/thedotmack/claude-mem/main/docs/public/claude-mem-logo-for-light-mode.webp" alt="Claude-Mem" width="400">
18
+ </picture>
19
+ </a>
20
+ <br>
21
+ </h1>
22
+
23
+ <p align="center">
24
+ <a href="docs/i18n/README.zh.md">🇨🇳 中文</a> •
25
+ <a href="docs/i18n/README.ja.md">🇯🇵 日本語</a> •
26
+ <a href="docs/i18n/README.pt-br.md">🇧🇷 Português</a> •
27
+ <a href="docs/i18n/README.ko.md">🇰🇷 한국어</a> •
28
+ <a href="docs/i18n/README.es.md">🇪🇸 Español</a> •
29
+ <a href="docs/i18n/README.de.md">🇩🇪 Deutsch</a> •
30
+ <a href="docs/i18n/README.fr.md">🇫🇷 Français</a>
31
+ <a href="docs/i18n/README.he.md">🇮🇱 עברית</a> •
32
+ <a href="docs/i18n/README.ar.md">🇸🇦 العربية</a> •
33
+ <a href="docs/i18n/README.ru.md">🇷🇺 Русский</a> •
34
+ <a href="docs/i18n/README.pl.md">🇵🇱 Polski</a> •
35
+ <a href="docs/i18n/README.cs.md">🇨🇿 Čeština</a> •
36
+ <a href="docs/i18n/README.nl.md">🇳🇱 Nederlands</a> •
37
+ <a href="docs/i18n/README.tr.md">🇹🇷 Türkçe</a> •
38
+ <a href="docs/i18n/README.uk.md">🇺🇦 Українська</a> •
39
+ <a href="docs/i18n/README.vi.md">🇻🇳 Tiếng Việt</a> •
40
+ <a href="docs/i18n/README.id.md">🇮🇩 Indonesia</a> •
41
+ <a href="docs/i18n/README.th.md">🇹🇭 ไทย</a> •
42
+ <a href="docs/i18n/README.hi.md">🇮🇳 हिन्दी</a> •
43
+ <a href="docs/i18n/README.bn.md">🇧🇩 বাংলা</a> •
44
+ <a href="docs/i18n/README.ro.md">🇷🇴 Română</a> •
45
+ <a href="docs/i18n/README.sv.md">🇸🇪 Svenska</a> •
46
+ <a href="docs/i18n/README.it.md">🇮🇹 Italiano</a> •
47
+ <a href="docs/i18n/README.el.md">🇬🇷 Ελληνικά</a> •
48
+ <a href="docs/i18n/README.hu.md">🇭🇺 Magyar</a> •
49
+ <a href="docs/i18n/README.fi.md">🇫🇮 Suomi</a> •
50
+ <a href="docs/i18n/README.da.md">🇩🇰 Dansk</a> •
51
+ <a href="docs/i18n/README.no.md">🇳🇴 Norsk</a>
52
+ </p>
9
53
 
54
+ <h4 align="center">Persistent memory compression system built for <a href="https://claude.com/claude-code" target="_blank">Claude Code</a>.</h4>
10
55
 
11
- <!-- Badges -->
12
- <p>
13
- <a href="https://www.npmjs.com/package/claude-mem">
14
- <img src="https://img.shields.io/npm/v/claude-mem.svg" alt="npm version" />
15
- </a>
16
- <a href="https://github.com/thedotmack/claude-mem/graphs/contributors">
17
- <img src="https://img.shields.io/github/contributors/thedotmack/claude-mem" alt="contributors" />
18
- </a>
19
- <a href="">
20
- <img src="https://img.shields.io/github/last-commit/thedotmack/claude-mem" alt="last update" />
21
- </a>
22
- <a href="https://github.com/thedotmack/claude-mem/network/members">
23
- <img src="https://img.shields.io/github/forks/thedotmack/claude-mem" alt="forks" />
24
- </a>
25
- <a href="https://github.com/thedotmack/claude-mem/stargazers">
26
- <img src="https://img.shields.io/github/stars/thedotmack/claude-mem" alt="stars" />
27
- </a>
28
- <a href="https://github.com/thedotmack/claude-mem/issues/">
29
- <img src="https://img.shields.io/github/issues/thedotmack/claude-mem" alt="open issues" />
56
+ <p align="center">
57
+ <a href="LICENSE">
58
+ <img src="https://img.shields.io/badge/License-AGPL%203.0-blue.svg" alt="License">
30
59
  </a>
31
- <a href="https://github.com/thedotmack/claude-mem/blob/main/LICENSE">
32
- <img src="https://img.shields.io/badge/license-AGPL--3.0-blue.svg" alt="license" />
60
+ <a href="package.json">
61
+ <img src="https://img.shields.io/badge/version-6.5.0-green.svg" alt="Version">
33
62
  </a>
34
- <a href="https://nodejs.org/">
35
- <img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg" alt="node version" />
63
+ <a href="package.json">
64
+ <img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg" alt="Node">
36
65
  </a>
37
- <a href="https://modelcontextprotocol.io">
38
- <img src="https://img.shields.io/badge/MCP-compatible-purple.svg" alt="MCP compatible" />
39
- </a>
40
- <a href="https://claude.com/claude-code">
41
- <img src="https://img.shields.io/badge/Claude%20Code-enabled-orange.svg" alt="Claude Code enabled" />
66
+ <a href="https://github.com/thedotmack/awesome-claude-code">
67
+ <img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Claude Code">
42
68
  </a>
43
69
  </p>
44
70
 
45
- <h4>
46
- <a href="https://github.com/thedotmack/claude-mem">Documentation</a>
47
- <span> · </span>
48
- <a href="https://github.com/thedotmack/claude-mem/issues/">Report Bug</a>
49
- <span> · </span>
50
- <a href="https://github.com/thedotmack/claude-mem/issues/">Request Feature</a>
51
- </h4>
52
- </div>
53
-
54
- <br />
55
-
56
- <!-- Table of Contents -->
57
- # :notebook_with_decorative_cover: Table of Contents
58
-
59
- - [About the Project](#star2-about-the-project)
60
- * [Tech Stack](#space_invader-tech-stack)
61
- * [Features](#dart-features)
62
- - [Getting Started](#toolbox-getting-started)
63
- * [Prerequisites](#bangbang-prerequisites)
64
- * [Installation](#gear-installation)
65
- * [Running Tests](#test_tube-running-tests)
66
- - [Usage](#eyes-usage)
67
- * [Basic Commands](#basic-commands)
68
- * [Hook System](#hook-system)
69
- * [Memory Operations](#memory-operations)
70
- * [ChromaDB MCP Tools](#chromadb-mcp-tools)
71
- * [Advanced Usage](#advanced-usage)
72
- - [Architecture](#building_construction-architecture)
73
- - [Configuration](#wrench-configuration)
74
- - [Roadmap](#compass-roadmap)
75
- - [Contributing](#wave-contributing)
76
- - [License](#warning-license)
77
- - [Contact](#handshake-contact)
78
- - [Acknowledgements](#gem-acknowledgements)
79
-
80
-
81
-
82
- <!-- About the Project -->
83
- ## :star2: About the Project
84
-
85
- claude-mem automatically captures, compresses, and retrieves context across Claude Code sessions, enabling true long-term memory through semantic search and intelligent compression.
86
-
87
- Perfect for developers who want their AI assistant to remember project context, past decisions, and conversation history across sessions without manual context management.
88
-
89
- <!-- TechStack -->
90
- ### :space_invader: Tech Stack
91
-
92
- <details>
93
- <summary>Core Technologies</summary>
94
- <ul>
95
- <li><a href="https://www.typescriptlang.org/">TypeScript</a></li>
96
- <li><a href="https://nodejs.org/">Node.js</a></li>
97
- <li><a href="https://bun.sh/">Bun</a></li>
98
- </ul>
99
- </details>
100
-
101
- <details>
102
- <summary>Storage & Memory</summary>
103
- <ul>
104
- <li><a href="https://www.trychroma.com/">ChromaDB</a> - Vector database for semantic search</li>
105
- <li><a href="https://www.sqlite.org/">SQLite</a> - Metadata and session tracking</li>
106
- <li><a href="https://github.com/WiseLibs/better-sqlite3">better-sqlite3</a> - Fast SQLite bindings</li>
107
- </ul>
108
- </details>
109
-
110
- <details>
111
- <summary>AI & Integration</summary>
112
- <ul>
113
- <li><a href="https://github.com/anthropics/anthropic-sdk-typescript">Anthropic Agent SDK</a> - Async compression</li>
114
- <li><a href="https://modelcontextprotocol.io">Model Context Protocol (MCP)</a> - Tool integration</li>
115
- <li><a href="https://claude.com/claude-code">Claude Code</a> - Streaming hooks</li>
116
- </ul>
117
- </details>
118
-
119
- <!-- Features -->
120
- ### :dart: Features
121
-
122
- - :brain: **Automatic Memory Compression** - Real-time conversation capture and intelligent summarization
123
- - :mag: **Semantic Search** - ChromaDB-powered vector search for intelligent context retrieval
124
- - :package: **Project Isolation** - Memories segregated by project with multi-project support
125
- - :arrows_counterclockwise: **Session Persistence** - Context loads automatically at session start and `/clear` command
126
- - :dart: **MCP Integration** - 15+ ChromaDB tools via Model Context Protocol
127
- - :floppy_disk: **SQLite Storage** - Fast metadata and session tracking with embedded database
128
- - :wastebasket: **Smart Trash** - Safe file deletion with recovery capabilities
129
- - :zap: **Streaming Hooks** - Sub-50ms overhead for real-time event capture
130
- - :robot: **Agent SDK Compression** - Async transcript processing without blocking conversations
131
- - :bar_chart: **Session Overviews** - Automatic session summaries with temporal context
132
-
133
- <!-- Getting Started -->
134
- ## :toolbox: Getting Started
135
-
136
- <!-- Prerequisites -->
137
- ### :bangbang: Prerequisites
138
-
139
- This project requires Node.js and works best with Claude Code
140
-
141
- - Node.js >= 18.0.0
142
- - Claude Code with MCP support
143
- - macOS/Linux (POSIX-compliant system)
144
- - Bun >= 1.0.0 (optional, for development)
145
-
146
- <!-- Installation -->
147
- ### :gear: Installation
148
-
149
- Install claude-mem globally via npm
71
+ <p align="center">
72
+ <a href="https://trendshift.io/repositories/15496" target="_blank">
73
+ <picture>
74
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/thedotmack/claude-mem/main/docs/public/trendshift-badge-dark.svg">
75
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/thedotmack/claude-mem/main/docs/public/trendshift-badge.svg">
76
+ <img src="https://raw.githubusercontent.com/thedotmack/claude-mem/main/docs/public/trendshift-badge.svg" alt="thedotmack/claude-mem | Trendshift" width="250" height="55"/>
77
+ </picture>
78
+ </a>
79
+ </p>
150
80
 
151
- ```bash
152
- npm install -g claude-mem
153
- claude-mem install
154
- ```
81
+ <br>
155
82
 
156
- The interactive installer will guide you through three installation scopes:
83
+ <p align="center">
84
+ <a href="https://github.com/thedotmack/claude-mem">
85
+ <picture>
86
+ <img src="https://raw.githubusercontent.com/thedotmack/claude-mem/main/docs/public/cm-preview.gif" alt="Claude-Mem Preview" width="800">
87
+ </picture>
88
+ </a>
89
+ </p>
157
90
 
158
- - **User** - Install for current user (default, recommended)
159
- - **Project** - Install for current project only
160
- - **Local** - Install to custom directory
91
+ <p align="center">
92
+ <a href="#quick-start">Quick Start</a>
93
+ <a href="#how-it-works">How It Works</a>
94
+ <a href="#mcp-search-tools">Search Tools</a> •
95
+ <a href="#documentation">Documentation</a> •
96
+ <a href="#configuration">Configuration</a> •
97
+ <a href="#troubleshooting">Troubleshooting</a> •
98
+ <a href="#license">License</a>
99
+ </p>
161
100
 
162
- <!-- Running Tests -->
163
- ### :test_tube: Running Tests
101
+ <p align="center">
102
+ Claude-Mem seamlessly preserves context across sessions by automatically capturing tool usage observations, generating semantic summaries, and making them available to future sessions. This enables Claude to maintain continuity of knowledge about projects even after sessions end or reconnect.
103
+ </p>
164
104
 
165
- To run tests, use the following commands
105
+ ---
166
106
 
167
- ```bash
168
- # Run all tests
169
- bun test
107
+ ## Quick Start
170
108
 
171
- # Run integration tests
172
- npm run test:integration
109
+ Start a new Claude Code session in the terminal and enter the following commands:
173
110
 
174
- # Run with coverage
175
- npm run test:coverage
176
111
  ```
112
+ > /plugin marketplace add thedotmack/claude-mem
177
113
 
178
- <!-- Usage -->
179
- ## :eyes: Usage
180
-
181
- ### Basic Commands
182
-
183
- ```bash
184
- # Check installation status
185
- claude-mem status
186
-
187
- # View operation logs
188
- claude-mem logs
189
-
190
- # Load context for current project
191
- claude-mem load-context --project my-project
192
-
193
- # View compressed memories (interactive)
194
- claude-mem restore
195
-
196
- # Manage trash bin
197
- claude-mem trash view
198
- claude-mem restore
199
- claude-mem trash empty
114
+ > /plugin install claude-mem
200
115
  ```
201
116
 
202
- ### Hook System
117
+ Restart Claude Code. Context from previous sessions will automatically appear in new sessions.
203
118
 
204
- claude-mem integrates with Claude Code via streaming hooks that capture conversation events:
119
+ **Key Features:**
205
120
 
206
- - **user-prompt-submit** - Captures user prompts in real-time
207
- - **post-tool-use** - Spawns Agent SDK for async compression
208
- - **stop-streaming** - Generates session overview and cleanup
209
- - **session-start** - Loads relevant context automatically
121
+ - 🧠 **Persistent Memory** - Context survives across sessions
122
+ - 📊 **Progressive Disclosure** - Layered memory retrieval with token cost visibility
123
+ - 🔍 **Skill-Based Search** - Query your project history with mem-search skill
124
+ - 🖥️ **Web Viewer UI** - Real-time memory stream at http://localhost:37777
125
+ - 💻 **Claude Desktop Skill** - Search memory from Claude Desktop conversations
126
+ - 🔒 **Privacy Control** - Use `<private>` tags to exclude sensitive content from storage
127
+ - ⚙️ **Context Configuration** - Fine-grained control over what context gets injected
128
+ - 🤖 **Automatic Operation** - No manual intervention required
129
+ - 🔗 **Citations** - Reference past observations with IDs (access via http://localhost:37777/api/observation/{id} or view all in the web viewer at http://localhost:37777)
130
+ - 🧪 **Beta Channel** - Try experimental features like Endless Mode via version switching
210
131
 
211
- Hooks are configured during installation with a 180-second timeout and run transparently in the background.
132
+ ---
212
133
 
213
- ### Memory Operations
134
+ ## Documentation
214
135
 
215
- #### Manual Compression
136
+ 📚 **[View Full Documentation](docs/)** - Browse markdown docs on GitHub
216
137
 
217
- ```bash
218
- claude-mem compress
219
- ```
138
+ ### Getting Started
220
139
 
221
- Compress Claude Code transcripts into searchable memories with semantic embeddings.
140
+ - **[Installation Guide](https://docs.claude-mem.ai/installation)** - Quick start & advanced installation
141
+ - **[Usage Guide](https://docs.claude-mem.ai/usage/getting-started)** - How Claude-Mem works automatically
142
+ - **[Search Tools](https://docs.claude-mem.ai/usage/search-tools)** - Query your project history with natural language
143
+ - **[Beta Features](https://docs.claude-mem.ai/beta-features)** - Try experimental features like Endless Mode
222
144
 
223
- #### Context Loading
145
+ ### Best Practices
224
146
 
225
- ```bash
226
- # Load last 10 memories for current project
227
- claude-mem load-context
147
+ - **[Context Engineering](https://docs.claude-mem.ai/context-engineering)** - AI agent context optimization principles
148
+ - **[Progressive Disclosure](https://docs.claude-mem.ai/progressive-disclosure)** - Philosophy behind Claude-Mem's context priming strategy
228
149
 
229
- # Load specific number of memories
230
- claude-mem load-context --count 20
150
+ ### Architecture
231
151
 
232
- # Filter by project
233
- claude-mem load-context --project my-app
152
+ - **[Overview](https://docs.claude-mem.ai/architecture/overview)** - System components & data flow
153
+ - **[Architecture Evolution](https://docs.claude-mem.ai/architecture-evolution)** - The journey from v3 to v5
154
+ - **[Hooks Architecture](https://docs.claude-mem.ai/hooks-architecture)** - How Claude-Mem uses lifecycle hooks
155
+ - **[Hooks Reference](https://docs.claude-mem.ai/architecture/hooks)** - 7 hook scripts explained
156
+ - **[Worker Service](https://docs.claude-mem.ai/architecture/worker-service)** - HTTP API & Bun management
157
+ - **[Database](https://docs.claude-mem.ai/architecture/database)** - SQLite schema & FTS5 search
158
+ - **[Search Architecture](https://docs.claude-mem.ai/architecture/search-architecture)** - Hybrid search with Chroma vector database
234
159
 
235
- # Output raw JSON
236
- claude-mem load-context --raw
237
- ```
160
+ ### Configuration & Development
238
161
 
239
- #### Trash Management
162
+ - **[Configuration](https://docs.claude-mem.ai/configuration)** - Environment variables & settings
163
+ - **[Development](https://docs.claude-mem.ai/development)** - Building, testing, contributing
164
+ - **[Troubleshooting](https://docs.claude-mem.ai/troubleshooting)** - Common issues & solutions
240
165
 
241
- claude-mem includes Smart Trash for safe file operations:
166
+ ---
242
167
 
243
- ```bash
244
- # Move files to trash
245
- claude-mem trash file.txt
246
- claude-mem trash -r directory/
168
+ ## How It Works
247
169
 
248
- # View trash contents
249
- claude-mem trash view
170
+ **Core Components:**
250
171
 
251
- # Restore files interactively
252
- claude-mem restore
172
+ 1. **5 Lifecycle Hooks** - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6 hook scripts)
173
+ 2. **Smart Install** - Cached dependency checker (pre-hook script, not a lifecycle hook)
174
+ 3. **Worker Service** - HTTP API on port 37777 with web viewer UI and 10 search endpoints, managed by Bun
175
+ 4. **SQLite Database** - Stores sessions, observations, summaries
176
+ 5. **mem-search Skill** - Natural language queries with progressive disclosure
177
+ 6. **Chroma Vector Database** - Hybrid semantic + keyword search for intelligent context retrieval
253
178
 
254
- # Empty trash permanently
255
- claude-mem trash empty
256
- ```
179
+ See [Architecture Overview](https://docs.claude-mem.ai/architecture/overview) for details.
257
180
 
258
- ### ChromaDB MCP Tools
181
+ ---
259
182
 
260
- claude-mem exposes 15+ ChromaDB operations via MCP:
183
+ ## MCP Search Tools
261
184
 
262
- ```bash
263
- # List collections
264
- claude-mem chroma-list-collections
265
-
266
- # Create collection
267
- claude-mem chroma-create-collection --collection-name memories
268
-
269
- # Query documents semantically
270
- claude-mem chroma-query-documents \
271
- --collection-name memories \
272
- --query-texts '["authentication implementation"]' \
273
- --n-results 5
274
-
275
- # Add documents
276
- claude-mem chroma-add-documents \
277
- --collection-name memories \
278
- --documents '["content here"]' \
279
- --ids '["mem-001"]'
280
-
281
- # Get documents by ID
282
- claude-mem chroma-get-documents \
283
- --collection-name memories \
284
- --ids '["mem-001"]'
285
-
286
- # Update documents
287
- claude-mem chroma-update-documents \
288
- --collection-name memories \
289
- --ids '["mem-001"]' \
290
- --documents '["updated content"]'
291
-
292
- # Delete documents
293
- claude-mem chroma-delete-documents \
294
- --collection-name memories \
295
- --ids '["mem-001"]'
296
- ```
185
+ Claude-Mem provides intelligent memory search through **4 MCP tools** following a token-efficient **3-layer workflow pattern**:
297
186
 
298
- See all available Chroma MCP commands with `claude-mem --help`.
187
+ **The 3-Layer Workflow:**
299
188
 
300
- ### Advanced Usage
189
+ 1. **`search`** - Get compact index with IDs (~50-100 tokens/result)
190
+ 2. **`timeline`** - Get chronological context around interesting results
191
+ 3. **`get_observations`** - Fetch full details ONLY for filtered IDs (~500-1,000 tokens/result)
301
192
 
302
- #### Session Title Generation
193
+ **How It Works:**
194
+ - Claude uses MCP tools to search your memory
195
+ - Start with `search` to get an index of results
196
+ - Use `timeline` to see what was happening around specific observations
197
+ - Use `get_observations` to fetch full details for relevant IDs
198
+ - **~10x token savings** by filtering before fetching details
303
199
 
304
- ```bash
305
- # Generate title and subtitle from prompt
306
- claude-mem generate-title "implemented authentication with OAuth"
200
+ **Available MCP Tools:**
307
201
 
308
- # Output as JSON
309
- claude-mem generate-title "fixed bug in checkout" --json
202
+ 1. **`search`** - Search memory index with full-text queries, filters by type/date/project
203
+ 2. **`timeline`** - Get chronological context around a specific observation or query
204
+ 3. **`get_observations`** - Fetch full observation details by IDs (always batch multiple IDs)
205
+ 4. **`__IMPORTANT`** - Workflow documentation (always visible to Claude)
310
206
 
311
- # Save to database
312
- claude-mem generate-title "added feature" --session-id abc123 --save
313
- ```
207
+ **Example Usage:**
314
208
 
315
- #### Diagnostics
209
+ ```typescript
210
+ // Step 1: Search for index
211
+ search(query="authentication bug", type="bugfix", limit=10)
316
212
 
317
- ```bash
318
- # Run environment diagnostics
319
- claude-mem doctor
213
+ // Step 2: Review index, identify relevant IDs (e.g., #123, #456)
320
214
 
321
- # Output as JSON
322
- claude-mem doctor --json
215
+ // Step 3: Fetch full details
216
+ get_observations(ids=[123, 456])
323
217
  ```
324
218
 
325
- #### Changelog Generation
219
+ See [Search Tools Guide](https://docs.claude-mem.ai/usage/search-tools) for detailed examples.
326
220
 
327
- ```bash
328
- # Generate changelog from memories
329
- claude-mem changelog
330
-
331
- # Preview without saving
332
- claude-mem changelog --preview
333
-
334
- # Generate for specific version
335
- claude-mem changelog --generate 3.9.0
221
+ ---
336
222
 
337
- # Search historical versions
338
- claude-mem changelog --historical 5
339
- ```
223
+ ## Beta Features
340
224
 
341
- ## :building_construction: Architecture
225
+ Claude-Mem offers a **beta channel** with experimental features like **Endless Mode** (biomimetic memory architecture for extended sessions). Switch between stable and beta versions from the web viewer UI at http://localhost:37777 → Settings.
342
226
 
343
- ### Storage Structure
227
+ See **[Beta Features Documentation](https://docs.claude-mem.ai/beta-features)** for details on Endless Mode and how to try it.
344
228
 
345
- ```
346
- ~/.claude-mem/
347
- ├── archives/ # Compressed transcript backups
348
- ├── chroma/ # ChromaDB vector database
349
- ├── trash/ # Smart Trash with recovery
350
- ├── hooks/ # Hook configurations
351
- ├── logs/ # Operation logs
352
- └── claude-mem.db # SQLite metadata database
353
- ```
229
+ ---
354
230
 
355
- ### Memory System
231
+ ## System Requirements
356
232
 
357
- **Rolling Memory** - Real-time conversation turn capture via hooks with immediate ChromaDB storage
233
+ - **Node.js**: 18.0.0 or higher
234
+ - **Claude Code**: Latest version with plugin support
235
+ - **Bun**: JavaScript runtime and process manager (auto-installed if missing)
236
+ - **uv**: Python package manager for vector search (auto-installed if missing)
237
+ - **SQLite 3**: For persistent storage (bundled)
358
238
 
359
- **TranscriptCompressor** - Intelligent chunking and compression of large conversations
239
+ ---
360
240
 
361
- **MCP Server** - 15+ ChromaDB tools for memory operations and semantic search
241
+ ## Configuration
362
242
 
363
- **SQLite Backend** - Session tracking, metadata management, and diagnostics storage
243
+ Settings are managed in `~/.claude-mem/settings.json` (auto-created with defaults on first run). Configure AI model, worker port, data directory, log level, and context injection settings.
364
244
 
365
- ### Hook Integration
245
+ See the **[Configuration Guide](https://docs.claude-mem.ai/configuration)** for all available settings and examples.
366
246
 
367
- Hooks communicate via JSON stdin/stdout and run with minimal overhead:
247
+ ---
368
248
 
369
- 1. **user-prompt-submit** - Stores user prompt immediately in ChromaDB
370
- 2. **post-tool-use** - Spawns Agent SDK subprocess for async compression
371
- 3. **stop-streaming** - Generates session overview, deletes SDK transcript
372
- 4. **session-start** - Loads project-specific context invisibly
249
+ ## Development
373
250
 
374
- ### Project Structure
251
+ See the **[Development Guide](https://docs.claude-mem.ai/development)** for build instructions, testing, and contribution workflow.
375
252
 
376
- ```
377
- src/
378
- ├── bin/ # CLI entry point
379
- ├── commands/ # Command implementations
380
- ├── core/ # Core compression logic
381
- ├── services/ # SQLite, ChromaDB, path discovery
382
- ├── shared/ # Configuration and utilities
383
- └── mcp-server.ts # MCP server implementation
384
-
385
- hook-templates/ # Hook source files
386
- dist/ # Minified production bundle
387
- test/ # Unit and integration tests
388
- ```
253
+ ---
389
254
 
390
- ## :wrench: Configuration
255
+ ## Troubleshooting
391
256
 
392
- ### Hook Timeout
257
+ If experiencing issues, describe the problem to Claude and the troubleshoot skill will automatically diagnose and provide fixes.
393
258
 
394
- Default hook timeout is 180 seconds. Configure during installation:
259
+ See the **[Troubleshooting Guide](https://docs.claude-mem.ai/troubleshooting)** for common issues and solutions.
395
260
 
396
- ```bash
397
- claude-mem install --timeout 300000 # 5 minutes
398
- ```
261
+ ---
399
262
 
400
- ### MCP Server
263
+ ## Bug Reports
401
264
 
402
- Skip MCP server installation if needed:
265
+ Create comprehensive bug reports with the automated generator:
403
266
 
404
267
  ```bash
405
- claude-mem install --skip-mcp
268
+ cd ~/.claude/plugins/marketplaces/thedotmack
269
+ npm run bug-report
406
270
  ```
407
271
 
408
- ### Force Reinstall
272
+ ## Contributing
409
273
 
410
- ```bash
411
- claude-mem install --force
412
- ```
274
+ Contributions are welcome! Please:
413
275
 
414
- <!-- Roadmap -->
415
- ## :compass: Roadmap
416
-
417
- * [x] Real-time conversation capture with streaming hooks
418
- * [x] ChromaDB vector storage for semantic search
419
- * [x] SQLite metadata and session tracking
420
- * [x] MCP server with 15+ ChromaDB tools
421
- * [x] Smart Trash for safe file deletion
422
- * [x] Automatic session overviews
423
- * [ ] Web UI for memory visualization
424
- * [ ] Cross-platform Windows support
425
- * [ ] Memory analytics and insights
276
+ 1. Fork the repository
277
+ 2. Create a feature branch
278
+ 3. Make your changes with tests
279
+ 4. Update documentation
280
+ 5. Submit a Pull Request
426
281
 
427
- <!-- Contributing -->
428
- ## :wave: Contributing
282
+ See [Development Guide](https://docs.claude-mem.ai/development) for contribution workflow.
429
283
 
430
- <a href="https://github.com/thedotmack/claude-mem/graphs/contributors">
431
- <img src="https://contrib.rocks/image?repo=thedotmack/claude-mem" />
432
- </a>
284
+ ---
433
285
 
434
- Contributions are always welcome!
286
+ ## License
435
287
 
436
- 1. Fork the repository
437
- 2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
438
- 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
439
- 4. Push to the branch (`git push origin feature/AmazingFeature`)
440
- 5. Open a Pull Request
288
+ This project is licensed under the **GNU Affero General Public License v3.0** (AGPL-3.0).
441
289
 
442
- <!-- License -->
443
- ## :warning: License
290
+ Copyright (C) 2025 Alex Newman (@thedotmack). All rights reserved.
444
291
 
445
- Distributed under the AGPL-3.0 License. See [LICENSE](LICENSE) for more information.
292
+ See the [LICENSE](LICENSE) file for full details.
446
293
 
447
- <!-- Contact -->
448
- ## :handshake: Contact
294
+ **What This Means:**
449
295
 
450
- Alex Newman - [@thedotmack](https://github.com/thedotmack)
296
+ - You can use, modify, and distribute this software freely
297
+ - If you modify and deploy on a network server, you must make your source code available
298
+ - Derivative works must also be licensed under AGPL-3.0
299
+ - There is NO WARRANTY for this software
451
300
 
452
- Project Link: [https://github.com/thedotmack/claude-mem](https://github.com/thedotmack/claude-mem)
301
+ **Note on Ragtime**: The `ragtime/` directory is licensed separately under the **PolyForm Noncommercial License 1.0.0**. See [ragtime/LICENSE](ragtime/LICENSE) for details.
453
302
 
454
- NPM Package: [https://www.npmjs.com/package/claude-mem](https://www.npmjs.com/package/claude-mem)
303
+ ---
455
304
 
456
- <!-- Acknowledgments -->
457
- ## :gem: Acknowledgements
305
+ ## Support
458
306
 
459
- - [ChromaDB](https://www.trychroma.com/) - Vector database for AI applications
460
- - [Anthropic](https://www.anthropic.com/) - Claude AI and Agent SDK
461
- - [Model Context Protocol](https://modelcontextprotocol.io) - Standardized AI tool integration
462
- - [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) - Fast SQLite bindings
463
- - [Shields.io](https://shields.io/) - Beautiful README badges
464
- - [Awesome README Template](https://github.com/Louis3797/awesome-readme-template) - Template inspiration
307
+ - **Documentation**: [docs/](docs/)
308
+ - **Issues**: [GitHub Issues](https://github.com/thedotmack/claude-mem/issues)
309
+ - **Repository**: [github.com/thedotmack/claude-mem](https://github.com/thedotmack/claude-mem)
310
+ - **Official X Account**: [@Claude_Memory](https://x.com/Claude_Memory)
311
+ - **Official Discord**: [Join Discord](https://discord.com/invite/J4wttp9vDu)
312
+ - **Author**: Alex Newman ([@thedotmack](https://github.com/thedotmack))
465
313
 
466
314
  ---
467
315
 
468
- **Philosophy**: claude-mem follows the **Make It Work First** approach - direct execution over defensive validation, natural failures instead of artificial guards, and memory as a living, evolving system. Context improves with use through semantic search, project isolation, and temporal relevance.
469
-
470
- **Built with TypeScript, ChromaDB, SQLite, and the Anthropic Agent SDK**
316
+ **Built with Claude Agent SDK** | **Powered by Claude Code** | **Made with TypeScript**