mem0-cli

Mem0 CLI -- the command-line interface for mem0 memory operations. TRIGGER when: user mentions "mem0 cli", "mem0 command line", "@mem0/cli", "mem0-cli", "pip install mem0-cli", "npm install -g @mem0/cli", or is running mem0 commands in a terminal/shell (mem0 add, mem0 search, mem0 list, mem0 get, mem0 init, mem0 config, mem0 import). Also triggers when query includes CLI flags like --user-id, --output, --json, --agent, or describes bash/zsh/terminal/shell usage. DO NOT TRIGGER when: user asks about programmatic SDK integration in Python/TS code (use mem0 skill), or Vercel AI SDK provider (use mem0-vercel-ai-sdk skill).

Install
npx skills add 'https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli'
Download bundle ↓
main · 0df3e4bScanned 2026-09-17

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗
View on GitHub
← Back to SKILL.md

Mem0 CLI Skill for Claude

Manage memories from the terminal using the Mem0 CLI. This skill teaches Claude how to use every mem0 command, flag, and output mode -- for both the Node.js and Python implementations.

What This Skill Does

When installed, Claude can:

  • Run mem0 commands correctly in your terminal (add, search, list, get, update, delete, import, config, init, status, entity, event)
  • Construct complex invocations with the right flags, scoping, filters, and output formats
  • Pipe and script mem0 commands in shell workflows, CI/CD pipelines, and agent loops
  • Debug issues like missing API keys, entity scoping conflicts, and async processing delays

Installation

CLI (Claude Code, OpenCode, OpenClaw, or any tool that supports skills)

npx skills add https://github.com/mem0ai/mem0 --skill mem0-cli

Claude.ai

  1. Download this skills/mem0-cli folder as a ZIP
  2. Go to Settings > Capabilities > Skills
  3. Click Upload skill and select the ZIP

Claude API (Skills API)

curl -X POST https://api.anthropic.com/v1/skills \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "mem0-cli", "source": "https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli"}'

Prerequisites

  • A Mem0 Platform API key (Get one here)

  • Node.js 18+ or Python 3.10+

  • Install the CLI:

    # Node.js
    npm install -g @mem0/cli
    
    # Python
    pip install mem0-cli
  • Set the environment variable:

    export MEM0_API_KEY="m0-your-api-key"

    Or run mem0 init for the interactive setup wizard.

Quick Start

After installing, just ask Claude:

  • "Add a memory for user alice that she prefers dark mode"
  • "Search alice's memories for dietary preferences"
  • "List all memories and output as JSON"
  • "Delete all memories for user bob"
  • "Set up mem0 CLI in my CI pipeline"
  • "Pipe the output of my script into mem0 add"

What's Inside

skills/mem0-cli/
├── SKILL.md                          # Skill definition and instructions
├── README.md                         # This file
├── LICENSE                           # Apache-2.0
└── references/                       # Documentation (loaded on demand)
    ├── command-reference.md           # Every command, flag, option, and example
    ├── configuration.md               # Config file, env vars, precedence, init wizard
    └── workflows.md                   # Piping, scripting, CI/CD, agent mode recipes

Skill Graph

This skill is part of the Mem0 skill graph -- three interconnected skills for different interfaces to the Mem0 platform:

SkillPurposeLink
mem0Python/TypeScript SDK, REST API, framework integrationslocal / GitHub
mem0-cli (this skill)Terminal commands for memory operationslocal / GitHub
mem0-vercel-ai-sdkVercel AI SDK provider with automatic memorylocal / GitHub

License

Apache-2.0