Skip to content
AIRepoHub

claude-mem

by thedotmack

Memory add-on for AI coding agents that saves what happened in past sessions and brings the useful parts back later.

Coding AssistantsRAG & KnowledgeTypeScriptApache 2.0 license
Stars
119,609
stars
Forks
10k
forks
Last push
today
Activity
Active
claude-mem: quick start
# Install for the agents on your machine$ npx claude-mem install# Check your setup$ npx claude-mem doctor

Commands from the project's README. Run them after installing (see below).

Overview

Understand claude-mem in 60 seconds

What it does
Claude-Mem gives coding agents memory between sessions. A second agent takes notes while you work, and each new session starts with a short index of what matters, pulling in details only when needed.
The problem it solves
Each new agent session starts from zero, re-reading the same files and repeating mistakes you already fixed. Claude-Mem records observations as you work and brings them back in later sessions.
Why choose it
Choose it if you want automatic memory across sessions with local storage by default. Note that the hosted observer option is a paid service after a free trial; you can pick another provider instead.
Who should use it
  • Claude Code, Codex, Cursor and OpenCode users
  • Developers working on the same project over many sessions
  • Teams that want to share project knowledge
  • Anyone tired of re-explaining context to an agent
Setup difficulty

You'll need:

  • Node.js for npx
  • A supported agent (Claude Code, Codex, Cursor, OpenCode and 11 more)

How claude-mem works

Claude-Mem runs an observer next to your agent that writes notes while it works. The next session opens with a compact, layered index of past observations, and the agent opens full details only when it needs them, to save tokens. A mem-search skill searches project history in three steps: index, timeline and details.

The installer finds supported agents on your machine and asks which to set up. Memory is stored in ~/.claude-mem on your computer; cloud sync is opt-in. Anonymous usage analytics are on by default and can be turned off with npx claude-mem telemetry disable. Anything wrapped in private tags is never stored.

The installer may ask you to sign in; choosing the hosted claude-mem observer starts a 30-day free trial. You can skip sign-in with an explicit --provider flag or CLAUDE_MEM_ONLINE_OPTIN=false. Optional TeamBrain lets team members share selected work.

Features

Key features

Memory across sessions

New sessions start with an index of past work.

Token-aware recall

Details load only when the agent needs them.

Search your history

mem-search finds past work by index, timeline and details.

Local by default

Memory lives in ~/.claude-mem; cloud sync is opt-in.

Keep secrets out

Wrap content in private tags and it's never stored.

Many agents

Claude Code, Codex, Cursor, OpenCode and more.

Strengths

  • Works automatically after install
  • Local storage by default
  • Built-in doctor command
  • Apache-2.0 license

Limitations

  • Hosted observer is a paid service after a 30-day trial
  • Anonymous analytics are on until you disable them
  • npm install -g only installs the library, not the plugin

Practical use cases

Long-running projects

Pick up where you left off without re-explaining.

Find a past fix

Search what you and the agent did weeks ago.

Team knowledge

Share selected findings with TeamBrain.

Installation

Install claude-mem

Based on official documentation

Commands come from Claude-Mem's README. AIRepoHub hasn't run them yet. View source

Prerequisites

  • Node.js

Supported systems

  • Windows
  • macOS
  • Linux
  1. 1

    Run the installer

    It finds your agents and asks which to set up. To skip sign-in, pass --provider or set CLAUDE_MEM_ONLINE_OPTIN=false.

    Shell
    npx claude-mem install
  2. 2

    Turn off anonymous analytics (optional)

    Shell
    npx claude-mem telemetry disable
  1. 1

    Add the marketplace and install

    Text
    /plugin marketplace add thedotmack/claude-mem/plugin install claude-mem
  2. 2

    Restart Claude Code

  1. 1

    Install for OpenCode 1.3.4+

    Shell
    npx claude-mem install --ide opencode
  2. 2

    Restart OpenCode

Configuration and API keys

SettingWhat it's for
CLAUDE_MEM_ONLINE_OPTINOptionalSet to false to skip the online sign-in during install.

First run

  1. 1

    Check everything is working

    Shell
    npx claude-mem doctor
  2. 2

    Start your agent and work as usual

    Your second session in a project opens with memory from the first.

claude-mem's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.

Your first project

Give Claude Code memory between sessions

Install Claude-Mem and see context carry over to a new session.

Before you start

  • Claude Code installed
  • Node.js
  1. 1

    Install

    Shell
    npx claude-mem install
  2. 2

    Work on a project in Claude Code

    Observations stream in from your first prompt.

  3. 3

    Start a new session in the same project

    It opens with an index of what happened last time.

  4. 4

    If something looks wrong, run the doctor

    Shell
    npx claude-mem doctor

What to expect

The new session starts with a short summary of past observations, and the agent can search for details.

Next steps

  • Wrap secrets in private tags
  • Disable telemetry if you prefer
  • Read the configuration docs

Costs and requirements

What it costs to run

License
Apache-2.0. Free to use, modify and use commercially.Free
Local memory
Free with your own provider.Free
claude-mem observer
Hosted service with a 30-day free trial, then paid.Paid

Troubleshooting

Common setup issues

Plugin doesn't work after npm install -g

That installs only the library. Use npx claude-mem install.

Source: README.md

Something isn't working

Run npx claude-mem doctor; it checks Bun, uv, the hook launcher and the worker.

Source: README.md

Don't want an account

Pass --provider or set CLAUDE_MEM_ONLINE_OPTIN=false during install.

Source: README.md

Alternatives

Similar AI repositories