mcpField
M
mem

mem

github.com/runablehqAgent workflows62.4k installsUpdated 32w ago
Repository

About mem

mem is a local memory-store CLI for agents to save and retrieve preferences, decisions, and code snippets. Full-text search, tags, and image attachments organize stored memories.

Key features

  1. 01Store memories locally
  2. 02Full-text search and tag filters
  3. 03Retrieve memories by ID
  4. 04Attach images
  5. 05JSON output and piping
  6. 06Delete one or multiple memories

Use cases

  1. 01Record user preferences and project decisions
  2. 02Find saved snippets and commands later
  3. 03Search stored information before asking
  4. 04Attach screenshots to memories

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/runablehq/memory --skill mem

After installing, type/memin Claude Code to confirm it loaded.

Details

From the project README

mem — Agent Memory Store

A CLI tool for storing and retrieving memories with full-text search. Data is stored locally in ~/.mem/mem.db.

When to Use

  • Remember user preferences, project decisions, important facts
  • Store code snippets, commands, configurations for later recall
  • Search your knowledge base before asking the user for information you may have stored
  • Attach images (screenshots, diagrams) to memories

Commands

Three operators: (none) = recall, + = remember, - = forget.

Recall (search, list, get)
mem                             # list recent memories
mem "deploy"                    # full-text search
mem "database" --tag db         # search filtered by tag
mem 7sjtNVyZrNIa                # get full content by ID
mem --tag prefs                 # list filtered by tag
mem "api" --limit 5 --json     # limit results, JSON output
mem --full                      # show full content for all
Remember
mem + "user prefers dark mode" --tag prefs
mem + "deploy: bun build --compile" --tag deploy
mem + "chose SQLite for simplicity" --tag architecture
mem + --image ./screenshot.png --title "Current UI" --tag ui
echo "long content" | mem + --tag notes
Forget
mem - <id>                      # delete one memory
mem - id1 id2 id3               # delete multiple

Piping

mem "old" --json | jq -r '.[].id' | xargs -I{} mem - {}
echo "long content" | mem + --tag notes

Best Practices

  1. Tag consistently — Use lowercase, descriptive tags like prefs, api, deploy, db
  2. Search before asking — Check if you've stored relevant information before asking the user
  3. Store decisions — When making architectural or design decisions, store the reasoning
  4. Keep memories atomic — One concept per memory for better searchability

Output Formats

  • Default: One-line summary per result
  • --full: Complete content inline
  • --json: Structured JSON for parsing

Comments

Markdown supported