Claude forgets everything between sessions. mem fixes that in two steps:
- Teaches Claude to maintain
MEMORY.md— adds a rule to~/.claude/CLAUDE.mdso Claude updates the file at the end of every session with decisions, rejections, and patterns. - Injects
MEMORY.mdat session start — wires aSessionStarthook so Claude opens every session with full project context already in mind.
curl -fsSL https://raw.githubusercontent.com/HugoLopes45/mem/main/install.sh | bashThat's it. One command, zero manual config.
mem init
→ adds rule to ~/.claude/CLAUDE.md (Claude writes MEMORY.md at session end)
→ wires SessionStart hook (MEMORY.md injected at session start)
Every session:
start → mem session-start injects MEMORY.md into Claude's context
end → Claude updates MEMORY.md per the rule (decisions, rejections, patterns)
The file lives at your project root. Claude reads it, Claude maintains it.
mem init # setup: wire hook + add rule to CLAUDE.md
mem status # verify: hook installed? rule present? files indexed?
mem index # index all MEMORY.md files for search
mem search <query> # search across all indexed MEMORY.md filesClaude writes this automatically. Example after a few sessions:
# myproject
- Auth: JWT, not sessions — mobile client needs stateless (2026-02-18)
- Tried Prisma, switched to raw SQL — too much magic for this schema
- Don't use `any` — Biome enforces strict types, CI will fail
- Payment webhooks must be idempotent — Stripe retries on timeout
- DB migrations: always add column nullable first, backfill, then add constraintDecisions, rejections, patterns. Things Claude would otherwise ask about again.
curl -fsSL https://raw.githubusercontent.com/HugoLopes45/mem/main/install.sh | bashFrom source
cargo install --git https://github.com/HugoLopes45/mem --locked
mem initRequires Rust 1.75+.
mem statusBinary : /Users/you/.cargo/bin/mem
Hook : installed
Rule : installed
Indexed : 3 MEMORY.md file(s)
mem index # index all MEMORY.md files
mem search "jwt" # find decisions across all projects
mem search "rejected" # find things you decided not to doMIT — see LICENSE.