cc-anywhere 1.2.0__tar.gz

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 (35) hide show
  1. cc_anywhere-1.2.0/LICENSE +190 -0
  2. cc_anywhere-1.2.0/PKG-INFO +444 -0
  3. cc_anywhere-1.2.0/README.md +412 -0
  4. cc_anywhere-1.2.0/pyproject.toml +68 -0
  5. cc_anywhere-1.2.0/setup.cfg +4 -0
  6. cc_anywhere-1.2.0/src/cc_anywhere/__init__.py +34 -0
  7. cc_anywhere-1.2.0/src/cc_anywhere/_paths.py +60 -0
  8. cc_anywhere-1.2.0/src/cc_anywhere/backup.py +179 -0
  9. cc_anywhere-1.2.0/src/cc_anywhere/cli.py +1032 -0
  10. cc_anywhere-1.2.0/src/cc_anywhere/core.py +362 -0
  11. cc_anywhere-1.2.0/src/cc_anywhere/digest.py +589 -0
  12. cc_anywhere-1.2.0/src/cc_anywhere/evaluate.py +229 -0
  13. cc_anywhere-1.2.0/src/cc_anywhere/help.py +221 -0
  14. cc_anywhere-1.2.0/src/cc_anywhere/init_setup.py +408 -0
  15. cc_anywhere-1.2.0/src/cc_anywhere/llm_guide.py +337 -0
  16. cc_anywhere-1.2.0/src/cc_anywhere/persona.py +450 -0
  17. cc_anywhere-1.2.0/src/cc_anywhere/review.py +433 -0
  18. cc_anywhere-1.2.0/src/cc_anywhere/semantic.py +1242 -0
  19. cc_anywhere-1.2.0/src/cc_anywhere/sqlite_capture.py +1805 -0
  20. cc_anywhere-1.2.0/src/cc_anywhere/stats.py +523 -0
  21. cc_anywhere-1.2.0/src/cc_anywhere/sync.py +393 -0
  22. cc_anywhere-1.2.0/src/cc_anywhere.egg-info/PKG-INFO +444 -0
  23. cc_anywhere-1.2.0/src/cc_anywhere.egg-info/SOURCES.txt +33 -0
  24. cc_anywhere-1.2.0/src/cc_anywhere.egg-info/dependency_links.txt +1 -0
  25. cc_anywhere-1.2.0/src/cc_anywhere.egg-info/entry_points.txt +8 -0
  26. cc_anywhere-1.2.0/src/cc_anywhere.egg-info/requires.txt +6 -0
  27. cc_anywhere-1.2.0/src/cc_anywhere.egg-info/top_level.txt +1 -0
  28. cc_anywhere-1.2.0/tests/test_codex_capture.py +558 -0
  29. cc_anywhere-1.2.0/tests/test_digest.py +59 -0
  30. cc_anywhere-1.2.0/tests/test_gemini_capture.py +287 -0
  31. cc_anywhere-1.2.0/tests/test_init_setup.py +329 -0
  32. cc_anywhere-1.2.0/tests/test_paths_migration.py +138 -0
  33. cc_anywhere-1.2.0/tests/test_semantic.py +699 -0
  34. cc_anywhere-1.2.0/tests/test_sqlite_capture.py +753 -0
  35. cc_anywhere-1.2.0/tests/test_sync_archive.py +166 -0
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2025-2026 Abe Couse
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,444 @@
1
+ Metadata-Version: 2.4
2
+ Name: cc-anywhere
3
+ Version: 1.2.0
4
+ Summary: Memory built for AI coding. Captures Claude Code, Cowork, Codex, and Gemini CLI sessions into a local SQLite database — pick work back up with context, not guesswork.
5
+ Author: Abe Couse
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/abecouse/cc-anywhere
8
+ Project-URL: Repository, https://github.com/abecouse/cc-anywhere
9
+ Project-URL: Issues, https://github.com/abecouse/cc-anywhere/issues
10
+ Keywords: cc-anywhere,claude-code,codex,ai-memory,ai,sync,developer-tools,productivity,anthropic,cli
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: rich>=10.0.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest; extra == "dev"
29
+ Requires-Dist: black; extra == "dev"
30
+ Requires-Dist: mypy; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # cc-anywhere
34
+
35
+ **Memory built for AI coding.**  ·  Pick work back up with context, not guesswork.
36
+
37
+ > I wanted to remember what we discussed about my projects, and couldn't find past discussions, decisions, or feedback. The AI agents also seemed to forget.
38
+ >
39
+ > So I built cc-anywhere — for me, and for them. One memory layer; both audiences read it the same way.
40
+ >
41
+ > — *Abe Couse*
42
+
43
+ Every Claude Code, Claude Cowork, Codex CLI / Desktop, and Gemini CLI session you run gets captured into a fast local SQLite database with full-text and natural-language search. Then you can ask any future session — Claude, Codex, Gemini, anything that can shell out to a CLI — *"what did we decide about auth last week?"* and get the actual past conversation back.
44
+
45
+ ---
46
+
47
+ ## The 30-second demo
48
+
49
+ ```bash
50
+ pip install cc-anywhere
51
+ cc-anywhere --capture
52
+ cc-anywhere --ask "what did we decide about auth?"
53
+ ```
54
+
55
+ That's the whole thing. The third command searches every Claude Code, Claude Cowork, and Codex session you've ever had on this machine and returns the conversations that match — ranked, with project, speaker, and timestamp.
56
+
57
+ The first time you run it, search will surface conversations from months ago that you'd half-forgotten. The moment people realize their entire AI coding history just became queryable is the moment this project earns its keep.
58
+
59
+ ### Two query modes — `--ask` routes automatically
60
+
61
+ ```bash
62
+ # Topical recall — name a subject, get the relevant past conversations
63
+ cc-anywhere --ask "what did we decide about pricing"
64
+
65
+ # Temporal recall — name a time window, get a chronological pull (no keywords needed)
66
+ cc-anywhere --ask "what was I working on today"
67
+ cc-anywhere --ask "this week"
68
+ cc-anywhere --ask "catch me up"
69
+ ```
70
+
71
+ Wide windows (this week / month) return a daily rollup with drill-in hints so you can walk back into a specific day. Narrow windows return a per-session list with previews.
72
+
73
+ ### Usage overview
74
+
75
+ ```bash
76
+ cc-anywhere --usage
77
+ ```
78
+
79
+ Modeled on Claude Code's `/usage` but with longer time horizons (not capped at 30 days), per-project breakdown, per-machine breakdown when sync data is present, and a marathon-sessions view.
80
+
81
+ ### For LLM agents
82
+
83
+ ```bash
84
+ cc-anywhere --llm-guide
85
+ ```
86
+
87
+ Prints the full LLM-facing usage reference (query patterns, drill-in, when *not* to use, code-vs-conversation interplay). Reachable from any cwd, so an agent in any session can fetch it. `LLM-CHEATSHEET.md` at the repo root mirrors the same content for human reading.
88
+
89
+ ---
90
+
91
+ ## Why it exists
92
+
93
+ AI coding assistants are great at remembering inside a session and unaware of everything before it. ChatGPT memory is locked to ChatGPT. Claude memory is locked to Claude. Codex has no cross-tool memory at all. Vendors won't fix this — siloed memory is a feature of their lock-in, not a bug.
94
+
95
+ `cc-anywhere` is the local layer that gives that history back to you. User-owned, vendor-neutral, fully on your machine, free.
96
+
97
+ It also exposes that memory to coding agents. A human can use the CLI directly, or an agent can call `--ask`, `--view`, and `--source` on the user's behalf to recover project context before acting.
98
+
99
+ Once installed on a machine, any coding agent that can run local shell commands can theoretically use it as a memory layer. Today that means Claude Code and Codex are the concrete first-class examples; other CLI-capable agents can use the same interface as long as they can execute local commands and read the output.
100
+
101
+ ---
102
+
103
+ ## Build order
104
+
105
+ The product order matters:
106
+
107
+ 1. Nail the CLI
108
+ 2. Nail agent integration
109
+ 3. Add other surfaces only after the core memory loop feels solid
110
+
111
+ That keeps the project anchored on the actual engine: local capture, retrieval, and recall that both humans and coding agents can trust.
112
+
113
+ ---
114
+
115
+ ## Install
116
+
117
+ One command on macOS and Linux (including WSL):
118
+
119
+ ```bash
120
+ pip install cc-anywhere
121
+ cc-anywhere --init
122
+ ```
123
+
124
+ `--init` is idempotent and does three things:
125
+
126
+ 1. Captures every existing Claude Code / Codex / Gemini session into the local SQLite DB and builds the semantic search index.
127
+ 2. Wires SessionStart + Stop hooks into `~/.claude/settings.json` so future sessions auto-load past context and capture on exit. Existing hooks are preserved, never replaced.
128
+ 3. Sets up an hourly capture safety net (launchd on macOS, cron on Linux).
129
+
130
+ Open a fresh Claude Code session — recall fires automatically.
131
+
132
+ ### Platform support
133
+
134
+ | Platform | Install path | Notes |
135
+ |---|---|---|
136
+ | **macOS** | `pip install cc-anywhere && cc-anywhere --init` | Fully automatic. Uses `launchd` for hourly capture. |
137
+ | **Linux** | `pip install cc-anywhere && cc-anywhere --init` | Fully automatic. Uses `crontab` for hourly capture. |
138
+ | **Windows (WSL)** | `pip install cc-anywhere && cc-anywhere --init` (inside WSL) | Identical to Linux. Recommended Windows path. |
139
+ | **Windows (native)** | `pip install cc-anywhere && cc-anywhere --init`, then optional `schtasks` step below | Capture and search work natively. Hourly scheduler needs one manual step. |
140
+
141
+ ### Native Windows: hourly capture step
142
+
143
+ `--init` configures the hooks and runs the initial capture. For the hourly safety net, run this once in PowerShell (no admin needed):
144
+
145
+ ```powershell
146
+ schtasks /create /sc hourly /tn "cc-anywhere capture" /tr "cc-anywhere --capture" /f
147
+ ```
148
+
149
+ You can skip this entirely — the Stop hook still captures after every Claude Code session ends, which covers most cases. The hourly job is a safety net for long-running sessions where Stop never fires.
150
+
151
+ ### Manual commands work the same on every platform
152
+
153
+ Every command below is platform-independent:
154
+
155
+ ```bash
156
+ cc-anywhere --ask "what did we decide about auth?"
157
+ cc-anywhere --semantic-search "topic"
158
+ cc-anywhere --capture
159
+ cc-anywhere --sync-archive # full-history backup
160
+ cc-anywhere --view <chunk_id>
161
+ cc-anywhere --source <chunk_id>
162
+ ```
163
+
164
+ ### Requirements
165
+
166
+ Python 3.8+. Claude Code, Codex CLI, or Gemini CLI installed locally (whichever you use). `git` is required for cross-machine sync but not for local-only use.
167
+
168
+ `cc-anywhere` is the public-facing command name. `claude-anywhere` continues to work as a compatibility alias for users upgrading from earlier versions.
169
+
170
+ ---
171
+
172
+ ## Tips
173
+
174
+ Concrete things you might want to do once it's installed.
175
+
176
+ ### Cross-machine sync (via your own private GitHub repo)
177
+
178
+ Create a private repo on GitHub named `cc-sync` (one-time, free). Then on each machine:
179
+
180
+ ```bash
181
+ cc-anywhere
182
+ # press 's' for setup, enter your GitHub username, accept default repo name
183
+ ```
184
+
185
+ After that:
186
+
187
+ ```bash
188
+ cc-anywhere --sync # push from this machine
189
+ cc-anywhere --pull # receive from others
190
+ ```
191
+
192
+ Sync is **manual** — you control when. A 30-day rolling slice goes to the repo per machine.
193
+
194
+ ### Onboarding a fresh machine to your full history
195
+
196
+ On the *origin* machine (one-time):
197
+
198
+ ```bash
199
+ cc-anywhere --sync-archive
200
+ ```
201
+
202
+ That pushes your **entire** local history (not just 30 days) to the `cc-sync` repo. On the *new* machine:
203
+
204
+ ```bash
205
+ pip install cc-anywhere
206
+ cc-anywhere --init
207
+ cc-anywhere --pull
208
+ ```
209
+
210
+ The archive imports automatically. UUID dedup means you can re-run `--pull` any time without producing duplicates.
211
+
212
+ ### Backing up to an external SSD
213
+
214
+ ```bash
215
+ cc-anywhere --sync-archive --to /Volumes/Backup-SSD/cc-anywhere/
216
+ ```
217
+
218
+ Idempotent — re-running just rewrites the archive with whatever's current. The same command works for any mounted destination.
219
+
220
+ ### Backing up to iCloud / Dropbox / Google Drive / NAS
221
+
222
+ Same command, different path:
223
+
224
+ ```bash
225
+ # iCloud Drive
226
+ cc-anywhere --sync-archive --to ~/Library/Mobile\ Documents/com~apple~CloudDocs/cc-anywhere/
227
+
228
+ # Dropbox / Google Drive (via the desktop client's mounted folder)
229
+ cc-anywhere --sync-archive --to ~/Dropbox/cc-anywhere/
230
+
231
+ # NAS (after you've mounted it as a regular folder)
232
+ cc-anywhere --sync-archive --to /Volumes/NAS-share/cc-anywhere/
233
+ ```
234
+
235
+ Anything that mounts as a regular folder works.
236
+
237
+ ### Automatic backup every Friday
238
+
239
+ Add a `crontab` entry:
240
+
241
+ ```bash
242
+ 0 18 * * 5 /usr/local/bin/cc-anywhere --sync-archive --to /Volumes/Backup-SSD/cc-anywhere/
243
+ ```
244
+
245
+ 6pm every Friday. (Replace the path to `cc-anywhere` with whatever `which cc-anywhere` reports on your machine.)
246
+
247
+ ### Checking what's actually captured
248
+
249
+ ```bash
250
+ cc-anywhere --db-stats
251
+ ```
252
+
253
+ Shows session count, message count, project count, DB size, earliest and latest captures.
254
+
255
+ ### Asking your AI to use cc-anywhere mid-session
256
+
257
+ You usually don't have to. The `SessionStart` hook installed by `--init` auto-loads relevant past context when a Claude Code session begins. But you can also nudge mid-conversation: *"check past decisions on auth"*, and the AI will run `cc-anywhere --ask` for you.
258
+
259
+ ### What's local-only vs. what gets synced
260
+
261
+ | Stays local | Synced to your `cc-sync` repo |
262
+ |---|---|
263
+ | `~/.cc-anywhere-sessions.db` (full SQLite DB) | A 30-day rolling slice per machine via `--sync` |
264
+ | Semantic search index | The full archive snapshot via `--sync-archive` |
265
+ | Raw JSONL transcripts on disk | — |
266
+
267
+ `--sync` is for cross-machine continuity; `--sync-archive` is for off-disk backup and onboarding new machines. Both are manual; nothing leaves your machine without a command you ran.
268
+
269
+ ### Build a permanent history — before it's gone
270
+
271
+ Without cc-anywhere, your AI coding history is at the mercy of each tool's retention policy. Claude Code's `cleanupPeriodDays` defaults to 30 days; Codex and Gemini have their own retention behaviors. **Anything pruned before cc-anywhere captures it is gone forever.** No recovery.
272
+
273
+ With cc-anywhere installed, every captured conversation is persisted permanently in your local SQLite database, independent of any tool's retention. You're actively building a long-term archive of your project work — preserved across sessions, machines, and assistants. The earlier you install, the more history you keep.
274
+
275
+ If you want maximum coverage of your existing data before cc-anywhere's first run, bump `cleanupPeriodDays` in `~/.claude/settings.json` to a larger value (e.g. `365`) first.
276
+
277
+ ### What's not yet supported
278
+
279
+ Direct integrations with cloud-storage APIs (Cloudflare R2, S3, Backblaze B2) are planned but not yet implemented. Until then, mount the cloud storage as a folder on your machine and use the filesystem path with `--sync-archive --to <path>`.
280
+
281
+ ---
282
+
283
+ ## Presently supported
284
+
285
+ Today there are two different support questions:
286
+
287
+ 1. **Which tools can `cc-anywhere` capture memory from?**
288
+ 2. **Which tools can call `cc-anywhere` after it is installed?**
289
+
290
+ ### Capture sources supported today
291
+
292
+ These transcript sources are captured and indexed now:
293
+
294
+ | Source | Status | Notes |
295
+ |---|---|---|
296
+ | Claude Code | ✅ | Main session transcripts under `~/.claude/projects/*.jsonl` |
297
+ | Claude Cowork | ✅ | Local-agent transcripts under `~/Library/Application Support/Claude/local-agent-mode-sessions/**/.claude/projects/*/*.jsonl` |
298
+ | Codex CLI / Codex Desktop | ✅ | Rollout logs under `~/.codex/sessions/.../*.jsonl` |
299
+
300
+ ### Search assistants supported today
301
+
302
+ These tools can use `cc-anywhere` as a search assistant and memory layer today, as long as they can run local shell commands and read the output:
303
+
304
+ | Tool | Status | Notes |
305
+ |---|---|---|
306
+ | Claude Code | ✅ | Can call `--ask`, `--db-search`, `--semantic-search`, `--view`, and `--source` directly or through slash-command / memory workflows |
307
+ | Codex CLI | ✅ | Can call the same commands directly; the `threaded` skill makes this feel automatic |
308
+ | Codex Desktop | ✅ | Same local CLI contract as Codex CLI |
309
+ | Gemini CLI and other CLI-capable coding agents | In theory ✅ | They can use `cc-anywhere` as a search assistant once installed; capture support depends on their own local transcript format |
310
+
311
+ ### Not captured yet
312
+
313
+ These are intentionally not first-class capture sources yet:
314
+
315
+ | Source | Status |
316
+ |---|---|
317
+ | Claude Code subagents (`*/subagents/*.jsonl`) | ⏳ planned |
318
+ | Codex child/agent traces outside rollout logs | ⏳ investigate |
319
+ | Cursor | ⏳ planned |
320
+ | Continue.dev | ⏳ planned |
321
+ | GitHub Copilot Chat | ⏳ planned |
322
+
323
+ The important distinction is that **calling** `cc-anywhere` and **being captured by** `cc-anywhere` are different things. A tool might be able to use it as a search assistant today even if we do not yet ingest that tool's own transcript history.
324
+
325
+ ---
326
+
327
+ ## First five minutes
328
+
329
+ ```bash
330
+ # Snapshot every Claude Code + Codex session into the local DB
331
+ cc-anywhere --capture
332
+
333
+ # Build the natural-language search index
334
+ cc-anywhere --index-semantic
335
+
336
+ # Search by keyword
337
+ cc-anywhere --db-search "verification customer"
338
+
339
+ # Or in natural language
340
+ cc-anywhere --ask "when did we discuss the MCP wrapper?"
341
+
342
+ # Drill into a result, then jump back to the raw transcript source
343
+ cc-anywhere --view <chunk_id>
344
+ cc-anywhere --source <chunk_id>
345
+
346
+ # See your project list
347
+ cc-anywhere --list
348
+
349
+ # Or open the interactive dashboard
350
+ cc-anywhere
351
+ ```
352
+
353
+ That's the whole CLI surface that matters for daily use. The same commands also form a retrieval interface for coding agents.
354
+
355
+ ---
356
+
357
+ ## Make it automatic
358
+
359
+ The single highest-leverage move is wiring `--capture` and `--index-semantic` into Claude Code's Stop hook so the index stays current without you thinking about it. Append to your Stop hook script (e.g. `~/.claude/scripts/snapshot-memory.sh`):
360
+
361
+ ```bash
362
+ if command -v cc-anywhere >/dev/null 2>&1; then
363
+ cc-anywhere --capture >> "$HOME/.claude-memory-archive/.last-capture.log" 2>&1 || true
364
+ cc-anywhere --index-semantic >> "$HOME/.claude-memory-archive/.last-index-semantic.log" 2>&1 || true
365
+ fi
366
+ ```
367
+
368
+ For long-running sessions that never end cleanly, also add a hourly launchd / cron job that runs the same two commands. Both steps are incremental — only new messages are processed — so the cost stays small as your corpus grows.
369
+
370
+ ---
371
+
372
+ ## Pair with Claude Code and Codex
373
+
374
+ Three custom slash commands at `~/.claude/commands/` give you `/digest`, `/projects`, and `/memory <query>` from any Claude Code session.
375
+
376
+ A Codex skill at `~/.codex/skills/threaded/SKILL.md` does the same for Codex sessions — phrases like *"what did we decide last week?"* trigger the search automatically.
377
+
378
+ Both surfaces call the same local database. Memory written by one assistant is visible to the other.
379
+
380
+ The important architectural point is that agents do not need to inspect SQLite directly. They can use:
381
+
382
+ ```bash
383
+ cc-anywhere --ask "what did we decide about auth?"
384
+ cc-anywhere --view <chunk_id>
385
+ cc-anywhere --source <chunk_id>
386
+ ```
387
+
388
+ That makes `cc-anywhere` both a human CLI and a stable memory interface for coding agents.
389
+
390
+ In practical terms, any coding agent with local CLI access can call that interface after install. The retrieval contract is vendor-neutral even though the current capture sources started with Claude Code and Codex.
391
+
392
+ ---
393
+
394
+ ## What it captures
395
+
396
+ | Source | Status |
397
+ |---|---|
398
+ | Claude Code (`~/.claude/projects/*.jsonl`) | ✅ |
399
+ | Claude Cowork (`~/Library/Application Support/Claude/local-agent-mode-sessions/**/.claude/projects/*/*.jsonl`) | ✅ |
400
+ | Codex CLI (`~/.codex/sessions/.../*.jsonl`) | ✅ |
401
+ | Claude Code subagents (`*/subagents/*.jsonl`) | ⏳ planned |
402
+ | Codex child/agent traces outside rollout logs | ⏳ investigate |
403
+ | Cursor | ⏳ planned |
404
+ | Continue.dev | ⏳ planned |
405
+ | GitHub Copilot Chat | ⏳ planned |
406
+
407
+ Capture is incremental, file-offset tracked, and resilient to context compaction (the JSONL on disk is append-only — `/compact` does not destroy history, so the full record stays searchable).
408
+
409
+ Tool calls and their outputs are not captured — text only — to keep the index focused on what humans wrote and what assistants said in prose.
410
+
411
+ Subagent transcripts are a future expansion. The current capture path indexes the main Claude Code session logs, Claude Cowork local-agent transcripts, and Codex rollout logs; nested Claude Code `subagents/*.jsonl` files and any Codex child-agent traces stored outside the rollout logs are intentionally left for a later pass so the opener stays focused.
412
+
413
+ ---
414
+
415
+ ## What it does not do
416
+
417
+ - **It does not replace the AI's own memory.** It is the layer underneath that — the one that survives context windows, vendor changes, and machine reinstalls.
418
+ - **It does not send your data anywhere by default.** Everything is local. If you opt into sync, only lightweight metadata travels (full conversations stay on your machine).
419
+ - **It does not require any AI provider account.** It reads what's already on disk.
420
+
421
+ ---
422
+
423
+ ## Beyond the basics
424
+
425
+ Once the daily loop is working, the dashboard, sync, digests, and architecture are useful in this order:
426
+
427
+ - **`cc-anywhere --weekly`** / **`--monthly`** — activity reports with project breakdowns and daily-activity bar charts
428
+ - **`cc-anywhere --setup`** — wires up cross-machine sync via a private GitHub repo (lightweight metadata only)
429
+ - **`cc-anywhere`** (no args) — interactive dashboard with pickup-prompt generation
430
+ - **`cc-anywhere --backfill-sources`** — links older DB rows to their raw JSONL transcript paths so `--source` works on the back catalogue
431
+ - **`cc-anywhere --index-semantic --rebuild`** — opt-in full re-index (rare; use after corruption)
432
+
433
+ For the layered architecture (Layer 1 capture sources → Layer 2 archive → Layer 3 this tool → Layer 4 Threaded the deployed edition → Layer 5 surfaces), see the architecture document at `~/Documents/Projects/MEMORY-ARCHITECTURE.md`.
434
+
435
+ ---
436
+
437
+ ## Status
438
+
439
+ - **Version:** 1.1.0
440
+ - **License:** Apache-2.0
441
+ - **Source:** [github.com/abecouse/cc-anywhere](https://github.com/abecouse/cc-anywhere)
442
+ - **Author:** Abe Couse
443
+
444
+ Threaded — the deployed, multi-machine, MCP-exposed version of this same memory layer — is the next album. `cc-anywhere` is the live local edition. Same chorus.