Mem0 CLI - Agent Memory From Your Terminal
Agent memory, from your terminal
Add, search, and manage memories directly from the terminal. Python or Node. Same CLI, same behavior.
Installation
npm
npm install -g @mem0/cli
pip
pip install @mem0/cli
Quick Start
$ mem0 init
███╗ ███╗███████╗███╗ ███╗ ██████╗ ██████╗██╗ ██╗
████╗ ████║██╔════╝████╗ ████║██╔═████╗ ██╔════╝██║ ██║
██╔████╔██║█████╗ ██╔████╔██║██║██╔██║ ██║ ██║ ██║
██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║████╔╝██║ ██║ ██║ ██║
██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝ ╚██████╗███████╗██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝╚══════╝╚═╝
✓ API key saved
✓ Default user: alice
$ mem0 add "Prefers dark mode and vim key bindings" --user-id alice
✓ Memory added (id: 7b3c1a2e)
$ mem0 search "What does Alice prefer?" --user-id alice
Output: 0.5ms Prefers dark mode and vim key bindings
Built for agents
Full command tree
Lists every command, flag, and description. Agents learn the interface on their own.
Multiple output modes
Output in the format your code expects. Text or JSON.
Scoped to any entity
Scope memory to any user, session, or agent. No namespace collisions.
Quick Reference
| Command | What it does |
|---|---|
| mem0 init | Interactive setup wizard for mem0 CLI. |
| mem0 add | Add a memory from text, messages, file, or stdin. |
| mem0 search | Query your memory store — semantic, keyword, or hybrid retrieval. |
| mem0 get | Get a specific memory by ID. |
| mem0 list | List memories with optional filters. |
| mem0 update | Update a memory's text or metadata. |
| mem0 delete | Delete a memory, all memories, or an entity. |
| mem0 status | Check connectivity and authentication. |
| mem0 import | Import memories from a JSON file. |
| mem0 entity | Manage entities |
| mem0 event | Inspect background processing events. |
Install. Init. Remember
npm
npm install -g @mem0/cli
pip
pip install @mem0/cli