Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

mem0-cli

Skill by mem0ai

Mem0 CLI is a command-line tool for managing Mem0 memories from a terminal. It suits developers, AI agents and CI/CD pipelines that need to add, search, list, update and delete memories.

  • Score 92
  • 70k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install mem0-cli

Built from the published package, never by AI.

git clone --depth 1 https://github.com/mem0ai/mem0 /tmp/mem0 && mkdir -p ~/.claude/skills && cp -r /tmp/mem0/skills/mem0-cli ~/.claude/skills/mem0-cli

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install mem0-cli in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Mem0 CLI is the official command-line interface for the Mem0 memory platform. It installs a mem0 binary through npm (@mem0/cli) or pip (mem0-cli), and both versions share the same commands, options and output formats. Users can add, search, list, get, update and delete memories, and manage configuration, imports, entities and events from the shell.

The tool uses the MEM0_API_KEY environment variable for authentication. Adding --json or --agent to a command returns a standard JSON envelope with status, command and data fields, with progress output sent to stderr. The source also describes an Agent Mode bootstrap through mem0 init, which creates an evaluation key for AI agents. It is aimed at developers, AI agents and CI/CD pipelines that work in a terminal or shell.

Written from the project's SKILL.md and checked against it.

What it can do

  • Add memoriesStores text as a memory for a user, with input read from an argument or from piped stdin.
  • Search memoriesRuns a semantic query over stored memories for a given user.
  • List and get memoriesLists all memories for a user or fetches one memory by its ID.
  • Update and delete memoriesChanges the text of a memory or removes single memories, all memories for a user, or an entity.
  • Agent and JSON modeReturns structured JSON output with --json or --agent for use by LLMs and scripts.
  • Agent Mode setupRuns mem0 init --agent to create an evaluation API key without email or a dashboard.
  • Event statusUses mem0 event list to check whether added memories have finished processing.

What you need

  • Mem0 API key set as MEM0_API_KEY
  • Node.js 18 or later, or Python 3.10 or later

Try asking

  • Save a memory that alice prefers dark mode using the mem0 CLI
  • Search alice's memories for preferences and return the results as JSON
  • List every memory stored for user alice in my terminal

Good to know

  • Memories process asynchronously, so wait 2-3 seconds after mem0 add before searching.
  • mem0 delete --all --project ignores --dry-run and deletes every memory in the project.
  • Node and Python differ in some flags and output, such as --limit and how import prints JSON.
  • Node reads --json and --agent only as global options placed before the subcommand.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/mem0-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • LICENSE10 KB
  • README.md4 KB
  • SKILL.md8 KB
  • references/command-reference.md32 KB
  • references/configuration.md10 KB
Show all 6 files
  • references/workflows.md11 KB

Alternatives to mem0-cli

All alternatives →

Compare with agentmemory-config, understand-knowledge or reports

mem0-cli: common questions

Does mem0 CLI work with both Node.js and Python?

Yes. The @mem0/cli npm package and the mem0-cli PyPI package share the same commands, flags and JSON envelope. The source lists a few known differences between them.

How does the CLI return output for scripts or LLMs?

With --json or --agent, data commands return a JSON envelope containing status, command, and data fields. Errors return status set to error with a message.

What is the difference between deleting all memories and deleting an entity?

mem0 delete --all -u alice removes all memories for alice. mem0 delete --entity -u alice removes the entity and all its memories, and these two modes are mutually exclusive.

How do I install mem0-cli?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is mem0-cli free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is mem0-cli safe to use?

It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to mem0-cli?

Similar skills: agentmemory-config, understand-knowledge, reports, forget.

mem0-cli Install

Add to stack

Loading.