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.
- package/README.md +220 -374
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/sdk/index.d.ts +109 -0
- package/dist/sdk/index.js +183 -0
- package/package.json +79 -29
- package/plugin/.claude-plugin/CLAUDE.md +23 -0
- package/plugin/.claude-plugin/plugin.json +17 -0
- package/plugin/.mcp.json +8 -0
- package/plugin/CLAUDE.md +11 -0
- package/plugin/commands/CLAUDE.md +18 -0
- package/plugin/commands/do.md +43 -0
- package/plugin/commands/make-plan.md +66 -0
- package/plugin/hooks/CLAUDE.md +37 -0
- package/plugin/hooks/bugfixes-2026-01-10.md +92 -0
- package/plugin/hooks/hooks.json +81 -0
- package/plugin/modes/CLAUDE.md +7 -0
- package/plugin/modes/code--ar.json +24 -0
- package/plugin/modes/code--bn.json +24 -0
- package/plugin/modes/code--chill.json +8 -0
- package/plugin/modes/code--cs.json +24 -0
- package/plugin/modes/code--da.json +24 -0
- package/plugin/modes/code--de.json +24 -0
- package/plugin/modes/code--el.json +24 -0
- package/plugin/modes/code--es.json +24 -0
- package/plugin/modes/code--fi.json +24 -0
- package/plugin/modes/code--fr.json +24 -0
- package/plugin/modes/code--he.json +24 -0
- package/plugin/modes/code--hi.json +24 -0
- package/plugin/modes/code--hu.json +24 -0
- package/plugin/modes/code--id.json +24 -0
- package/plugin/modes/code--it.json +24 -0
- package/plugin/modes/code--ja.json +24 -0
- package/plugin/modes/code--ko.json +24 -0
- package/plugin/modes/code--nl.json +24 -0
- package/plugin/modes/code--no.json +24 -0
- package/plugin/modes/code--pl.json +24 -0
- package/plugin/modes/code--pt-br.json +24 -0
- package/plugin/modes/code--ro.json +24 -0
- package/plugin/modes/code--ru.json +24 -0
- package/plugin/modes/code--sv.json +24 -0
- package/plugin/modes/code--th.json +24 -0
- package/plugin/modes/code--tr.json +24 -0
- package/plugin/modes/code--uk.json +24 -0
- package/plugin/modes/code--vi.json +24 -0
- package/plugin/modes/code--zh.json +24 -0
- package/plugin/modes/code.json +125 -0
- package/plugin/modes/email-investigation.json +120 -0
- package/plugin/package.json +12 -0
- package/plugin/scripts/CLAUDE.md +125 -0
- package/plugin/scripts/context-generator.cjs +544 -0
- package/plugin/scripts/mcp-server.cjs +77 -0
- package/plugin/scripts/smart-install.js +438 -0
- package/plugin/scripts/worker-cli.js +19 -0
- package/plugin/scripts/worker-service.cjs +1599 -0
- package/plugin/scripts/worker-wrapper.cjs +2 -0
- package/plugin/skills/mem-search/CLAUDE.md +17 -0
- package/plugin/ui/CLAUDE.md +62 -0
- package/plugin/ui/assets/fonts/CLAUDE.md +99 -0
- package/plugin/ui/assets/fonts/monaspace-radon-var.woff +0 -0
- package/plugin/ui/assets/fonts/monaspace-radon-var.woff2 +0 -0
- package/{claude-mem-logo-dm.webp → plugin/ui/claude-mem-logo-for-dark-mode.webp} +0 -0
- package/plugin/ui/claude-mem-logomark.webp +0 -0
- package/plugin/ui/icon-thick-completed.svg +8 -0
- package/plugin/ui/icon-thick-investigated.svg +8 -0
- package/plugin/ui/icon-thick-learned.svg +12 -0
- package/plugin/ui/icon-thick-next-steps.svg +8 -0
- package/plugin/ui/viewer-bundle.js +48 -0
- package/plugin/ui/viewer.html +2876 -0
- package/CHANGELOG.md +0 -119
- package/README_WINDOWS.md +0 -265
- package/claude-mem-logo-lm.webp +0 -0
- package/commands/claude-mem.md +0 -23
- package/commands/remember.md +0 -1
- package/commands/save.md +0 -7
- package/dist/claude-mem.min.js +0 -662
- package/hook-templates/post-tool-use.js +0 -150
- package/hook-templates/session-start.js +0 -57
- package/hook-templates/shared/config-loader.js +0 -26
- package/hook-templates/shared/hook-helpers.js +0 -430
- package/hook-templates/shared/hook-prompt-renderer.js +0 -278
- package/hook-templates/shared/hook-prompts.config.js +0 -217
- package/hook-templates/shared/path-resolver.js +0 -108
- package/hook-templates/stop.js +0 -134
- package/hook-templates/user-prompt-submit.js +0 -157
- package/src/bin/cli.ts +0 -275
- package/src/commands/changelog.ts +0 -744
- package/src/commands/chroma-mcp.ts +0 -196
- package/src/commands/doctor.ts +0 -100
- package/src/commands/generate-title.ts +0 -181
- package/src/commands/install.ts +0 -604
- package/src/commands/load-context.ts +0 -461
- package/src/commands/logs.ts +0 -84
- package/src/commands/restore.ts +0 -24
- package/src/commands/status.ts +0 -213
- package/src/commands/store-memory.ts +0 -154
- package/src/commands/store-overview.ts +0 -45
- package/src/commands/trash-empty.ts +0 -66
- package/src/commands/trash-view.ts +0 -124
- package/src/commands/trash.ts +0 -60
- package/src/commands/uninstall.ts +0 -198
- package/src/commands/update-session-metadata.ts +0 -80
- package/src/constants.ts +0 -25
- package/src/lib/time-utils.ts +0 -64
- package/src/prompts/README.md +0 -224
- package/src/prompts/hook-prompt-renderer.ts +0 -159
- package/src/prompts/hook-prompts.config.ts +0 -306
- package/src/prompts/templates/context/ContextTemplates.ts +0 -491
- package/src/services/path-discovery.ts +0 -373
- package/src/services/sqlite/Database.ts +0 -179
- package/src/services/sqlite/DiagnosticsStore.ts +0 -229
- package/src/services/sqlite/MemoryStore.ts +0 -287
- package/src/services/sqlite/OverviewStore.ts +0 -241
- package/src/services/sqlite/SessionStore.ts +0 -195
- package/src/services/sqlite/StreamingSessionStore.ts +0 -266
- package/src/services/sqlite/TranscriptEventStore.ts +0 -107
- package/src/services/sqlite/index.ts +0 -46
- package/src/services/sqlite/migrations.ts +0 -212
- package/src/services/sqlite/types.ts +0 -184
- package/src/shared/config.ts +0 -51
- package/src/shared/logger.ts +0 -67
- package/src/shared/paths.ts +0 -91
- package/src/shared/rolling-log.ts +0 -42
- package/src/shared/rolling-settings.ts +0 -87
- package/src/shared/settings.ts +0 -98
- package/src/shared/storage.ts +0 -402
- package/src/shared/types.ts +0 -48
- package/src/utils/platform.ts +0 -112
package/README.md
CHANGED
|
@@ -1,470 +1,316 @@
|
|
|
1
|
-
<
|
|
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
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
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="
|
|
32
|
-
<img src="https://img.shields.io/badge/
|
|
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="
|
|
35
|
-
<img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg" alt="
|
|
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://
|
|
38
|
-
<img src="https://
|
|
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
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</
|
|
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
|
-
|
|
152
|
-
npm install -g claude-mem
|
|
153
|
-
claude-mem install
|
|
154
|
-
```
|
|
81
|
+
<br>
|
|
155
82
|
|
|
156
|
-
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
163
|
-
|
|
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
|
-
|
|
105
|
+
---
|
|
166
106
|
|
|
167
|
-
|
|
168
|
-
# Run all tests
|
|
169
|
-
bun test
|
|
107
|
+
## Quick Start
|
|
170
108
|
|
|
171
|
-
|
|
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
|
-
|
|
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
|
-
|
|
117
|
+
Restart Claude Code. Context from previous sessions will automatically appear in new sessions.
|
|
203
118
|
|
|
204
|
-
|
|
119
|
+
**Key Features:**
|
|
205
120
|
|
|
206
|
-
- **
|
|
207
|
-
- **
|
|
208
|
-
- **
|
|
209
|
-
- **
|
|
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
|
-
|
|
132
|
+
---
|
|
212
133
|
|
|
213
|
-
|
|
134
|
+
## Documentation
|
|
214
135
|
|
|
215
|
-
|
|
136
|
+
📚 **[View Full Documentation](docs/)** - Browse markdown docs on GitHub
|
|
216
137
|
|
|
217
|
-
|
|
218
|
-
claude-mem compress
|
|
219
|
-
```
|
|
138
|
+
### Getting Started
|
|
220
139
|
|
|
221
|
-
|
|
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
|
-
|
|
145
|
+
### Best Practices
|
|
224
146
|
|
|
225
|
-
|
|
226
|
-
|
|
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
|
-
|
|
230
|
-
claude-mem load-context --count 20
|
|
150
|
+
### Architecture
|
|
231
151
|
|
|
232
|
-
|
|
233
|
-
claude-mem
|
|
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
|
-
|
|
236
|
-
claude-mem load-context --raw
|
|
237
|
-
```
|
|
160
|
+
### Configuration & Development
|
|
238
161
|
|
|
239
|
-
|
|
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
|
-
|
|
166
|
+
---
|
|
242
167
|
|
|
243
|
-
|
|
244
|
-
# Move files to trash
|
|
245
|
-
claude-mem trash file.txt
|
|
246
|
-
claude-mem trash -r directory/
|
|
168
|
+
## How It Works
|
|
247
169
|
|
|
248
|
-
|
|
249
|
-
claude-mem trash view
|
|
170
|
+
**Core Components:**
|
|
250
171
|
|
|
251
|
-
|
|
252
|
-
|
|
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
|
-
|
|
255
|
-
claude-mem trash empty
|
|
256
|
-
```
|
|
179
|
+
See [Architecture Overview](https://docs.claude-mem.ai/architecture/overview) for details.
|
|
257
180
|
|
|
258
|
-
|
|
181
|
+
---
|
|
259
182
|
|
|
260
|
-
|
|
183
|
+
## MCP Search Tools
|
|
261
184
|
|
|
262
|
-
|
|
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
|
-
|
|
187
|
+
**The 3-Layer Workflow:**
|
|
299
188
|
|
|
300
|
-
|
|
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
|
-
|
|
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
|
-
|
|
305
|
-
# Generate title and subtitle from prompt
|
|
306
|
-
claude-mem generate-title "implemented authentication with OAuth"
|
|
200
|
+
**Available MCP Tools:**
|
|
307
201
|
|
|
308
|
-
|
|
309
|
-
|
|
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
|
-
|
|
312
|
-
claude-mem generate-title "added feature" --session-id abc123 --save
|
|
313
|
-
```
|
|
207
|
+
**Example Usage:**
|
|
314
208
|
|
|
315
|
-
|
|
209
|
+
```typescript
|
|
210
|
+
// Step 1: Search for index
|
|
211
|
+
search(query="authentication bug", type="bugfix", limit=10)
|
|
316
212
|
|
|
317
|
-
|
|
318
|
-
# Run environment diagnostics
|
|
319
|
-
claude-mem doctor
|
|
213
|
+
// Step 2: Review index, identify relevant IDs (e.g., #123, #456)
|
|
320
214
|
|
|
321
|
-
|
|
322
|
-
|
|
215
|
+
// Step 3: Fetch full details
|
|
216
|
+
get_observations(ids=[123, 456])
|
|
323
217
|
```
|
|
324
218
|
|
|
325
|
-
|
|
219
|
+
See [Search Tools Guide](https://docs.claude-mem.ai/usage/search-tools) for detailed examples.
|
|
326
220
|
|
|
327
|
-
|
|
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
|
-
|
|
338
|
-
claude-mem changelog --historical 5
|
|
339
|
-
```
|
|
223
|
+
## Beta Features
|
|
340
224
|
|
|
341
|
-
|
|
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
|
-
|
|
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
|
-
|
|
231
|
+
## System Requirements
|
|
356
232
|
|
|
357
|
-
|
|
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
|
-
|
|
239
|
+
---
|
|
360
240
|
|
|
361
|
-
|
|
241
|
+
## Configuration
|
|
362
242
|
|
|
363
|
-
|
|
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
|
-
|
|
245
|
+
See the **[Configuration Guide](https://docs.claude-mem.ai/configuration)** for all available settings and examples.
|
|
366
246
|
|
|
367
|
-
|
|
247
|
+
---
|
|
368
248
|
|
|
369
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
255
|
+
## Troubleshooting
|
|
391
256
|
|
|
392
|
-
|
|
257
|
+
If experiencing issues, describe the problem to Claude and the troubleshoot skill will automatically diagnose and provide fixes.
|
|
393
258
|
|
|
394
|
-
|
|
259
|
+
See the **[Troubleshooting Guide](https://docs.claude-mem.ai/troubleshooting)** for common issues and solutions.
|
|
395
260
|
|
|
396
|
-
|
|
397
|
-
claude-mem install --timeout 300000 # 5 minutes
|
|
398
|
-
```
|
|
261
|
+
---
|
|
399
262
|
|
|
400
|
-
|
|
263
|
+
## Bug Reports
|
|
401
264
|
|
|
402
|
-
|
|
265
|
+
Create comprehensive bug reports with the automated generator:
|
|
403
266
|
|
|
404
267
|
```bash
|
|
405
|
-
claude
|
|
268
|
+
cd ~/.claude/plugins/marketplaces/thedotmack
|
|
269
|
+
npm run bug-report
|
|
406
270
|
```
|
|
407
271
|
|
|
408
|
-
|
|
272
|
+
## Contributing
|
|
409
273
|
|
|
410
|
-
|
|
411
|
-
claude-mem install --force
|
|
412
|
-
```
|
|
274
|
+
Contributions are welcome! Please:
|
|
413
275
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
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
|
-
|
|
428
|
-
## :wave: Contributing
|
|
282
|
+
See [Development Guide](https://docs.claude-mem.ai/development) for contribution workflow.
|
|
429
283
|
|
|
430
|
-
|
|
431
|
-
<img src="https://contrib.rocks/image?repo=thedotmack/claude-mem" />
|
|
432
|
-
</a>
|
|
284
|
+
---
|
|
433
285
|
|
|
434
|
-
|
|
286
|
+
## License
|
|
435
287
|
|
|
436
|
-
|
|
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
|
-
|
|
443
|
-
## :warning: License
|
|
290
|
+
Copyright (C) 2025 Alex Newman (@thedotmack). All rights reserved.
|
|
444
291
|
|
|
445
|
-
|
|
292
|
+
See the [LICENSE](LICENSE) file for full details.
|
|
446
293
|
|
|
447
|
-
|
|
448
|
-
## :handshake: Contact
|
|
294
|
+
**What This Means:**
|
|
449
295
|
|
|
450
|
-
|
|
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
|
-
|
|
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
|
-
|
|
303
|
+
---
|
|
455
304
|
|
|
456
|
-
|
|
457
|
-
## :gem: Acknowledgements
|
|
305
|
+
## Support
|
|
458
306
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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
|
-
**
|
|
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**
|