# mement > A local memory layer for coding agents. Your agents forget everything; mement doesn't. It reads the sessions of Pi, Codex, and Claude Code, keeps the words you actually said, and lets you search them. No cloud, no server — memory stays on your machine. ## What it is mement is a local-first conversation memory CLI for coding agents. It ingests session history from Pi, Codex, and Claude Code, stores it in a local SQLite database, and provides full-text search over past conversations (including Chinese, via FTS5 trigram tokenization). - Local-first: everything lives in a single SQLite file on your machine - Zero runtime dependencies: built on Node's built-in `node:sqlite` (requires Node >= 22.13) - Incremental ingestion: `mement add` resumes at the last complete log boundary - Search: BM25-ranked full-text search with context windows, filterable by harness and project directory ## Install ```bash npm install -g @hidaviddong/mement mement install ``` `mement install` drops a skill into each agent: - `~/.pi/agent/skills/mement/SKILL.md` - `~/.codex/skills/mement/SKILL.md` - `~/.claude/skills/mement/SKILL.md` ## Usage Remember (ingest conversations incrementally): ```bash mement add # all sources mement add --pi # just one source mement add --codex --claude-code ``` Recall (search your history): ```bash mement search "sqlite schema" mement search "deploy failed" --cwd "$(pwd)" --context 3 mement search "query" --harness codex --limit 10 --json ``` ## Details - Memory lives at `~/.mement/mement.db`; set `MEMENT_HOME` to move it - Storage: SQLite (WAL) with tables for sessions, messages, a trigram FTS5 index, and per-file ingest cursors - Ranking: short queries (< 3 chars) use position-first LIKE ranking; longer queries blend FTS5 bm25 with literal hit counts - Release: pushing any `v*` tag runs the GitHub Actions Release workflow (tests, typecheck, build, npm publish via OIDC, GitHub Release) ## License AGPL-3.0-only ## Links - GitHub: https://github.com/hidaviddong/mement - npm: https://www.npmjs.com/package/@hidaviddong/mement