@cachly-dev/mcp-server 0.10.27 → 0.10.41

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 (79) hide show
  1. package/.env.test.example +23 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +50 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +25 -0
  5. package/.github/workflows/publish.yml +72 -0
  6. package/CHANGELOG.md +252 -0
  7. package/LAUNCH_TEXTS.md +182 -0
  8. package/LICENSE +202 -0
  9. package/README.md +145 -115
  10. package/dist/__tests__/auth.test.d.ts +1 -0
  11. package/dist/__tests__/auth.test.js +107 -0
  12. package/dist/__tests__/auth.test.js.map +1 -0
  13. package/dist/__tests__/e2e/api-auth.test.d.ts +7 -0
  14. package/dist/__tests__/e2e/api-auth.test.js +162 -0
  15. package/dist/__tests__/e2e/api-auth.test.js.map +1 -0
  16. package/dist/__tests__/e2e/api-health.test.d.ts +7 -0
  17. package/dist/__tests__/e2e/api-health.test.js +95 -0
  18. package/dist/__tests__/e2e/api-health.test.js.map +1 -0
  19. package/dist/__tests__/e2e/cli.test.d.ts +10 -0
  20. package/dist/__tests__/e2e/cli.test.js +204 -0
  21. package/dist/__tests__/e2e/cli.test.js.map +1 -0
  22. package/dist/__tests__/e2e/config.d.ts +35 -0
  23. package/dist/__tests__/e2e/config.js +53 -0
  24. package/dist/__tests__/e2e/config.js.map +1 -0
  25. package/dist/__tests__/e2e/funnel.test.d.ts +13 -0
  26. package/dist/__tests__/e2e/funnel.test.js +90 -0
  27. package/dist/__tests__/e2e/funnel.test.js.map +1 -0
  28. package/dist/__tests__/e2e/mcp-tools.test.d.ts +7 -0
  29. package/dist/__tests__/e2e/mcp-tools.test.js +129 -0
  30. package/dist/__tests__/e2e/mcp-tools.test.js.map +1 -0
  31. package/dist/__tests__/e2e/provisioning.test.d.ts +15 -0
  32. package/dist/__tests__/e2e/provisioning.test.js +123 -0
  33. package/dist/__tests__/e2e/provisioning.test.js.map +1 -0
  34. package/dist/handlers/advanced.js +38 -227
  35. package/dist/handlers/advanced.js.map +1 -1
  36. package/dist/handlers/brain.js +146 -82
  37. package/dist/handlers/brain.js.map +1 -1
  38. package/dist/handlers/fedbrain.js +93 -44
  39. package/dist/handlers/fedbrain.js.map +1 -1
  40. package/dist/handlers/roadmap.js +8 -2
  41. package/dist/handlers/roadmap.js.map +1 -1
  42. package/dist/handlers/syndicate.js +15 -7
  43. package/dist/handlers/syndicate.js.map +1 -1
  44. package/dist/handlers/team.js +62 -50
  45. package/dist/handlers/team.js.map +1 -1
  46. package/dist/index.js +1264 -234
  47. package/dist/index.js.map +1 -1
  48. package/dist/tools.d.ts +3 -54
  49. package/dist/tools.js +8 -62
  50. package/dist/tools.js.map +1 -1
  51. package/eslint.config.js +16 -0
  52. package/glama.json +36 -0
  53. package/llms.txt +155 -0
  54. package/package.json +38 -32
  55. package/scripts/e2e-run.sh +160 -0
  56. package/scripts/postinstall.js +12 -12
  57. package/server.json +3 -9
  58. package/smithery.yaml +15 -8
  59. package/src/__tests__/auth.test.ts +147 -0
  60. package/src/__tests__/e2e/api-auth.test.ts +182 -0
  61. package/src/__tests__/e2e/api-health.test.ts +103 -0
  62. package/src/__tests__/e2e/cli.test.ts +228 -0
  63. package/src/__tests__/e2e/config.ts +53 -0
  64. package/src/__tests__/e2e/funnel.test.ts +99 -0
  65. package/src/__tests__/e2e/mcp-tools.test.ts +191 -0
  66. package/src/__tests__/e2e/provisioning.test.ts +128 -0
  67. package/src/handlers/advanced.ts +37 -217
  68. package/src/handlers/brain.ts +143 -78
  69. package/src/handlers/fedbrain.ts +88 -38
  70. package/src/handlers/roadmap.ts +7 -2
  71. package/src/handlers/syndicate.ts +13 -7
  72. package/src/handlers/team.ts +57 -33
  73. package/src/index.ts +1312 -257
  74. package/src/tools.ts +8 -66
  75. package/vitest.config.ts +12 -0
  76. package/dist/__tests__/brain-predict-failures.test.d.ts +0 -17
  77. package/dist/__tests__/brain-predict-failures.test.js +0 -339
  78. package/dist/__tests__/brain-predict-failures.test.js.map +0 -1
  79. package/src/__tests__/brain-predict-failures.test.ts +0 -430
