@cerefox/memory 0.5.0 → 0.5.1
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 +50 -20
- package/dist/bin/cerefox.js +3 -3
- package/docs/guides/connect-agents.md +9 -9
- package/docs/guides/migration-v0.5.md +26 -11
- package/package.json +3 -6
- package/dist/bin/cerefox-mcp.js +0 -29672
package/README.md
CHANGED
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
**User-owned shared memory for AI agents.** The local TypeScript runtime for
|
|
4
4
|
[Cerefox](https://github.com/fstamatelopoulos/cerefox) — a persistent,
|
|
5
|
-
curated knowledge layer that multiple AI tools can read and write
|
|
6
|
-
Postgres + pgvector.
|
|
5
|
+
curated knowledge layer that multiple AI tools can read and write.
|
|
7
6
|
|
|
8
|
-
This package
|
|
7
|
+
> **Cerefox is BYO-storage.** This package is the *client* — the CLI + local
|
|
8
|
+
> MCP server. The knowledge base itself lives in **your own Supabase project**
|
|
9
|
+
> (Postgres + pgvector; free tier works). Installing this npm package does
|
|
10
|
+
> **not** give you a working KB on its own; you also need a Supabase project +
|
|
11
|
+
> an embedding API key. The first-run `cerefox init` wires everything together
|
|
12
|
+
> in ~2 minutes once you have those in hand. **See "Before you install"
|
|
13
|
+
> below.**
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
This package contains a single binary, **`cerefox`**:
|
|
16
|
+
|
|
17
|
+
| Subcommand | What it does |
|
|
11
18
|
|---|---|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
19
|
+
| `cerefox <command>` | CLI — search, ingest, list, version-history, audit-log, lifecycle (`init`, `doctor`, `configure-agent`, `self-update`). Callable from any directory. |
|
|
20
|
+
| `cerefox mcp` | Local stdio MCP server. Drop-in for Claude Code, Cursor, Claude Desktop, Codex CLI, Gemini CLI. Exposes the same 10 MCP tools as the remote `cerefox-mcp` Edge Function. |
|
|
14
21
|
|
|
15
22
|
> **What this package isn't:** the source of truth for Cerefox's architecture
|
|
16
23
|
> or docs. Those live in the [GitHub repo](https://github.com/fstamatelopoulos/cerefox).
|
|
@@ -18,37 +25,59 @@ This package contains two binaries:
|
|
|
18
25
|
|
|
19
26
|
---
|
|
20
27
|
|
|
28
|
+
## Before you install
|
|
29
|
+
|
|
30
|
+
Cerefox is a self-hosted memory layer. To use it you need three things, none
|
|
31
|
+
of which this npm package brings with it:
|
|
32
|
+
|
|
33
|
+
| Prerequisite | Why | How |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| A **Supabase project** | The knowledge base (documents + chunks + embeddings) lives in your Supabase project's Postgres database, with pgvector for semantic search. Free tier is enough for most personal use. | Sign up at [supabase.com](https://supabase.com), create a project, then follow the [Supabase setup guide](https://github.com/fstamatelopoulos/cerefox/blob/main/docs/guides/setup-supabase.md) — deploy the Cerefox schema (one script), then deploy the Edge Functions (one command). Estimate: 10–15 minutes the first time. |
|
|
36
|
+
| An **embedding API key** | Cerefox embeds your documents for semantic search. OpenAI's `text-embedding-3-small` is the default; Fireworks AI is an alternative. | Get an [OpenAI API key](https://platform.openai.com/api-keys) — costs are pennies/month for typical personal use (see [operational-cost.md](https://github.com/fstamatelopoulos/cerefox/blob/main/docs/guides/operational-cost.md)). |
|
|
37
|
+
| **Node ≥ 20** or **Bun ≥ 1.0** | Runtime for the `cerefox` bin (and the bundled `cerefox mcp` server). | [nodejs.org](https://nodejs.org) or [bun.sh](https://bun.sh). The one-line installer below bootstraps Bun for you if neither is present. |
|
|
38
|
+
|
|
39
|
+
If you don't yet have Supabase + an OpenAI key, the [Cerefox
|
|
40
|
+
quickstart](https://github.com/fstamatelopoulos/cerefox/blob/main/docs/guides/quickstart.md)
|
|
41
|
+
walks through the whole setup in one place.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
21
45
|
## Install
|
|
22
46
|
|
|
47
|
+
Once you have the prerequisites above in hand:
|
|
48
|
+
|
|
23
49
|
```bash
|
|
24
|
-
# One-line install (recommended on a fresh machine):
|
|
50
|
+
# One-line install (recommended on a fresh machine; bootstraps Bun if needed):
|
|
25
51
|
curl -fsSL https://github.com/fstamatelopoulos/cerefox/releases/latest/download/install.sh | sh
|
|
26
52
|
|
|
27
|
-
#
|
|
53
|
+
# Or direct (any of these):
|
|
28
54
|
bun install -g @cerefox/memory
|
|
29
55
|
npm install -g @cerefox/memory
|
|
30
56
|
pnpm add -g @cerefox/memory
|
|
31
57
|
yarn global add @cerefox/memory
|
|
32
58
|
```
|
|
33
59
|
|
|
34
|
-
Runtime requirements: **Node ≥ 20** or **Bun ≥ 1.0**.
|
|
35
|
-
|
|
36
60
|
---
|
|
37
61
|
|
|
38
62
|
## First-run setup
|
|
39
63
|
|
|
40
64
|
```bash
|
|
41
|
-
cerefox init # 5-step interactive bootstrap (Supabase
|
|
65
|
+
cerefox init # 5-step interactive bootstrap (asks for Supabase URL,
|
|
66
|
+
# Supabase key, OpenAI key, optional Postgres URL, identity)
|
|
42
67
|
cerefox doctor # verify everything reaches
|
|
43
68
|
```
|
|
44
69
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
70
|
+
`cerefox init` prompts for the credentials you collected above, validates them
|
|
71
|
+
against the live services, writes `~/.cerefox/.env` (chmod 0600), and
|
|
72
|
+
optionally wires up an MCP client. **It does not create the Supabase project
|
|
73
|
+
for you** — you'll be asked for the URL + key, so make sure those are
|
|
74
|
+
already provisioned (see "Before you install").
|
|
50
75
|
|
|
51
|
-
`cerefox init`
|
|
76
|
+
> **Schema deploy (v0.5):** if your Supabase project is fresh, `cerefox init`
|
|
77
|
+
> tells you to run `uv run python scripts/db_deploy.py` from a Cerefox repo
|
|
78
|
+
> clone to install the schema. This last manual step goes away in v0.6 when
|
|
79
|
+
> the deploy logic is ported to the TS CLI. For now, the setup-supabase
|
|
80
|
+
> guide walks through it.
|
|
52
81
|
|
|
53
82
|
---
|
|
54
83
|
|
|
@@ -68,7 +97,7 @@ is:
|
|
|
68
97
|
"mcpServers": {
|
|
69
98
|
"cerefox": {
|
|
70
99
|
"command": "npx",
|
|
71
|
-
"args": ["-y", "--package=@cerefox/memory", "cerefox
|
|
100
|
+
"args": ["-y", "--package=@cerefox/memory", "cerefox", "mcp"]
|
|
72
101
|
}
|
|
73
102
|
}
|
|
74
103
|
}
|
|
@@ -101,8 +130,9 @@ by category).
|
|
|
101
130
|
|
|
102
131
|
## Why install the CLI when I already have MCP wired up?
|
|
103
132
|
|
|
104
|
-
You don't have to. `cerefox
|
|
105
|
-
client
|
|
133
|
+
You don't have to. `cerefox mcp` (started as a stdio subprocess by any
|
|
134
|
+
MCP client) gives your AI agent full access to the knowledge base on
|
|
135
|
+
its own. The rest of the `cerefox` CLI is useful for:
|
|
106
136
|
|
|
107
137
|
- **One-off shell operations**: search, ingest, list, audit-log.
|
|
108
138
|
- **Power-user workflows**: `cerefox ingest-dir ./meeting-notes`,
|
package/dist/bin/cerefox.js
CHANGED
|
@@ -7179,7 +7179,7 @@ var exports_meta = {};
|
|
|
7179
7179
|
__export(exports_meta, {
|
|
7180
7180
|
PKG_VERSION: () => PKG_VERSION
|
|
7181
7181
|
});
|
|
7182
|
-
var PKG_VERSION = "0.5.
|
|
7182
|
+
var PKG_VERSION = "0.5.1";
|
|
7183
7183
|
var init_meta = () => {};
|
|
7184
7184
|
|
|
7185
7185
|
// ../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js
|
|
@@ -38141,7 +38141,7 @@ import { dirname, join as join3 } from "node:path";
|
|
|
38141
38141
|
function defaultCerefoxEntry() {
|
|
38142
38142
|
return {
|
|
38143
38143
|
command: "npx",
|
|
38144
|
-
args: ["-y", "--package=@cerefox/memory", "cerefox
|
|
38144
|
+
args: ["-y", "--package=@cerefox/memory", "cerefox", "mcp"]
|
|
38145
38145
|
};
|
|
38146
38146
|
}
|
|
38147
38147
|
function claudeCodeConfigPath() {
|
|
@@ -39343,7 +39343,7 @@ function registerListVersions(program2) {
|
|
|
39343
39343
|
|
|
39344
39344
|
// src/cli/commands/mcp.ts
|
|
39345
39345
|
function registerMcp(program2) {
|
|
39346
|
-
program2.command("mcp").description("Start the local stdio MCP server
|
|
39346
|
+
program2.command("mcp").description("Start the local stdio MCP server.").action(async () => {
|
|
39347
39347
|
const { buildServer: buildServer2 } = await Promise.resolve().then(() => (init_server3(), exports_server));
|
|
39348
39348
|
const handle = buildServer2();
|
|
39349
39349
|
await handle.run();
|
|
@@ -68,7 +68,7 @@ Three top-level paths plus a few special cases:
|
|
|
68
68
|
- Some content ingested (`cerefox ingest my-notes.md`)
|
|
69
69
|
|
|
70
70
|
**For Path A-Local only:**
|
|
71
|
-
- **Recommended (v0.4.0+):** [Node.js ≥20](https://nodejs.org) (for `npx --package=@cerefox/memory cerefox
|
|
71
|
+
- **Recommended (v0.4.0+):** [Node.js ≥20](https://nodejs.org) (for `npx --package=@cerefox/memory cerefox mcp`)
|
|
72
72
|
+ `.env` file in the working directory the client launches the server from (see "env block"
|
|
73
73
|
in the per-client configs below if your client can't see the file)
|
|
74
74
|
- **Alternative:** [`uv`](https://docs.astral.sh/uv/getting-started/installation/) installed on your machine + Cerefox repository cloned locally (e.g. `/Users/yourname/src/cerefox`)
|
|
@@ -112,10 +112,10 @@ The local Cerefox MCP server runs on your machine and exposes the same 10 tools
|
|
|
112
112
|
Edge Function, communicating with clients over stdio.
|
|
113
113
|
|
|
114
114
|
As of **v0.4.0** the local server ships as an npm package — **[`@cerefox/memory`](https://www.npmjs.com/package/@cerefox/memory)** — built with the official `@modelcontextprotocol/sdk`.
|
|
115
|
-
The bin entry is `cerefox
|
|
115
|
+
The bin entry is `cerefox` (run as `cerefox mcp`). The recommended client config is `npx -y --package=@cerefox/memory cerefox mcp`.
|
|
116
116
|
|
|
117
117
|
The legacy `uv run cerefox mcp` invocation **still works** and is preserved as a soft
|
|
118
|
-
wrapper: it tries `npx --no-install @cerefox/memory cerefox
|
|
118
|
+
wrapper: it tries `npx --no-install @cerefox/memory cerefox mcp` first and falls back to the
|
|
119
119
|
Python MCP server if npm is unavailable or `@cerefox/memory` isn't installed. New users
|
|
120
120
|
should prefer the npm-native config; existing users don't have to change anything.
|
|
121
121
|
|
|
@@ -199,7 +199,7 @@ After setup, ask your client:
|
|
|
199
199
|
"mcpServers": {
|
|
200
200
|
"cerefox": {
|
|
201
201
|
"command": "npx",
|
|
202
|
-
"args": ["-y", "--package=@cerefox/memory", "cerefox
|
|
202
|
+
"args": ["-y", "--package=@cerefox/memory", "cerefox", "mcp"],
|
|
203
203
|
"env": {
|
|
204
204
|
"CEREFOX_SUPABASE_URL": "https://<your-project-ref>.supabase.co",
|
|
205
205
|
"CEREFOX_SUPABASE_KEY": "<your-service-role-or-sb_secret-key>",
|
|
@@ -228,7 +228,7 @@ server can find — the server resolves `.env` from the current working director
|
|
|
228
228
|
|
|
229
229
|
Replace `/path/to/cerefox` with the absolute path to your Cerefox checkout
|
|
230
230
|
(e.g. `/Users/yourname/src/cerefox` on macOS, `C:\Users\yourname\src\cerefox` on Windows).
|
|
231
|
-
This invocation soft-wraps `npx --package=@cerefox/memory cerefox
|
|
231
|
+
This invocation soft-wraps `npx --package=@cerefox/memory cerefox mcp` when available; otherwise the
|
|
232
232
|
legacy Python MCP server takes over.
|
|
233
233
|
|
|
234
234
|
**Important:**
|
|
@@ -262,7 +262,7 @@ legacy Python MCP server takes over.
|
|
|
262
262
|
"mcpServers": {
|
|
263
263
|
"cerefox": {
|
|
264
264
|
"command": "npx",
|
|
265
|
-
"args": ["-y", "--package=@cerefox/memory", "cerefox
|
|
265
|
+
"args": ["-y", "--package=@cerefox/memory", "cerefox", "mcp"],
|
|
266
266
|
"env": {
|
|
267
267
|
"CEREFOX_SUPABASE_URL": "https://<your-project-ref>.supabase.co",
|
|
268
268
|
"CEREFOX_SUPABASE_KEY": "<your-service-role-or-sb_secret-key>",
|
|
@@ -302,7 +302,7 @@ separate from `claude_desktop_config.json`. Changes made in one do not affect th
|
|
|
302
302
|
|
|
303
303
|
```bash
|
|
304
304
|
claude mcp add --scope user cerefox \
|
|
305
|
-
npx -- -y --package=@cerefox/memory cerefox
|
|
305
|
+
npx -- -y --package=@cerefox/memory cerefox mcp
|
|
306
306
|
```
|
|
307
307
|
|
|
308
308
|
- `--scope user` makes the server available in every project (stored in `~/.claude/mcp.json`).
|
|
@@ -324,7 +324,7 @@ claude mcp add --scope user cerefox \
|
|
|
324
324
|
uv -- --directory /path/to/cerefox run cerefox mcp
|
|
325
325
|
```
|
|
326
326
|
|
|
327
|
-
This soft-wraps `npx --package=@cerefox/memory cerefox
|
|
327
|
+
This soft-wraps `npx --package=@cerefox/memory cerefox mcp` when available; otherwise falls back to
|
|
328
328
|
the legacy Python MCP server.
|
|
329
329
|
|
|
330
330
|
**Option 3: `.mcp.json` in project root (project-scoped, committable)**
|
|
@@ -336,7 +336,7 @@ Create `.mcp.json` in the root of the repo you work in:
|
|
|
336
336
|
"mcpServers": {
|
|
337
337
|
"cerefox": {
|
|
338
338
|
"command": "npx",
|
|
339
|
-
"args": ["-y", "--package=@cerefox/memory", "cerefox
|
|
339
|
+
"args": ["-y", "--package=@cerefox/memory", "cerefox", "mcp"]
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -6,10 +6,10 @@ one-line ⚠ banner now), but the npm path is faster, doesn't need a
|
|
|
6
6
|
local clone, and adds new lifecycle commands (`init`, `doctor`,
|
|
7
7
|
`configure-agent`, `self-update`).
|
|
8
8
|
|
|
9
|
-
> **Existing v0.4.x users:** your MCP client configs
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
9
|
+
> **Existing v0.4.x users:** your MCP client configs need a one-line
|
|
10
|
+
> update (the `cerefox-mcp` bin from v0.4 → v0.5.0 was removed in
|
|
11
|
+
> v0.5.1 — it's redundant with `cerefox mcp`). See the
|
|
12
|
+
> ["Upgrading an existing MCP client config"](#upgrading-an-existing-mcp-client-config) section below for the exact diff.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -106,7 +106,7 @@ If your usage hits any of these, keep your Python install around for now.
|
|
|
106
106
|
|
|
107
107
|
## Upgrading an existing MCP client config
|
|
108
108
|
|
|
109
|
-
The v0.4.x config you may have written looked like:
|
|
109
|
+
The v0.4.x → v0.5.0 config you may have written looked like:
|
|
110
110
|
|
|
111
111
|
```json
|
|
112
112
|
{
|
|
@@ -119,12 +119,27 @@ The v0.4.x config you may have written looked like:
|
|
|
119
119
|
}
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
**
|
|
123
|
-
|
|
122
|
+
**In v0.5.1 this breaks.** The standalone `cerefox-mcp` bin was removed
|
|
123
|
+
in v0.5.1 — it duplicated `cerefox mcp` for no functional gain. Update
|
|
124
|
+
the `args` array to invoke the `mcp` subcommand of the main bin
|
|
125
|
+
instead:
|
|
126
|
+
|
|
127
|
+
```diff
|
|
128
|
+
"args": [
|
|
129
|
+
"-y",
|
|
130
|
+
"--package=@cerefox/memory",
|
|
131
|
+
- "cerefox-mcp"
|
|
132
|
+
+ "cerefox",
|
|
133
|
+
+ "mcp"
|
|
134
|
+
]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The behaviour is identical — same `buildServer()` factory, same 10
|
|
138
|
+
MCP tools, same stdio transport. Only the bin name changes.
|
|
124
139
|
|
|
125
|
-
If you want
|
|
126
|
-
|
|
127
|
-
|
|
140
|
+
If you want `cerefox configure-agent` to rewrite the config for you,
|
|
141
|
+
the command is non-destructive: it backs up the existing file to
|
|
142
|
+
`<file>.pre-cerefox.bak` and merges. Existing `mcpServers` entries
|
|
128
143
|
are preserved.
|
|
129
144
|
|
|
130
145
|
```bash
|
|
@@ -139,7 +154,7 @@ cerefox configure-agent --tool claude-code # apply
|
|
|
139
154
|
### `npx` from inside an npm workspace
|
|
140
155
|
|
|
141
156
|
The v0.4 gotcha still applies: running `npx -y --package=@cerefox/memory
|
|
142
|
-
cerefox
|
|
157
|
+
cerefox mcp` from inside another npm workspace can fail with "command
|
|
143
158
|
not found." Use `bunx` instead, run from outside any workspace, or
|
|
144
159
|
`npm install -g`.
|
|
145
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Cerefox — user-owned shared memory for AI agents. The local TypeScript runtime: stdio MCP server in v0.4; CLI binary added in v0.5; in-process web server in v0.6; ingestion pipeline in v0.7.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/fstamatelopoulos/cerefox",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"bun": ">=1.0.0"
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
|
-
"cerefox-mcp": "dist/bin/cerefox-mcp.js",
|
|
31
30
|
"cerefox": "dist/bin/cerefox.js"
|
|
32
31
|
},
|
|
33
32
|
"files": [
|
|
@@ -56,13 +55,11 @@
|
|
|
56
55
|
"typescript": "^6.0.3"
|
|
57
56
|
},
|
|
58
57
|
"scripts": {
|
|
59
|
-
"build": "bun build src/bin/cerefox
|
|
60
|
-
"build:mcp": "bun build src/bin/cerefox-mcp.ts --outdir dist/bin --target node --format esm",
|
|
61
|
-
"build:cli": "bun build src/bin/cerefox.ts --outdir dist/bin --target node --format esm",
|
|
58
|
+
"build": "bun build src/bin/cerefox.ts --outdir dist/bin --target node --format esm",
|
|
62
59
|
"clean": "rm -rf dist docs AGENT_GUIDE.md AGENT_QUICK_REFERENCE.md",
|
|
63
60
|
"bundle-docs": "bun run ../../scripts/bundle_package_docs.ts",
|
|
64
61
|
"prepublishOnly": "bun run clean && bun run bundle-docs && bun run build",
|
|
65
|
-
"smoke": "node dist/bin/cerefox
|
|
62
|
+
"smoke": "node dist/bin/cerefox.js --help && node dist/bin/cerefox.js mcp --help"
|
|
66
63
|
},
|
|
67
64
|
"publishConfig": {
|
|
68
65
|
"access": "public",
|