Memoree
Memoree gives Claude Code and Codex persistent, local-first memory. SQLite,
configuration, graphs, model files, and captured sessions stay under
~/.memoree; local embeddings are enabled by default and require no Memoree
account or hosted service.
Install
Requirements: Node.js 22.13 or newer, and Claude Code and/or Codex already
installed.
The npm package is @sskarz/memoree (unscoped memoree is blocked by the
registry as too similar to memoizee). Confirm it is this project:
npm view @sskarz/memoree repository.url
That must print git+https://github.com/sskarz/memoree.git. If it 404s or
points elsewhere, do not run npx — use the clone path under
Development, then node bundle/cli.js install.
Never npm link.
Once the registry URL matches:
npx -y @sskarz/memoree install
That command initializes SQLite and local embeddings, copies the plugin to a
durable directory (~/.local/share/memoree/pkg, not the npx cache), and
wires every detected harness. Re-run it to upgrade. For lexical-only
retrieval: npx -y @sskarz/memoree install --no-embeddings.
Then:
- Claude Code: restart the session (or
/reload-plugins).
- Codex: restart, then open
/hooks and trust Memoree. Codex does not
auto-trust plugin hooks; that step has to be a person.
- Check:
npx @sskarz/memoree doctor
Later CLI commands also work through npx (npx @sskarz/memoree status,
npx @sskarz/memoree uninstall). Do not npm link a development clone — that
replaces the code Claude Code and Codex are already running.
Ask an agent to install it
Paste this into Claude Code or Codex:
Install Memoree (local persistent memory for this agent). Requirements:
Node.js 22.13+. Never npm link.
1. Run `npm view @sskarz/memoree repository.url`.
If it prints git+https://github.com/sskarz/memoree.git, continue.
If it 404s or the URL is different, STOP. Do not run npx.
Tell me the npm package is unpublished or untrusted. I can clone
https://github.com/sskarz/memoree.git, run `npm ci && npm run build`,
then `node bundle/cli.js install` — never npm link.
2. Check whether it is already installed: `npx -y @sskarz/memoree doctor`.
If doctor reports the database and plugin as ok, stop and tell me.
3. Run `npx -y @sskarz/memoree install`.
4. Tell me to restart this session.
5. If this is Codex, tell me to open /hooks after restart and trust
Memoree — you cannot complete that trust step for me.
What Memoree does
Memoree is a SQLite-backed virtual filesystem at ~/.memoree/memory/, plus
hooks on Claude Code, Codex, and Antigravity, plus a CLI. Claude Code and
Codex read team memory with ordinary cat / ls / grep on that mount; the
PreToolUse hook rewrites those commands into queries. Antigravity uses Memoree
MCP tools instead — it cannot rewrite host commands. Supported sandboxed tools: cat, ls, grep,
head, tail, wc, find, jq, echo, printf, tee, and lifecycle
mv/rm for a single rule or goal file. Do not spawn subagents to read it.
Memory files
| Path | Role |
|---|
identity.json | userName, organization, workspace, backend |
rules.md / rules/{active,done}/ | shared rules |
goals.md / goal/<owner>/{opened,in_progress,closed}/ | goals |
kpi/<goal-id>/<kpi-id>.md | KPIs on a goal |
index.md | recent session inventory |
summaries/ | wiki/session reflections (search these first) |
sessions/ | rendered transcript fallback |
graph/query/<pattern> | hybrid/semantic code-graph search |
graph/find/<pattern> | substring search (not a synonym of query) |
graph/show, impact, neighborhood, layers, tour, path | graph inspection |
docs/index.md, docs/find/<words> | search generated docs |
docs/<file>.md | doc for one source file |
Hooks
Claude Code: SessionStart (inject + async setup, and auto-mine/backfill
when due), UserPromptSubmit (capture + recall), PreToolUse (Bash, Read,
Grep, Glob), PostToolUse / Stop / SubagentStop capture, SessionEnd (wiki
worker, plugin cache GC, graph auto-build).
Codex: SessionStart (matcher startup|resume|clear|compact, setup spawned
from the fast path), UserPromptSubmit (capture + recall), PreToolUse Bash
only, PostToolUse / Stop / SubagentStop capture, SessionEnd (wiki worker).
Graph auto-build stays on Stop (SessionEnd is capped at 3s). Standing
instructions also live in a managed block in ~/.codex/AGENTS.md.
plugin-cache-gc is Claude-plugin-cache specific.