mem0 is a fast, local-first terminal knowledge memory for developers and AI agents. It allows you to quickly log mistakes, fixes, ideas, and implementation plans without leaving the terminal, ensuring that critical knowledge is never lost.
- Fast Capture: Capture notes in <20ms directly from the CLI.
- Auto-context: Automatically records the current folder name with every note.
- Searchable Memory: Instant retrieval via text or language filtering.
- Privacy First: Automatic redaction of secrets (API keys, tokens) before saving.
- Smart Suggestions: Error fingerprinting detects similar entries in the same context.
- macOS Integrated: Share notes directly to your clipboard using
pbcopy.
# Log a fix (folder name is detected automatically)
mem0 new "fix ECONNRESET reconnect loop" --lang ts --tags network,bug
# Quick idea capture
mem0 new "add close button at top right" --tags ui,ideaNote: Each tag must be 16 characters or less.
# Search by keyword
mem0 search ECONNRESET
# List recent notes
mem0 list# Copy note content to macOS clipboard
mem0 share <id>
# Export as JSON or Markdown
mem0 share <id> --json
mem0 share <id> --mdTo get started with mem0, clone the repository and install it locally using Go:
# Clone the repository
git clone https://github.com/0xAnto/mem0.git
cd mem0
# Install the binary
go install ./cmd/mem0Ensure your Go binary directory is in your PATH so you can run mem0 from anywhere.
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc
source ~/.zshrcecho 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc
source ~/.bashrc...
Once installed, check your version:
mem0 --versionRun new to save a note. The current directory name is automatically saved as a "folder" tag.
# Basic note
mem0 new "fix: retry logic for flaky API"
# Advanced note with tags and language
mem0 new "SQL query to find duplicate users" --lang sql --tags db,users,cleanupSearch your notes by keyword or filter by language.
mem0 search "duplicate"
mem0 search "retry" --lang goCopy a note's content directly to your macOS clipboard using its ID.
mem0 share 1Need it as JSON?
mem0 share 1 --json