@@ -0,0 +1,23 @@
1
+ # E2E test environment variables — copy to .env.test and fill in values.
2
+ # Run: cp .env.test.example .env.test && npx vitest run src/__tests__/e2e/
3
+
4
+ # API base URL (default: production API)
5
+ E2E_API_URL=https://api.cachly.dev
6
+
7
+ # Valid Keycloak JWT or long-lived API key (cky_live_...)
8
+ # Get from: cachly.dev/instances → Settings → API Token
9
+ E2E_JWT=
10
+
11
+ # UUID of an active (running) Brain instance for this token
12
+ E2E_INSTANCE_ID=
13
+
14
+ # Redis password for the test instance (from connection details)
15
+ E2E_API_KEY=
16
+
17
+ # Redis host and port for the test instance
18
+ E2E_REDIS_HOST=
19
+ E2E_REDIS_PORT=6380
20
+ E2E_REDIS_TLS=true
21
+
22
+ # Set to "true" to skip slow tests (provisioning, device flow)
23
+ E2E_SKIP_SLOW=false
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: Bug report
3
+ about: Something isn't working as expected
4
+ title: '[bug] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## What happened?
10
+
11
+ <!-- Describe the bug clearly. -->
12
+
13
+ ## Steps to reproduce
14
+
15
+ 1.
16
+ 2.
17
+ 3.
18
+
19
+ ## Expected behavior
20
+
21
+ <!-- What should have happened? -->
22
+
23
+ ## Brain doctor output
24
+
25
+ Run `brain_doctor` in your AI assistant and paste the output here.
26
+
27
+ <details>
28
+ <summary>brain_doctor output</summary>
29
+
30
+ ```
31
+ (paste here)
32
+ ```
33
+ </details>
34
+
35
+ ## Environment
36
+
37
+ - Package version: <!-- `npm list @cachly-dev/mcp-server` -->
38
+ - Editor / AI assistant: <!-- Claude Code / Cursor / Windsurf / etc. -->
39
+ - OS: <!-- macOS / Linux / Windows -->
40
+ - Node version: <!-- `node --version` -->
41
+
42
+ ## Logs
43
+
44
+ <details>
45
+ <summary>Relevant logs or error output</summary>
46
+
47
+ ```
48
+ (paste here)
49
+ ```
50
+ </details>
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://cachly.dev/docs/mcp
5
+ about: Read the full MCP server docs
6
+ - name: Discord / Community
7
+ url: https://cachly.dev/discord
8
+ about: Ask questions and share what you've built
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new tool, behavior, or improvement
4
+ title: '[feat] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## What problem does this solve?
10
+
11
+ <!-- Describe the pain point clearly. What can't you do today that you wish you could? -->
12
+
13
+ ## Proposed solution
14
+
15
+ <!-- How would you like it to work? Be specific — tool name, input/output, behavior. -->
16
+
17
+ ## Alternatives you've considered
18
+
19
+ <!-- What workarounds are you using now? What else did you consider? -->
20
+
21
+ ## Context
22
+
23
+ - Tool(s) involved: <!-- e.g. smart_recall, causal_trace, brain_predict -->
24
+ - Editor / AI assistant: <!-- Claude Code / Cursor / Windsurf / etc. -->
25
+ - Use case: <!-- team / solo / CI / other -->
@@ -0,0 +1,72 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write # needed to create GitHub Releases
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: '20'
19
+ registry-url: 'https://registry.npmjs.org'
20
+
21
+ - name: Install dependencies
22
+ run: npm install --ignore-scripts
23
+
24
+ - name: Test
25
+ run: npm test
26
+
27
+ - name: Build
28
+ run: npm run build
29
+
30
+ - name: Check if version is already published
31
+ id: version_check
32
+ run: |
33
+ PKG_VERSION=$(node -p "require('./package.json').version")
34
+ echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
35
+ if npm view "@cachly-dev/mcp-server@$PKG_VERSION" version &>/dev/null; then
36
+ echo "skip=true" >> $GITHUB_OUTPUT
37
+ echo "Version $PKG_VERSION already published — skipping."
38
+ else
39
+ echo "skip=false" >> $GITHUB_OUTPUT
40
+ echo "Version $PKG_VERSION is new — will publish."
41
+ fi
42
+
43
+ - name: Extract CHANGELOG notes
44
+ if: steps.version_check.outputs.skip == 'false'
45
+ id: changelog
46
+ run: |
47
+ VERSION="${{ steps.version_check.outputs.version }}"
48
+ # Extract section for this version from CHANGELOG.md
49
+ NOTES=$(awk "/^## \[?${VERSION}\]?/{found=1; next} found && /^## /{exit} found{print}" CHANGELOG.md | sed '/^[[:space:]]*$/d' | head -60)
50
+ if [ -z "$NOTES" ]; then
51
+ NOTES="See [CHANGELOG.md](https://github.com/cachly-dev/cachly-mcp/blob/main/CHANGELOG.md) for details."
52
+ fi
53
+ # Write to file to avoid env var quoting issues
54
+ echo "$NOTES" > /tmp/release-notes.md
55
+ echo "See the [CHANGELOG](https://github.com/cachly-dev/cachly-mcp/blob/main/CHANGELOG.md) for full details." >> /tmp/release-notes.md
56
+
57
+ - name: Publish
58
+ if: steps.version_check.outputs.skip == 'false'
59
+ run: npm publish --access public
60
+ env:
61
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62
+
63
+ - name: Create GitHub Release
64
+ if: steps.version_check.outputs.skip == 'false'
65
+ env:
66
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67
+ run: |
68
+ VERSION="${{ steps.version_check.outputs.version }}"
69
+ gh release create "v${VERSION}" \
70
+ --title "v${VERSION}" \
71
+ --notes-file /tmp/release-notes.md \
72
+ --latest
package/CHANGELOG.md CHANGED
@@ -7,6 +7,258 @@
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.10.38] – 2026-05-25
11
+
12
+ ### `cachly status` — Brain health at a glance
13
+
14
+ - New CLI command `npx @cachly-dev/mcp-server@latest status`: shows lessons, recalls, quality score, Brain level, team contributors (with count), and your personal invite link — all in one terminal card.
15
+
16
+ ---
17
+
18
+ ## [0.10.37] – 2026-05-25
19
+
20
+ ### Viral wow moments — invite link + first-recall tweet button
21
+
22
+ - **`cachly invite` fixed** — previously called a non-existent `/api/v1/team/invite` endpoint (always 404). Now calls `GET /api/v1/referral/me` and shows your personal referral link with pre-written Slack DM + tweet text. One command = shareable invite.
23
+ - **First-recall email** — the "Your AI just remembered" email now includes a one-click `𝕏 Share this moment` tweet button and a `🤝 Share with your team` section with your personal referral link (shows only if referral code exists). The highest-value wow moment now has a viral exit.
24
+
25
+ ---
26
+
27
+ ## [0.10.36] – 2026-05-25
28
+
29
+ ### ESLint flat-config (ESLint 10 / v9 API)
30
+
31
+ - Added `eslint` v9 and `typescript-eslint` v8 as devDependencies.
32
+ - Created `eslint.config.js` using ESLint flat-config API — replaces the legacy `--ext .ts` syntax that broke with ESLint 10.
33
+ - Updated lint script: `eslint src --ext .ts` → `eslint src`.
34
+ - Rules: `no-explicit-any` warn, `no-unused-vars` warns but ignores `_`-prefixed params.
35
+
36
+ ---
37
+
38
+ ## [0.10.35] – 2026-05-25
39
+
40
+ ### Docs catch-up
41
+
42
+ - Backfilled CHANGELOG entries for 0.10.25–0.10.34 (they were missing).
43
+ - README now documents the `index` and `learn-git` CLI commands plus the PR-merge auto-learn GitHub Action tip.
44
+
45
+ ---
46
+
47
+ ## [0.10.34] – 2026-05-25
48
+
49
+ ### `learn-git` CLI — auto-learn from commits (PR-merge ready)
50
+
51
+ - New command `npx @cachly-dev/mcp-server learn-git [./repo] [--max-commits N]` runs `brain_from_git` over recent commits and fires the `brain_from_git` telemetry event. Building block for PR-merge auto-learning in CI.
52
+
53
+ ---
54
+
55
+ ## [0.10.33] – 2026-05-25
56
+
57
+ ### Close the setup funnel
58
+
59
+ - The setup wizard now fires `setup_completed` at the end of a successful run (with `instance_id` + JWT attribution), so the onboarding funnel `setup_started → setup_completed` is finally traceable.
60
+
61
+ ---
62
+
63
+ ## [0.10.32] – 2026-05-25
64
+
65
+ ### Viral moments: shareable digest card + team first-briefing
66
+
67
+ - `cachly digest` now prints a tweet-ready card with a pre-filled X/Twitter URL (lessons, recalls, tokens saved, top lesson, brain level).
68
+ - **Team-virality**: when `session_start` runs for a user who has lessons from teammates but has never seen them, a one-time "Your team's AI brain has been briefing you" section surfaces exactly which teammate solved what.
69
+
70
+ ---
71
+
72
+ ## [0.10.31] – 2026-05-25
73
+
74
+ ### Unblock npm publish — tests green
75
+
76
+ - `vitest.config.ts` excludes `**/__tests__/e2e/**` from the unit-test suite (E2E tests require live credentials and were failing CI, blocking every publish since 0.10.27).
77
+ - CLI with no args now writes the setup banner to **stdout** and exits 0 (was stderr + exit 1, invisible to callers).
78
+ - `process.exit(0)` guarded with an `_isMain` check so importing modules never trigger early exit.
79
+
80
+ ---
81
+
82
+ ## [0.10.30] – 2026-05-24
83
+
84
+ ### CLAUDE.md delivers a visible briefing
85
+
86
+ - CLAUDE.md template now calls `session_start` (with `workspace_path`) as the first action of every conversation and `session_end` as the last, so the brain briefing is visible to the user instead of running silently.
87
+
88
+ ---
89
+
90
+ ## [0.10.29] – 2026-05-24
91
+
92
+ ### Fix: recall counting + git bootstrap actually fires
93
+
94
+ - `smart_recall` (the primary recall tool in CLAUDE.md) now also fires `recall_best_solution` when it returns lessons, so `BrainRecallCount` reflects real usage.
95
+ - Auto-session-start now passes `process.cwd()` as `workspace_path` so the git auto-bootstrap introduced in 0.10.28 actually triggers.
96
+
97
+ ---
98
+
99
+ ## [0.10.28] – 2026-05-24
100
+
101
+ ### Auto-bootstrap the brain from git on first session
102
+
103
+ - On a first session with a `workspace_path`, `brain_from_git` runs automatically and its summary is appended inline to the `session_start` briefing — the brain learns from your repo history with zero setup.
104
+
105
+ ---
106
+
107
+ ## [0.10.27] – 2026-05-24
108
+
109
+ ### Fix: session_start counts as a recall
110
+
111
+ - `session_start` now fires `recall_best_solution` when the brain has lessons (not the first-session welcome), so the dashboard activation nudge clears and the first-recall email fires for active users.
112
+
113
+ ---
114
+
115
+ ## [0.10.26] – 2026-05-14
116
+
117
+ ### Fix: brain_from_git + brain_predict telemetry
118
+
119
+ - `brain_from_git` and `brain_predict` telemetry events were dead code paths and never fired; both now correctly send per-tool telemetry.
120
+
121
+ ---
122
+
123
+ ## [0.10.25] – 2026-05-14
124
+
125
+ ### Per-tool telemetry events for all brain tools
126
+
127
+ - Every brain tool (`session_start`, `session_end`, `learn_from_attempts`, `smart_recall`, `recall_best_solution`) now emits a dedicated telemetry event for accurate funnel + report breakdowns.
128
+
129
+ ---
130
+
131
+ ## [0.10.24] – 2026-05-14
132
+
133
+ ### Funnel visibility + server.json version sync
134
+
135
+ - `first_call_success` now includes `instance_id` for full per-tenant attribution in the `mcp_events` table.
136
+ - `server.json` version bumped to 0.10.24 — Smithery and MCP directory indexes now show the current version.
137
+
138
+ ---
139
+
140
+ ## [0.10.23] – 2026-05-14
141
+
142
+ ### Full activation funnel + UTM tracking
143
+
144
+ - **`sendFunnelEvent` carries JWT**: all funnel events (`setup_started`, `device_flow_completed`, `first_call_success`) now include the JWT so the backend can resolve them to a tenant. Activation funnel is now fully attributable per user.
145
+ - **`cachly share` UTM link**: the generated tweet now includes `https://cachly.dev?ref=share&utm_source=x&utm_medium=social&utm_campaign=cli-share` so shares can be traced back to new signups.
146
+
147
+ ---
148
+
149
+ ## [0.10.22] – 2026-05-14
150
+
151
+ ### Activation telemetry, health Redis ping, join backup
152
+
153
+ - **`first_call_success` telemetry**: fires once per process on the first successful brain/context tool call. Combined with `setup_started → device_flow_completed → first_call_success`, the full activation funnel is now visible.
154
+ - **`cachly health` Redis PING**: section 3 now opens an actual Redis connection and sends `PING` — verifies end-to-end connectivity, not just instance metadata.
155
+ - **`cachly join` corrupt JSON**: backs up corrupted config files to `.bak` before overwriting, matching the `mergeMcpConfig` behavior.
156
+
157
+ ---
158
+
159
+ ## [0.10.21] – 2026-05-14
160
+
161
+ ### Stability hardening — corrupt configs, silent auth failures, upgrade validation
162
+
163
+ - **`mergeMcpConfig` corrupt JSON**: instead of silently overwriting, backs up the corrupted file to `.bak` and prints a warning so the user knows their previous config was preserved.
164
+ - **`getConnection` auth failure**: if the `/connection` endpoint returns 401/403, throws an actionable "run `cachly setup` to refresh credentials" error instead of silently attempting a password-less Redis connect that fails with cryptic `NOAUTH`.
165
+ - **`upgrade` version validation**: validates that the npm registry response contains a valid semver string before comparing — prevents false "update available" from a malformed registry response.
166
+
167
+ ---
168
+
169
+ ## [0.10.20] – 2026-05-14
170
+
171
+ ### Edge case hardening — silent failures eliminated
172
+
173
+ - **`getConnection` status messages**: `failed`, `suspended`, and `pending_payment` now each get a specific actionable message instead of the generic "not reachable" fallback. Users know exactly what happened and where to go to fix it.
174
+ - **`setup` write errors**: config file write failures now print a clear warning with the OS error and a recovery hint instead of silently succeeding.
175
+ - **`join` write errors**: permission and unexpected filesystem errors are surfaced per-file instead of silently swallowed. Expected "editor not installed" cases are still quiet.
176
+ - **Auto-provision telemetry**: if free-tier auto-provision returns a non-2xx response, a `auto_provision_failed` telemetry event fires so the team can detect new-user activation failures in real time.
177
+
178
+ ---
179
+
180
+ ## [0.10.19] – 2026-05-14
181
+
182
+ ### Fix: accurate provisioning time estimate
183
+
184
+ - `getConnection` no longer says "30 seconds" — the message now correctly says "1–3 minutes" for first-time provisioning. This prevents users from thinking their instance failed just because the first tool call waited 25 s and still saw `provisioning`.
185
+ - Dashboard instance detail page provisioning banner updated to match ("1–3 minutes" instead of "under 60 seconds").
186
+
187
+ ---
188
+
189
+ ## [0.10.17] – 2026-05-14
190
+
191
+ ### `cachly upgrade` — check for newer versions
192
+
193
+ - **`cachly upgrade`** — fetches the latest version from the npm registry and compares with the running version. If outdated, shows current vs. latest and the one-liner to update (`npx @cachly-dev/mcp-server@latest setup`). No auth required.
194
+ - Added `upgrade` to no-auth bypass list and splash screen.
195
+
196
+ ### Dashboard — Brain Badge widget
197
+
198
+ - Instance detail page now shows a live badge preview + copy-ready Markdown and HTML snippets directly in the dashboard. No CLI needed.
199
+ - Badge renders as `![cachly Brain](https://api.cachly.dev/api/v1/badge/<id>)` — one click to copy.
200
+
201
+ ---
202
+
203
+ ## [0.10.16] – 2026-05-14
204
+
205
+ ### `cachly join` — accept a Brain invite in one command
206
+
207
+ - **`cachly join <token>`** — the missing half of the invite loop. Accepts a shared Brain invite link:
208
+ 1. Fetches invite info (public, no auth) — shows Brain name, tier, expiry
209
+ 2. Prompts for confirmation
210
+ 3. If no JWT: starts Device Flow sign-in (browser, 10 s)
211
+ 4. Writes `CACHLY_BRAIN_INSTANCE_ID` into every detected editor MCP config (`.mcp.json`, `.cursor/mcp.json`, `.windsurf/mcp.json`, `.vscode/mcp.json`, `~/.claude/mcp.json`)
212
+ 5. Suggests `cachly badge` as next step
213
+ - Added `join` to no-auth bypass list
214
+ - Splash screen updated to list `join` command
215
+
216
+ ### MCP Directory metadata
217
+
218
+ - **`smithery.yaml`** — added `name` + `description` block for Smithery listing quality
219
+ - **`glama.json`** — added keywords: `cline`, `zed`, `brain-from-git`, `failure-prediction`, `memory-crystals`, `readme-badge`, `incremental-learning`
220
+ - **`server.json`** — version bumped to `0.10.15`
221
+
222
+ ---
223
+
224
+ ## [0.10.15] – 2026-05-14
225
+
226
+ ### Brain Badge
227
+
228
+ - **`cachly badge`** — new CLI command that outputs the Markdown + HTML snippet for embedding a live lesson-count badge in any README or website. Badge SVG served by `GET /api/v1/badge/:instanceId` (public, no auth, rate-limited 30 req/min, result cached 1 h in instance Valkey). Badge shows lesson count only — no topic names or content.
229
+ - **Setup CTA** — both setup flows now print `npx ... badge` as the next suggested action after successful configuration.
230
+ - **README** — Brain Badge section added with copy-paste Markdown snippet and explanation. Badge shield added to header.
231
+
232
+ ---
233
+
234
+ ## [0.10.8] – 2026-05-14
235
+
236
+ ### Viral CLI — 6 new commands
237
+
238
+ - **`cachly demo`** — zero-signup Brain preview. Reads local `.git/` history, classifies commits by type (fix/feat/security/deploy/refactor/perf), and renders an ASCII table showing commit count, date range, contributors, per-category bar charts, and sample security + bug-fix lessons. No account or token required — works before any sign-in.
239
+
240
+ - **`cachly share`** — shareable ASCII stats card. Fetches live Brain stats (lessons, recalls, tokens/cost saved, Brain level) and generates a tweet-ready text block with `#AIMemory #ClaudeCode #Cursor` hashtags. Requires `CACHLY_JWT`.
241
+
242
+ - **`cachly digest`** — weekly Brain summary. Displays a formatted summary table: lessons stored, recalls performed, tokens saved, estimated cost saved, Brain level, top team contributors, and top-recalled lessons. Includes a crontab snippet for automated Monday morning delivery. Requires `CACHLY_JWT`.
243
+
244
+ - **`cachly invite [email]`** — team referral. Accepts an email address as argument or via interactive prompt, then POSTs to `/api/v1/team/invite`. Handles 409 (already a member) gracefully. Requires `CACHLY_JWT`.
245
+
246
+ - **`cachly health`** — connection check. Validates JWT (decode + expiry), tests API reachability, checks Brain instance status, scans all editor MCP config files (Claude Code, Cursor, Windsurf, VS Code, Zed, Continue), and verifies the git post-commit hook. Exits 1 if any checks fail — CI-friendly.
247
+
248
+ - **No-args splash screen** — running `npx @cachly-dev/mcp-server@latest` in a TTY now shows a violet-framed help card listing all commands instead of silently starting the MCP server.
249
+
250
+ ### brain_from_git — Incremental mode + progress feedback
251
+
252
+ - **Incremental by default** — after the first full run, subsequent calls only process commits since the last ingested SHA (stored in Redis with 90-day TTL). Repeated calls on active repos are near-instant.
253
+ - **Progress output** — reports progress to stderr every ~10% of commits (`⏳ Processing N/total…`) and prints a completion summary (`✅ brain_from_git complete: N/total commits ingested`).
254
+ - New `incremental` boolean parameter (default `true`). Pass `false` to force a full reprocess.
255
+
256
+ ### README
257
+
258
+ - Complete rewrite: `cachly demo` featured at the very top with embedded ASCII preview output, all 6 CLI commands documented, Zed manual-setup section added, competitor table updated, FAQ expanded with incremental `brain_from_git` Q&A.
259
+
260
+ ---
261
+
10
262
  ## [0.10.0] – 2026-05-08
