chat-memory-sync 0.1.3__py3-none-any.whl
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.
- chat_memory_sync/__init__.py +2 -0
- chat_memory_sync/__main__.py +5 -0
- chat_memory_sync/cli.py +62 -0
- chat_memory_sync/cmlib.py +76 -0
- chat_memory_sync/install.py +221 -0
- chat_memory_sync/recall.py +231 -0
- chat_memory_sync/run.py +92 -0
- chat_memory_sync/sync.py +938 -0
- chat_memory_sync-0.1.3.dist-info/METADATA +204 -0
- chat_memory_sync-0.1.3.dist-info/RECORD +13 -0
- chat_memory_sync-0.1.3.dist-info/WHEEL +4 -0
- chat_memory_sync-0.1.3.dist-info/entry_points.txt +3 -0
- chat_memory_sync-0.1.3.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: chat-memory-sync
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Unified, searchable memory bank of your AI coding chats across Cursor, Claude Code, OpenCode, Codex, Gemini CLI, Pi and more — synced across machines.
|
|
5
|
+
Project-URL: Homepage, https://github.com/insideaayush/chat-memory-sync
|
|
6
|
+
Project-URL: Repository, https://github.com/insideaayush/chat-memory-sync
|
|
7
|
+
Project-URL: Issues, https://github.com/insideaayush/chat-memory-sync/issues
|
|
8
|
+
Author: Aayush Gautam
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ai,chat-history,claude-code,cli,codex,cursor,developer-tools,gemini,memory,opencode
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Software Development
|
|
18
|
+
Classifier: Topic :: Utilities
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# chat-memory-sync
|
|
23
|
+
|
|
24
|
+
Turn your AI coding assistants' chat history into a unified, searchable **memory bank**.
|
|
25
|
+
|
|
26
|
+
`chat-memory-sync` exports conversations from every AI coding harness you use into one
|
|
27
|
+
project-organized Markdown repo, syncs it across all your machines via git, and gives
|
|
28
|
+
agents a `recall` command to look up relevant past chats — so an assistant working on a
|
|
29
|
+
feature can learn from what you discussed about it in a *different* tool weeks ago.
|
|
30
|
+
|
|
31
|
+
- **Many harnesses** → one place: Cursor, Cursor Agent CLI, Claude Code, OpenCode, Pi,
|
|
32
|
+
Codex, Gemini CLI. (Antigravity is stubbed — opaque local store.)
|
|
33
|
+
- **Project-organized** so memory is scoped to the repo you're in (worktrees/sub-apps
|
|
34
|
+
merged into the parent repo).
|
|
35
|
+
- **Multi-machine** via a *client* dimension (mac / pc / cloud) — each machine syncs
|
|
36
|
+
independently; no machine ever clobbers another's chats.
|
|
37
|
+
- **Private by design**: the tooling is open source; your chats live in a **separate
|
|
38
|
+
private data repo** you own.
|
|
39
|
+
- **Incremental & idempotent**: only changed chats are rewritten; updates to old chats
|
|
40
|
+
are picked up; deleted chats are pruned.
|
|
41
|
+
|
|
42
|
+
## How it's split
|
|
43
|
+
|
|
44
|
+
| Repo | Visibility | Contents |
|
|
45
|
+
| ---- | ---------- | -------- |
|
|
46
|
+
| **chat-memory-sync** (this) | public | the scripts + installer + background job |
|
|
47
|
+
| **your data repo** (e.g. `chat-memory`) | **private** | `projects/` + `INDEX.md` (your chats) |
|
|
48
|
+
|
|
49
|
+
The tool reads `~/.config/chat-memory/config.json` for your data repo's location.
|
|
50
|
+
Machine-local state (search index, client name, logs) also lives under
|
|
51
|
+
`~/.config/chat-memory/` — never inside the data repo.
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
Get the `chat-memory` CLI (pure Python, no dependencies):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Homebrew
|
|
59
|
+
brew install insideaayush/tap/chat-memory-sync
|
|
60
|
+
|
|
61
|
+
# pipx (recommended for pip users)
|
|
62
|
+
pipx install chat-memory-sync
|
|
63
|
+
|
|
64
|
+
# pip
|
|
65
|
+
pip install --user chat-memory-sync
|
|
66
|
+
|
|
67
|
+
# from source
|
|
68
|
+
git clone https://github.com/insideaayush/chat-memory-sync.git
|
|
69
|
+
pip install ./chat-memory-sync
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then set it up on this machine:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
chat-memory install \
|
|
76
|
+
--data-remote git@github.com:<you>/chat-memory.git \
|
|
77
|
+
--client "macbook-air" \
|
|
78
|
+
--time 21:00
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
That one command: writes config, clones (or inits) your private data repo, runs the
|
|
82
|
+
first sync, registers a **daily background job** for your OS, and ensures the `recall`
|
|
83
|
+
command is available.
|
|
84
|
+
|
|
85
|
+
### Commands
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
chat-memory install # config + data repo + daily job + recall
|
|
89
|
+
chat-memory sync # pull -> export -> commit -> push (what the job runs)
|
|
90
|
+
chat-memory export # export only (no git)
|
|
91
|
+
chat-memory recall … # search past chats (also the standalone `recall` command)
|
|
92
|
+
chat-memory doctor # config, detected harnesses, chat counts
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
| OS | Background job |
|
|
96
|
+
| -- | -------------- |
|
|
97
|
+
| macOS | launchd LaunchAgent `com.user.chat-memory-sync` |
|
|
98
|
+
| Windows | Task Scheduler task `ChatMemorySync` |
|
|
99
|
+
| Linux | systemd **user** timer (falls back to cron) |
|
|
100
|
+
|
|
101
|
+
Only needs `git` + `python3`. Re-running `chat-memory install` is safe.
|
|
102
|
+
|
|
103
|
+
> No private data repo yet? Create an empty **private** repo on your git host first,
|
|
104
|
+
> then pass its URL as `--data-remote`. Or omit `--data-remote` to keep it local-only.
|
|
105
|
+
|
|
106
|
+
Releases are automated (PyPI + Homebrew) — see [RELEASING.md](RELEASING.md).
|
|
107
|
+
|
|
108
|
+
## Finding relevant chats — `recall`
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
cd ~/code/my-project
|
|
112
|
+
recall "auth token refresh" # ranked (BM25) hits for THIS repo, with snippets
|
|
113
|
+
recall "rate limiting" --all # every project
|
|
114
|
+
recall "payout bug" --harness cursor --since 2026-09 -k 10
|
|
115
|
+
recall "..." --full # just file paths (pipe-friendly)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Auto-scopes to the project you're in (via CWD), builds a local SQLite full-text index
|
|
119
|
+
that rebuilds when chats change. The index is machine-local (`~/.config/chat-memory/
|
|
120
|
+
index.db`), never synced.
|
|
121
|
+
|
|
122
|
+
**For agents:** run `recall "<topic>"` from the repo you're working in, read the top
|
|
123
|
+
hits, then open those `.md` files for full context. Add a line to your project's
|
|
124
|
+
`AGENTS.md`/`CLAUDE.md` so assistants do this automatically.
|
|
125
|
+
|
|
126
|
+
## Multi-machine
|
|
127
|
+
|
|
128
|
+
Every machine runs the same job independently. Each run:
|
|
129
|
+
|
|
130
|
+
1. `git pull --rebase` the data repo (other machines' chats)
|
|
131
|
+
2. export **this** machine's chats (tagged with its `client` id)
|
|
132
|
+
3. prune only **this client's** deleted chats
|
|
133
|
+
4. rebuild indexes from the union, `git commit`, `git push`
|
|
134
|
+
|
|
135
|
+
Set a machine's name with `--client` (default: hostname), or
|
|
136
|
+
`CHAT_MEMORY_CLIENT=cloud-vm`.
|
|
137
|
+
|
|
138
|
+
## Harness support
|
|
139
|
+
|
|
140
|
+
Legend: ✅ supported · 🧪 partial · 🔜 stub/planned · ❓ wanted (help us!)
|
|
141
|
+
|
|
142
|
+
| Harness | Status | Source | Notes |
|
|
143
|
+
| ------- | :----: | ------ | ----- |
|
|
144
|
+
| Cursor | ✅ | `…/Cursor/User/globalStorage/state.vscdb` (OS-aware) | IDE chats / composers |
|
|
145
|
+
| Cursor Agent CLI | ✅ | `~/.cursor/acp-sessions/<uuid>/store.db` + `meta.json` | blob store |
|
|
146
|
+
| Claude Code | ✅ | `~/.claude/projects/<enc>/<uuid>.jsonl` | |
|
|
147
|
+
| OpenCode | ✅ | `~/.local/share/opencode/opencode.db` | |
|
|
148
|
+
| Pi | ✅ | `~/.pi/agent/sessions/<enc>/<ts>_<id>.jsonl` | |
|
|
149
|
+
| Codex | ✅ | `~/.codex/sessions/**/rollout-*.jsonl` (+ `archived_sessions/`) | |
|
|
150
|
+
| Gemini CLI | 🧪 | `~/.gemini/tmp/<key>/checkpoint-*.json` (+ `logs.json`) | full via checkpoints; else prompts only |
|
|
151
|
+
| Antigravity | 🔜 | opaque protobuf LevelDB (`shared_proto_db`) | needs a decoder |
|
|
152
|
+
| Windsurf, Aider, Cline, Continue, Zed, Copilot Chat, … | ❓ | — | [request](../../issues/new?template=harness_request.md) or PR |
|
|
153
|
+
|
|
154
|
+
Can't track every tool in the world — **adapters are community-driven**. Adding one is
|
|
155
|
+
usually a single function; see **[CONTRIBUTING.md](CONTRIBUTING.md)** and the
|
|
156
|
+
**[ROADMAP](ROADMAP.md)**.
|
|
157
|
+
|
|
158
|
+
## How it works
|
|
159
|
+
|
|
160
|
+
| File | Role |
|
|
161
|
+
| ---- | ---- |
|
|
162
|
+
| `cmlib.py` | config + paths (data dir, state dir, client) |
|
|
163
|
+
| `sync.py` | export every harness's native store → Markdown; rebuild indexes |
|
|
164
|
+
| `run.py` | runner: `git pull → sync → commit → push` (+ warms recall index) |
|
|
165
|
+
| `recall.py` | full-text (BM25) search, auto-scoped to the current project |
|
|
166
|
+
| `install.py` | one-command setup + scheduler + `recall` command |
|
|
167
|
+
|
|
168
|
+
### Adding a harness
|
|
169
|
+
|
|
170
|
+
Adapters are community-driven — adding one is usually a single generator function in
|
|
171
|
+
`sync.py`. See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the full contract and the
|
|
172
|
+
support table above.
|
|
173
|
+
|
|
174
|
+
## Config reference
|
|
175
|
+
|
|
176
|
+
`~/.config/chat-memory/config.json`:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{ "data_dir": "/Users/you/chat-memory", "client": "macbook-air" }
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Env overrides: `CHAT_MEMORY_DATA_DIR`, `CHAT_MEMORY_CLIENT`, `CHAT_MEMORY_HOME`.
|
|
183
|
+
|
|
184
|
+
## Give your agents memory
|
|
185
|
+
|
|
186
|
+
Any assistant with shell access can query all your past chats via `recall`. Add a short
|
|
187
|
+
snippet to your project's `AGENTS.md` / `CLAUDE.md` / `GEMINI.md` so assistants do it
|
|
188
|
+
automatically — copy-paste blocks per harness are in
|
|
189
|
+
**[docs/agent-integration.md](docs/agent-integration.md)**.
|
|
190
|
+
|
|
191
|
+
## Contributing & community
|
|
192
|
+
|
|
193
|
+
- **[CONTRIBUTING.md](CONTRIBUTING.md)** — add a harness adapter (the main ask) or fix a bug.
|
|
194
|
+
- **[ROADMAP.md](ROADMAP.md)** — planned work; pick anything up.
|
|
195
|
+
- **[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)**.
|
|
196
|
+
- Not a coder? A [harness request](../../issues/new?template=harness_request.md) with
|
|
197
|
+
storage paths + a redacted sample is hugely useful.
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
MIT — see [LICENSE](LICENSE). Contributions accepted under the same license.
|
|
202
|
+
|
|
203
|
+
> The tooling is open source; **your chats stay in your own private data repo.**
|
|
204
|
+
> This project reads local chat stores and writes Markdown — review the code before running it.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
chat_memory_sync/__init__.py,sha256=6rWdLf8_K9ddrf-lqnbCtzb4NKzZzwjY_OcC6VUoCsc,103
|
|
2
|
+
chat_memory_sync/__main__.py,sha256=2ExmvLBObyZQez6mTNIG2PKwUGjSu4RV73bwdy-YNRA,87
|
|
3
|
+
chat_memory_sync/cli.py,sha256=W6Dzb4J2RuCm3DMf8Y2qrH1rNneWFazGhgn_qKzozSw,2237
|
|
4
|
+
chat_memory_sync/cmlib.py,sha256=XxVwXPrJeTSbif9XAc_LWfoRJ2JekD00SlFqBrLRCbQ,2069
|
|
5
|
+
chat_memory_sync/install.py,sha256=uytL0iNyqhKAOPmPDJj1K8mIxec2jPVE3UXilf_SuLE,9149
|
|
6
|
+
chat_memory_sync/recall.py,sha256=RHkKV77sNVG5PYQrL7KD5sTh2fEGl8Sipi3_3Z7nQdI,8892
|
|
7
|
+
chat_memory_sync/run.py,sha256=pXn5qEeUkORcGiZ7M1Qp0ieS1AcBpWMdrwB3CZvwBTM,3037
|
|
8
|
+
chat_memory_sync/sync.py,sha256=ekNcRojQ4IugUdFYdpGKkuyDqMrX_6FF0FWeMBtTqQU,39044
|
|
9
|
+
chat_memory_sync-0.1.3.dist-info/METADATA,sha256=Qns82ydT8a_v8UyAX_c4uy1SZmlvB9MgFLFHB_r_b4Q,8379
|
|
10
|
+
chat_memory_sync-0.1.3.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
11
|
+
chat_memory_sync-0.1.3.dist-info/entry_points.txt,sha256=wSYpQfn74zfhmOmCzSafBsR6eZXbnRkpTnVBmnHEAcE,96
|
|
12
|
+
chat_memory_sync-0.1.3.dist-info/licenses/LICENSE,sha256=rl9AmolPLExELNf7mZEkUEtEsRD95JbA8cVIoQgdV-o,1070
|
|
13
|
+
chat_memory_sync-0.1.3.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aayush Gautam
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|