Skip to content

feat: add official mem0 CLI (Python & TypeScript)#4575

Merged
whysosaket merged 5 commits intomem0ai:mainfrom
whysosaket:feature/mem0-cli
Mar 27, 2026
Merged

feat: add official mem0 CLI (Python & TypeScript)#4575
whysosaket merged 5 commits intomem0ai:mainfrom
whysosaket:feature/mem0-cli

Conversation

@whysosaket
Copy link
Copy Markdown
Member

@whysosaket whysosaket commented Mar 27, 2026

Summary

  • Adds the official mem0 CLI under cli/ with implementations in both Python (Typer + Rich + httpx) and TypeScript (Commander.js + chalk + native fetch)
  • Both implementations share a single cli-spec.json specification ensuring identical commands, options, output formats, and error messages
  • Supports full memory management from the terminal: mem0 add, search, list, update, delete, along with init, config, and entity listing
  • Includes --output json and help --json modes designed for machine/agent consumption

What's included

cli/
├── cli-spec.json          # Shared CLI specification (source of truth)
├── CLI_SPECIFICATION.md   # Full SDK reference
├── python/                # Python implementation — pip install mem0-cli
└── node/                  # TypeScript implementation — npm install -g @mem0/cli

Test plan

  • Verify mem0 --help works for both Python and Node implementations
  • Run Python test suite: cd cli/python && pip install -e ".[dev]" && pytest
  • Run Node test suite: cd cli/node && pnpm install && pnpm test
  • Test core commands (init, add, search, list) against the mem0 Platform API
  • Confirm JSON output mode works: mem0 list --output json

🤖 Generated with Claude Code

@whysosaket whysosaket changed the title feat: mem0 cli feat: add official mem0 CLI (Python & TypeScript) Mar 27, 2026
kk2211
kk2211 previously approved these changes Mar 27, 2026
@whysosaket whysosaket merged commit 3225e30 into mem0ai:main Mar 27, 2026
1 of 2 checks passed
@whysosaket whysosaket deleted the feature/mem0-cli branch March 27, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants