chat-recall 0.5.6 → 0.5.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 +332 -0
- package/dist/cli.js +7013 -4542
- package/dist/cli.js.map +1 -1
- package/dist/code-index-cursor.d.ts +18 -0
- package/dist/code-index-cursor.d.ts.map +1 -0
- package/dist/code-index-cursor.js +89 -0
- package/dist/code-index-cursor.js.map +1 -0
- package/dist/daemon-log.d.ts +44 -0
- package/dist/daemon-log.d.ts.map +1 -0
- package/dist/daemon-log.js +74 -0
- package/dist/daemon-log.js.map +1 -0
- package/dist/derived.d.ts +20 -0
- package/dist/derived.d.ts.map +1 -0
- package/dist/derived.js +106 -0
- package/dist/derived.js.map +1 -0
- package/dist/install-skills.d.ts.map +1 -1
- package/dist/install-skills.js +6 -1
- package/dist/install-skills.js.map +1 -1
- package/dist/log-rotate.d.ts +16 -0
- package/dist/log-rotate.d.ts.map +1 -0
- package/dist/log-rotate.js +50 -0
- package/dist/log-rotate.js.map +1 -0
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +5830 -3788
- package/dist/mcp.js.map +1 -1
- package/dist/project-tasks.js +1 -1
- package/dist/project-tasks.js.map +1 -1
- package/dist/redact-deep.d.ts +4 -0
- package/dist/redact-deep.d.ts.map +1 -0
- package/dist/redact-deep.js +26 -0
- package/dist/redact-deep.js.map +1 -0
- package/dist/scan-pool.d.ts +56 -0
- package/dist/scan-pool.d.ts.map +1 -0
- package/dist/scan-pool.js +245 -0
- package/dist/scan-pool.js.map +1 -0
- package/dist/scan-worker.d.ts +78 -0
- package/dist/scan-worker.d.ts.map +1 -0
- package/dist/scan-worker.js +11175 -0
- package/dist/scan-worker.js.map +1 -0
- package/dist/self-restart.d.ts +20 -2
- package/dist/self-restart.d.ts.map +1 -1
- package/dist/self-restart.js +16 -6
- package/dist/self-restart.js.map +1 -1
- package/dist/server-probe.d.ts +76 -0
- package/dist/server-probe.d.ts.map +1 -0
- package/dist/server-probe.js +106 -0
- package/dist/server-probe.js.map +1 -0
- package/dist/sync-client.d.ts +24 -0
- package/dist/sync-client.d.ts.map +1 -1
- package/dist/sync-client.js +496 -151
- package/dist/sync-client.js.map +1 -1
- package/dist/target-breaker.d.ts +61 -0
- package/dist/target-breaker.d.ts.map +1 -0
- package/dist/target-breaker.js +85 -0
- package/dist/target-breaker.js.map +1 -0
- package/dist/telemetry-consent.d.ts +31 -0
- package/dist/telemetry-consent.d.ts.map +1 -0
- package/dist/telemetry-consent.js +115 -0
- package/dist/telemetry-consent.js.map +1 -0
- package/dist/telemetry.d.ts +22 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +125 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tick-queue.d.ts +67 -0
- package/dist/tick-queue.d.ts.map +1 -0
- package/dist/tick-queue.js +104 -0
- package/dist/tick-queue.js.map +1 -0
- package/dist/transport-safety.d.ts +43 -0
- package/dist/transport-safety.d.ts.map +1 -0
- package/dist/transport-safety.js +100 -0
- package/dist/transport-safety.js.map +1 -0
- package/dist/verify-repair.js +1 -1
- package/dist/verify-repair.js.map +1 -1
- package/dist/watch.js +8345 -6030
- package/package.json +21 -2
package/README.md
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
<img src="https://chatrecall.dev/logo.svg" alt="chat-recall" width="208" height="40">
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
[](https://www.npmjs.com/package/chat-recall)
|
|
5
|
+
[](https://www.npmjs.com/package/chat-recall)
|
|
6
|
+
[](https://registry.modelcontextprotocol.io/v0/servers?search=chat-recall)
|
|
7
|
+
[](https://smithery.ai/server/darkkraft/chat-recall)
|
|
8
|
+
[](https://glama.ai/mcp/servers/munhq/chat-recall)
|
|
9
|
+
|
|
10
|
+
**[chatrecall.dev](https://chatrecall.dev)** · [How it works](https://chatrecall.dev/how-it-works/) · [MCP tools](https://chatrecall.dev/mcp/) · [Pricing](https://chatrecall.dev/pricing/) · [Self-host](https://chatrecall.dev/self-hosting/)
|
|
11
|
+
|
|
12
|
+
> One memory across every AI coding tool you use. Claude Code, Gemini CLI, Codex, OpenCode, Antigravity and Cursor share a single searchable history — and the agent can search it itself.
|
|
13
|
+
|
|
14
|
+
Your coding agents each keep their own transcripts, in their own format, in their own directory, and none of them can read another's. `chat-recall` indexes all of them into one place, redacts secrets on the way, and exposes the result to your agent through **53 MCP tools** so it can recall its own past work instead of you re-explaining it.
|
|
15
|
+
|
|
16
|
+
That cross-tool part is the point. A single tool's built-in history stops at its own boundary; this does not.
|
|
17
|
+
|
|
18
|
+
## See it work
|
|
19
|
+
|
|
20
|
+
Every screen below is a real MCP call against a real server — the exact tool and
|
|
21
|
+
arguments are shown above each response. Nothing is mocked, replayed or re-timed.
|
|
22
|
+
|
|
23
|
+
**One memory, every tool.** Here **OpenCode** is asked about a **Claude Code**
|
|
24
|
+
session: a different tool, a different transcript format, one index.
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
**Your assistant asks what you were doing, and picks the work back up.**
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
**Every file a session touched, and by how much.**
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
**Or just ask in plain English** — no tool names, no session ids. The agent picks
|
|
37
|
+
the call itself:
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx chat-recall init
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
That indexes the transcripts already on your disk, detects which AI tools you have, and registers the MCP server **in each of their configs**:
|
|
48
|
+
|
|
49
|
+
| Tool | File it writes |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Claude Code | `~/.mcp.json` |
|
|
52
|
+
| Codex | `~/.codex/config.toml` |
|
|
53
|
+
| Gemini CLI | `~/.gemini/settings.json` |
|
|
54
|
+
| OpenCode | `~/.config/opencode/opencode.json` |
|
|
55
|
+
| Cursor | `~/.cursor/mcp.json` |
|
|
56
|
+
|
|
57
|
+
It only touches a config whose tool is on this machine, it never overwrites an entry you curated by hand, and `chat-recall doctor` prints one line per tool so a missing registration is visible. Inside Claude Code you can install the skills and the MCP server together instead:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
/plugin marketplace add munhq/chat-recall
|
|
61
|
+
/plugin install chat-recall@chat-recall
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Then:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
chat-recall search "that auth bug" # search everything you have ever done
|
|
68
|
+
chat-recall recent # what was I working on
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
By default this syncs to the hosted server at [chatrecall.dev](https://chatrecall.dev), which starts with a 7-day trial that needs no card and is a paid subscription after that — see [pricing](https://chatrecall.dev/pricing/). To keep everything on your own machine instead, run the server yourself: that is **free for one person, forever**, with every feature and no licence key — the task board and Toolkit included — and a licence only buys collaboration: a second member, shared history, assigning work. See [Self-host](#self-host-the-server-docker-compose) below. Either way the CLI is the same binary and the same commands; only the server URL differs.
|
|
72
|
+
|
|
73
|
+
No API keys are required. Postgres full-text search is the default backend; vector search and AI summaries are upgrades, not prerequisites.
|
|
74
|
+
|
|
75
|
+
## Four things it actually does
|
|
76
|
+
|
|
77
|
+
1. **Cross-tool unified memory.** One index, one search, one UI over Claude Code (`~/.claude/projects/`), Gemini CLI (`~/.gemini/tmp/`), Codex (`~/.codex/`), OpenCode (`~/.local/share/opencode/`), Antigravity and Cursor (`~/.cursor/` for the CLI, `~/.config/Cursor/` for the IDE). Sessions, plans, tasks, CLAUDE.md files, paste cache, shell history and agent diaries all share one pluggable `MemorySource` interface.
|
|
78
|
+
2. **The agent recalls itself.** 53 MCP tools, so Claude Code can `recall_smart_resume`, `recall_search` (with `like_session` to find similar work), `recall_edits_timeline`, `recall_subagent_search` and `recall_redundant_files` rather than asking you what happened last time. It writes back too, via `recall_decision_record`, `recall_kg_add` and `recall_set`.
|
|
79
|
+
3. **Warns before you redo work.** A `UserPromptSubmit` hook searches for similar past sessions on every prompt and injects a short "you have done this before, in session X" note into the agent's context.
|
|
80
|
+
4. **Temporal knowledge graph.** Decisions and tool mentions become entity-relationship triples with `valid_from`/`valid_to` windows, so you can ask what was decided in March and whether it still holds.
|
|
81
|
+
|
|
82
|
+
## Add your own AI tool
|
|
83
|
+
|
|
84
|
+
A new backend is one file and one line — no changes to the engine. See [`docs/ADDING_A_TOOL.md`](docs/ADDING_A_TOOL.md). If a tool you use writes transcripts to disk, it can be indexed here, and a pull request is the fastest way to make that happen.
|
|
85
|
+
|
|
86
|
+
### Optional: vector search
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
ollama pull nomic-embed-text
|
|
90
|
+
chat-recall sync --full # re-ships; the server embeds chunks into pgvector
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
…or set `EMBEDDING_PROVIDER=gemini` with `GEMINI_API_KEY` if you'd rather use a hosted embedder. Without either, search falls back to Postgres FTS — same results surface, slightly less semantic.
|
|
94
|
+
|
|
95
|
+
### Optional: web dashboard
|
|
96
|
+
|
|
97
|
+
The React dashboard is part of the **server** (SaaS or self-host docker
|
|
98
|
+
compose) — the CLI itself has no UI. For dashboard development:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm run web:install # install web deps
|
|
102
|
+
npm run web:dev # API on :5000, UI on :5174
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Self-host the server (docker compose)
|
|
106
|
+
|
|
107
|
+
Everything on your own machine, no account, nothing sent anywhere:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
git clone https://github.com/munhq/chat-recall && cd chat-recall
|
|
111
|
+
echo "ADMIN_KEY=$(openssl rand -hex 24)" >> .env
|
|
112
|
+
echo "POSTGRES_PASSWORD=$(openssl rand -hex 24)" >> .env
|
|
113
|
+
docker compose up -d --build # FIRST RUN BUILDS FROM SOURCE (minutes)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then mint a device token and connect a machine — the full sequence, with
|
|
117
|
+
troubleshooting, is in **[docs/SELF_HOSTING.md](docs/SELF_HOSTING.md)**.
|
|
118
|
+
|
|
119
|
+
Two containers: the server plus a bundled `pgvector/pgvector` Postgres, so a
|
|
120
|
+
plain `docker compose up` is self-contained. Bring-your-own-Postgres is
|
|
121
|
+
supported too (it is how the hosted service runs): set `DATABASE_URL` to an
|
|
122
|
+
external Postgres 16+. The `pgvector` extension is needed only for semantic
|
|
123
|
+
search — everything degrades to full-text without it.
|
|
124
|
+
|
|
125
|
+
### Keep the index live (+ optional server sync)
|
|
126
|
+
|
|
127
|
+
You do not need a daemon. Claude Code spawns the MCP server, and that process
|
|
128
|
+
syncs every 3 minutes on its own — the binary is the daemon. For a headless box
|
|
129
|
+
with no assistant running, opt in to a background service:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
chat-recall watch # foreground daemon: watches every tool, summaries, precompute
|
|
133
|
+
chat-recall watch --install-service # systemd user unit (Linux) · launchd (macOS) · Scheduled Task (Windows)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`init` does not install it, on purpose. Both paths push through the same
|
|
137
|
+
`syncIncremental()` under the same cross-platform index lock, so one writer
|
|
138
|
+
touches the ledger at a time — see [docs/SYNC.md](docs/SYNC.md) before changing
|
|
139
|
+
any of it. Secrets are masked client-side before anything leaves the machine.
|
|
140
|
+
`chat-recall sync` does the same push once, on demand.
|
|
141
|
+
|
|
142
|
+
## Hook it up to Claude Code
|
|
143
|
+
|
|
144
|
+
`chat-recall init` does this for you. Manual equivalent in `~/.mcp.json`:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"mcpServers": {
|
|
149
|
+
"chat-recall": {
|
|
150
|
+
"command": "chat-recall-mcp"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Then install the hooks (one command sets up auto-save, pre-compact backup, and the resume-hint that warns when you're about to redo work):
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
chat-recall install-hooks # registers all five events, in every Claude profile
|
|
160
|
+
chat-recall install-hooks --no-resume-hint # skip the resume warning
|
|
161
|
+
chat-recall install-hooks --no-wakeup # skip the session-start wake-up bundle
|
|
162
|
+
chat-recall install-hooks --no-escalate # skip the session-end escalation
|
|
163
|
+
chat-recall install-hooks --uninstall # remove all of ours, leave third-party hooks alone
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
| Hook | When it fires | What it does |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| `SessionStart` | New session (`startup` / `clear`) | Injects the project-scoped wake-up bundle |
|
|
169
|
+
| `UserPromptSubmit` | When you type a prompt | Searches past sessions; if a similar one exists, injects "you've worked on this before" into the agent's context |
|
|
170
|
+
| `Stop` | After every assistant turn | Auto-saves topics, decisions, and tools to `~/.chat-recall/memory/` |
|
|
171
|
+
| `PreCompact` | Before Claude Code compacts context | Emergency save so nothing is lost to compaction |
|
|
172
|
+
| `SessionEnd` | When the session closes | Escalates the session's learnings in the background, so nothing is delayed |
|
|
173
|
+
|
|
174
|
+
## Companion: codeindex (auto-detected)
|
|
175
|
+
|
|
176
|
+
There's a separate MCP server called **codeindex** (Zig binary, ~56 MB) by [munhq](https://github.com/munhq/codeindex) that gives the agent code-level lookup. The two compose:
|
|
177
|
+
|
|
178
|
+
- **chat-recall** = session memory. *What have I worked on? What did we decide?*
|
|
179
|
+
- **codeindex** = code memory. *Where is this symbol? Who calls it? What breaks if I change it?*
|
|
180
|
+
|
|
181
|
+
Together the agent can answer "have I built this before?" *and* "does it already exist in this codebase?" before redoing work.
|
|
182
|
+
|
|
183
|
+
**How chat-recall handles it:** `chat-recall init` detects whether `codeindex` is on your PATH (or at `~/.local/bin/codeindex`). If yes, it registers it as an MCP server in `~/.mcp.json` automatically — no download, no surprise. If no, it prints a one-line hint about how to get it.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
chat-recall init # default — detect and register if installed
|
|
187
|
+
chat-recall init --with-codeindex # additionally force-download the binary
|
|
188
|
+
chat-recall init --skip-codeindex # don't even check
|
|
189
|
+
chat-recall companions install # download manually (after init)
|
|
190
|
+
chat-recall companions status # show what was detected
|
|
191
|
+
chat-recall companions uninstall # remove the binary + MCP registration
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
codeindex is open source (MIT) at [github.com/munhq/codeindex](https://github.com/munhq/codeindex). The install is optional — chat-recall works entirely without it; you just don't get the code-level tools.
|
|
195
|
+
|
|
196
|
+
## What gets indexed
|
|
197
|
+
|
|
198
|
+
| Source | Origin | Notes |
|
|
199
|
+
|--------|--------|-------|
|
|
200
|
+
| **Sessions (Claude)** | `~/.claude/projects/<hash>/<uuid>.jsonl` | Full transcripts, tokens, cost, files touched, models used |
|
|
201
|
+
| **Sessions (Gemini CLI)** | `~/.gemini/tmp/*/chats/*.json` | Tokens and tool usage extracted where present |
|
|
202
|
+
| **Sessions (OpenCode)** | `~/.local/share/opencode/opencode.db` (SQLite) | Cost, tokens, todos |
|
|
203
|
+
| **Subagent transcripts** | `<session-dir>/<id>/subagents/*.jsonl` | Explore, aside, **and `acompact-*`** (orphaned compacted history) |
|
|
204
|
+
| **Plans** | `~/.claude/plans/*.md` | Agent planning docs, split by `##` |
|
|
205
|
+
| **Tasks** | `~/.claude/tasks/<session>/*.json` | Linked to parent session |
|
|
206
|
+
| **CLAUDE.md** | Auto-discovered from project hashes | Linked to sessions in same project |
|
|
207
|
+
| **History** | `~/.claude/history.jsonl` | Shell history, optionally tied to a session |
|
|
208
|
+
| **Paste** | `~/.claude/paste-cache/*.txt` | Large pasted blobs |
|
|
209
|
+
| **Diary** | `~/.chat-recall/index/diary/<agent>/*.json` | What the agent told its future self via `recall_diary_write` |
|
|
210
|
+
|
|
211
|
+
## MCP tools (53, including 4 code-intelligence tools that register when the codeindex companion is installed)
|
|
212
|
+
|
|
213
|
+
**Search & retrieve** — `recall_search`, `recall_memory_search`, `recall_recent`, `recall_show`, `recall_context`, `recall_summary`, `recall_smart_resume`, `recall_project_context`, `recall_weekly_digest`, `recall_analytics_summary`, `recall_wake_up`.
|
|
214
|
+
|
|
215
|
+
**Pattern detection** — `recall_search` with `like_session: <id>` (find work similar to a given session), `recall_redundant_files` (warn when a new filename overlaps prior work), `recall_diff` with `files_only: true` (what files session X actually touched), `recall_edits_timeline` with `group_by: "session"` (which sessions edited `auth.rs`).
|
|
216
|
+
|
|
217
|
+
**Subagents & filters** — `recall_subagent_search` (search inside hidden Explore/aside/compact transcripts), `recall_user_prompts` (only what the human typed, banner-stripped).
|
|
218
|
+
|
|
219
|
+
**Findings, ranked** — `recall_claude_suggestions` (every finding that becomes an agent-instruction change: the CLAUDE.md rules and skill installs, merged across account scope and every indexed project) and `recall_improvements` (everything else, ranked most urgent first, with `create_tasks: true` to open one team task per item). They partition the same recommendation engines, so an item never appears in both.
|
|
220
|
+
|
|
221
|
+
**Knowledge graph** — `recall_kg_query`, `recall_kg_add`, `recall_kg_invalidate`, `recall_kg_timeline`, `recall_kg_stats`. Plus `recall_decision_record` to write a decision as both a triple and a diary entry in one call.
|
|
222
|
+
|
|
223
|
+
**KV state** — `recall_set`, `recall_get` (no key = list the scope). Small persistent values keyed by namespaced strings: "current PR url", "branch I'm working on", user prefs.
|
|
224
|
+
|
|
225
|
+
**Diary & status** — `recall_diary_write`, `recall_diary_read`, `recall_status` (includes memory breakdown), `recall_index`. Plans/tasks: search via `recall_memory_search(source_types:['plan','task'])`, read via `recall_show`.
|
|
226
|
+
|
|
227
|
+
When the codeindex companion is installed, the agent *also* gets 16 code-level tools (`find_symbol`, `find_callers`, `get_imports`, `plan_change`, `get_change_impact`, `analyze`, etc.) from a separate MCP server. They compose: chat-recall finds what you've done; codeindex tells you what currently exists.
|
|
228
|
+
|
|
229
|
+
## Search architecture
|
|
230
|
+
|
|
231
|
+
Search runs **on the server**. Two backends, Postgres FTS is the default:
|
|
232
|
+
|
|
233
|
+
- **Postgres FTS** — zero extra setup. Keyword search with ranking. Always available.
|
|
234
|
+
- **Vector (pgvector)** — opt-in, and needs an embedder: Ollama, any OpenAI-compatible embeddings endpoint, or a Gemini API key. The vector width follows the model you point it at, so pick one embedder and keep it — changing it means a full re-index.
|
|
235
|
+
|
|
236
|
+
The CLI ships redacted chunks to the server, which indexes them. If no embedder is configured, every search tool transparently falls back to FTS.
|
|
237
|
+
|
|
238
|
+
## Cost tracking
|
|
239
|
+
|
|
240
|
+
Cost in USD is computed from token usage when at least one model in the session has a rate the server knows. For every other model — anything local, anything self-hosted, anything newer than the rate table — the dashboard shows `—` instead of fabricating a number. The summary surfaces a `sessionsWithoutPricing` counter, so you can see how much of the total the figure actually covers.
|
|
241
|
+
|
|
242
|
+
## Wake-up context
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
chat-recall memory wake-up
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Builds a small bundle for an AI session: optional identity blurb, the top 10 chunks the classifier flagged as decisions/preferences/milestones at importance ≥ 4, and a snapshot of currently-valid knowledge-graph facts. No magic compression — just the highest-signal items the indexer already tags.
|
|
249
|
+
|
|
250
|
+
## Data locations
|
|
251
|
+
|
|
252
|
+
The **CLI** keeps almost nothing locally — just what it needs to reach the server:
|
|
253
|
+
|
|
254
|
+
| Path | What |
|
|
255
|
+
|------|------|
|
|
256
|
+
| `~/.chat-recall/credentials.json` | Server target(s) + device token (mode 0600) |
|
|
257
|
+
| `~/.chat-recall/sync-ledger.json` | Per-server sync watermark (what's already shipped) |
|
|
258
|
+
| `~/.chat-recall/hooks/` | Installed hooks (after `install-hooks`) |
|
|
259
|
+
| `~/.chat-recall/index/diary/` | Agent diaries written by `recall_diary_write` |
|
|
260
|
+
| `~/.chat-recall/shadow/` | Gzipped copy of the fullest-seen transcript per session, so an upstream `--resume` truncation cannot destroy history |
|
|
261
|
+
| `~/.chat-recall/cache.db` | Local outcome/metadata cache for the local dashboard. Not an index, and not used in server mode |
|
|
262
|
+
|
|
263
|
+
All indexed content — chunks, FTS, vectors, knowledge graph, secret findings, diary — lives **on the server** (Postgres for self-host and SaaS). Reset it by wiping the server's Postgres data, not anything under `~/.chat-recall`.
|
|
264
|
+
|
|
265
|
+
## Privacy
|
|
266
|
+
|
|
267
|
+
Your sessions sync to a chat-recall server — either one **you self-host** (your own box, your own Postgres) or the **SaaS**. Before anything leaves the CLI it is **redacted**: secrets are masked client-side, so the server never receives raw credentials. Self-hosting keeps all data on infrastructure you control; the SaaS is the hosted alternative.
|
|
268
|
+
|
|
269
|
+
No telemetry. Your data lives in **your** server's Postgres — back that up however you like. On the SaaS it lives in the hosted Postgres; self-host if you'd rather keep it entirely on your own infrastructure.
|
|
270
|
+
|
|
271
|
+
## Architecture
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
packages/
|
|
275
|
+
├── engine/src/
|
|
276
|
+
│ ├── core/
|
|
277
|
+
│ │ ├── backends/ ToolBackend per AI tool (claude, gemini, opencode, codex, agy)
|
|
278
|
+
│ │ ├── tool-backend.ts Registry interface — single source of truth for tool identity
|
|
279
|
+
│ │ ├── tool-paths.ts Env-overridable default paths for each tool
|
|
280
|
+
│ │ ├── generic-engine.ts Shared turn extraction / edit scan / replay (canonical events)
|
|
281
|
+
│ │ └── … Indexing, storage, embeddings, summaries, KG, classifier
|
|
282
|
+
│ └── parsers/ *-source.ts plugins per content type (sessions, plans, tasks, …)
|
|
283
|
+
├── cli/
|
|
284
|
+
│ ├── src/cli.ts CLI
|
|
285
|
+
│ ├── src/mcp.ts MCP server
|
|
286
|
+
│ ├── auto-indexer/ chokidar-based watcher daemon (systemd-friendly)
|
|
287
|
+
│ └── hooks/ Claude Code hooks (install via `chat-recall install-hooks`)
|
|
288
|
+
└── server/
|
|
289
|
+
├── src/ Express API
|
|
290
|
+
├── client/ React + Vite UI — the dashboard
|
|
291
|
+
└── cloud/migrations/ Empty by design — pg-schema.ts owns the schema
|
|
292
|
+
|
|
293
|
+
docker/ Dockerfile + entrypoint for the server image
|
|
294
|
+
e2e/ Playwright tests for the dashboard
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Two extension points, both registry-driven:
|
|
298
|
+
|
|
299
|
+
- **Adding a new content type** (e.g. another file format to index) — implement `MemorySource` (`discover` → `parse` → `extractLinks`) and register it in the `SourceRegistry`.
|
|
300
|
+
- **Adding a new AI tool** (a seventh backend alongside Claude/Gemini/OpenCode/Codex/Antigravity/Cursor) — implement `ToolBackend` (paths, ID handling, `readEvents`, `fileToolMap`, `extractEditDelta`) and register it in `packages/engine/src/core/backends/index.ts`. Walkthrough: [`docs/ADDING_A_TOOL.md`](docs/ADDING_A_TOOL.md). All paths are env-overridable via `CHAT_RECALL_{CLAUDE,GEMINI,CODEX,AGY,CURSOR,CURSOR_IDE}_HOME` / `CHAT_RECALL_OPENCODE_DB`.
|
|
301
|
+
|
|
302
|
+
## Requirements
|
|
303
|
+
|
|
304
|
+
- Node.js 22 or later. The Docker image and CI run 24.
|
|
305
|
+
- Sessions written by a supported tool, in its standard location: `~/.claude/`,
|
|
306
|
+
`~/.codex/`, `~/.local/share/opencode/`, `~/.gemini/`.
|
|
307
|
+
|
|
308
|
+
That is the whole list. No API key is needed to install, index or search.
|
|
309
|
+
|
|
310
|
+
Two features are opt-in, and each one needs a back end that you choose:
|
|
311
|
+
|
|
312
|
+
| Feature | Back ends you can point it at |
|
|
313
|
+
|---|---|
|
|
314
|
+
| Vector search | Ollama (local, free), any OpenAI-compatible embeddings endpoint, or `GEMINI_API_KEY` |
|
|
315
|
+
| AI summaries | Ollama, a CLI you are already logged in to (`SUMMARY_CLI_CMD`), an OpenAI-compatible endpoint, or `ANTHROPIC_API_KEY` |
|
|
316
|
+
|
|
317
|
+
Without either back end, search falls back to Postgres FTS and sessions carry no
|
|
318
|
+
generated summary. Everything else works the same.
|
|
319
|
+
|
|
320
|
+
## License
|
|
321
|
+
|
|
322
|
+
[Elastic License 2.0](LICENSE) for the whole repository.
|
|
323
|
+
|
|
324
|
+
In plain terms: use it, modify it, run it for yourself or inside your company,
|
|
325
|
+
free and without asking. The one thing you may not do is offer it to third
|
|
326
|
+
parties as a hosted or managed service — that is the product. You also may not
|
|
327
|
+
strip the licence-key checks or the copyright notices.
|
|
328
|
+
|
|
329
|
+
It is **source-available, not OSI open source**, and this README will not
|
|
330
|
+
pretend otherwise. It replaced a split where the CLI and engine were MIT and the
|
|
331
|
+
server was BSL 1.1, which answered "may I use this?" three different ways inside
|
|
332
|
+
one repository.
|