11
263
 
12
264
  ### Zero-Friction Onboarding
@@ -0,0 +1,182 @@
1
+ # Launch Texts — cachly AI Brain
2
+
3
+ ---
4
+
5
+ ## Product Hunt
6
+
7
+ ### Tagline (60 chars max)
8
+ Persistent memory + causal AI for Claude, Cursor & Copilot
9
+
10
+ ### Description (260 chars)
11
+ Your AI forgets everything between sessions. cachly fixes that permanently. One command sets it up: detects your editors, writes all configs, bootstraps lessons from your git history. Free forever. No credentials required.
12
+
13
+ ### Full Description
14
+
15
+ **The problem:** Every morning you re-explain your architecture to your AI. Every bug gets re-researched. Every fix gets re-discovered. The average developer wastes 45 minutes/day on this.
16
+
17
+ **The fix:** `npx @cachly-dev/mcp-server@latest setup`
18
+
19
+ One command. It signs you in (one browser click), detects every editor you have (Claude Code, Cursor, Windsurf, VS Code, Copilot, Cline, Zed), writes the correct config for each, bootstraps your Brain from your git history, and installs a git hook that learns from every future commit automatically.
20
+
21
+ **What your AI gets:**
22
+ - A briefing at every session start: last session, open failures, relevant past fixes
23
+ - Causal root cause analysis: `causal_trace("auth breaks after restart")` → Root cause → Chain → Exact fix from 3 months ago with the command that worked
24
+ - Failure prediction before it happens: `brain_predict` reads your history before every deploy
25
+ - A running "time saved" counter — so you can see the ROI
26
+
27
+ **What makes it different from mem0, MemGPT, etc.:**
28
+ The `causal_trace` tool. No other memory system builds a Causal Knowledge Graph. Most systems store facts. cachly stores WHY things broke and HOW they were fixed — with the full chain of cause and effect. 30 minutes of git blame in one call.
29
+
30
+ **Free forever:** 25 MB, German servers, GDPR-compliant, no credit card.
31
+
32
+ ### First Comment (post immediately after launch)
33
+ Hey PH! 👋
34
+
35
+ I built cachly after watching my AI re-research the same deployment bug for the third time in a month. It had no memory. I did.
36
+
37
+ The thing I'm most proud of: `causal_trace`. You describe a problem in plain English, and it walks your Brain's Causal Knowledge Graph to find: the root cause, the intermediate failure chain, and the exact fix that worked last time — including the date and the command. Nothing else does this.
38
+
39
+ 5000+ developers are already using the npm package. Would love your feedback on what's missing.
40
+
41
+ **Commands to try after setup:**
42
+ - `causal_trace(problem="[your last bug]")` — see if it already knows the answer
43
+ - `brain_predict(context="about to deploy")` — what will go wrong?
44
+ - `brain_doctor` — Brain health check
45
+
46
+ ---
47
+
48
+ ## Hacker News — Show HN
49
+
50
+ **Title:**
51
+ Show HN: cachly – causal memory for AI coding assistants (MCP server, free)
52
+
53
+ **Text:**
54
+ I built cachly after noticing that my AI re-researched the same bug three times in a month. The context window empties, the memory vanishes.
55
+
56
+ cachly is an MCP server that gives Claude Code, Cursor, Copilot, and Windsurf persistent memory with one command:
57
+
58
+ npx @cachly-dev/mcp-server@latest setup
59
+
60
+ It detects your editors, writes all the MCP configs, bootstraps from your git history, and installs a git hook that learns from every future commit. No credentials needed in any config file — OAuth Device Flow handles auth inline on the first tool call.
61
+
62
+ The part I think is technically interesting: `causal_trace`. Instead of just storing facts like most memory systems, cachly builds a Causal Knowledge Graph — typed edges: `fixes`, `requires`, `co-occurs`, `causes`, `contradicts`. When you describe a problem, it walks the graph to reconstruct the failure chain and surface the exact fix.
63
+
64
+ causal_trace(problem="auth breaks after restart")
65
+ → Root: k8s:namespace-terminating
66
+ → Via: keycloak:jwks-race
67
+ → Fix: PollUntilContextTimeout 3min ← worked March 12
68
+
69
+ Sessions start and end automatically (no manual session_start/session_end). Everything runs in the background.
70
+
71
+ Free tier: 25 MB, German servers, GDPR. Apache-2.0.
72
+
73
+ GitHub: https://github.com/cachly-dev/cachly-mcp
74
+ npm: https://www.npmjs.com/package/@cachly-dev/mcp-server
75
+
76
+ Happy to answer questions about the architecture.
77
+
78
+ ---
79
+
80
+ ## Reddit — r/ClaudeAI
81
+
82
+ **Title:**
83
+ I built persistent memory for Claude Code — no credentials, no config, one command
84
+
85
+ **Text:**
86
+ After the 10th time explaining my project architecture to Claude, I built cachly.
87
+
88
+ **What it does:**
89
+ Run `npx @cachly-dev/mcp-server@latest setup` once. It:
90
+ 1. Signs you in with one browser click (no credentials in config)
91
+ 2. Detects Claude Code, Cursor, Windsurf, VS Code, Cline — writes all configs automatically
92
+ 3. Bootstraps your Brain from your git history right away
93
+ 4. Installs a git hook so every future commit feeds the brain automatically
94
+
95
+ From that point, your AI arrives pre-briefed every session. No `session_start` needed — it's automatic.
96
+
97
+ **The feature I'm most excited about:**
98
+ `causal_trace("auth breaks after restart")` — it doesn't just search for similar lessons, it walks a Causal Knowledge Graph to reconstruct the failure chain and return the exact fix you used before, with commands and file paths.
99
+
100
+ **Free forever** — 25 MB, German servers, GDPR, no credit card.
101
+
102
+ GitHub: https://github.com/cachly-dev/cachly-mcp
103
+
104
+ Would love feedback from this community — what memory features would you most want?
105
+
106
+ ---
107
+
108
+ ## Reddit — r/LocalLLaMA
109
+
110
+ **Title:**
111
+ MCP server that learns from your git history automatically — causal memory for AI coding
112
+
113
+ **Text:**
114
+ Built this for the problem of AI context loss between sessions. Technical highlights:
115
+
116
+ - **Causal Knowledge Graph (CKG):** Typed edges (fixes, requires, co-occurs, causes, contradicts). `causal_trace` walks the graph instead of just doing text similarity.
117
+ - **Continuous Learning Stream:** git post-commit hook + GitHub Actions step. Every commit → lessons extracted automatically. Zero `session_end` calls needed.
118
+ - **brain_predict:** Before deploys, reads your CKG for patterns that match past failures and returns probability-weighted warnings.
119
+ - **Memory Crystals:** Compresses 30-50 sessions into a dense snapshot injected at every session start.
120
+ - **11-language BM25+ search:** EN, DE, FR, ES, IT, PT, ZH, JA, KO, AR, HE — cross-lingual retrieval (e.g. `smart_recall("deploy")` finds デプロイ, 部署, 배포).
121
+
122
+ Works with any MCP host: Claude Code, Cursor, Windsurf, VS Code, Cline, Zed, Continue.dev.
123
+
124
+ Free tier: 25 MB. Apache-2.0. German servers.
125
+
126
+ GitHub: https://github.com/cachly-dev/cachly-mcp
127
+
128
+ ---
129
+
130
+ ## Twitter/X Thread
131
+
132
+ **Tweet 1:**
133
+ Your AI forgets everything between sessions.
134
+ I built the fix.
135
+
136
+ `npx @cachly-dev/mcp-server@latest setup`
137
+
138
+ One command → persistent AI memory across Claude, Cursor, Copilot, Windsurf.
139
+ Free forever. 🧵
140
+
141
+ **Tweet 2:**
142
+ The part that took the longest to build: `causal_trace`
143
+
144
+ You type: "auth breaks after restart"
145
+
146
+ It returns:
147
+ → Root: k8s:namespace-terminating
148
+ → Via: keycloak:jwks-race
149
+ → Fix: PollUntilContextTimeout 3min ← you used this March 12, it worked
150
+
151
+ 30 minutes of git blame. One call.
152
+
153
+ **Tweet 3:**
154
+ How setup works:
155
+ 1. Run the command
156
+ 2. Browser opens → one click sign-in (no password)
157
+ 3. It detects every editor you have
158
+ 4. Writes MCP config for each automatically
159
+ 5. Bootstraps Brain from your git history
160
+ 6. Installs git hook for automatic future learning
161
+
162
+ Restart editor. Done.
163
+
164
+ **Tweet 4:**
165
+ What your AI sees every morning:
166
+
167
+ 🧠 Session Briefing
168
+ ⏱️ Brain saved you ~4h 30m total
169
+ ✅ api:auth — Bearer in header, not cookie
170
+ ✅ docker:build — ARG changes bust cache
171
+ ⚠️ k8s:deploy — namespace terminating race condition
172
+
173
+ 🤝 Your team has 3 new lessons since yesterday
174
+
175
+ **Tweet 5:**
176
+ Free tier: 25 MB, German servers, GDPR-compliant, no credit card.
177
+ Open source: Apache-2.0
178
+
179
+ GitHub: github.com/cachly-dev/cachly-mcp
180
+ npm: @cachly-dev/mcp-server
181
+
182
+ If this saves you time, a ⭐ means a lot.