| name | supermemory-cli |
| description | Use the Supermemory CLI to programmatically manage memories, documents, profiles, tags, connectors, keys, and teams from the terminal. Covers all commands, flags, and usage patterns. |
The Supermemory CLI is the complete interface to Supermemory from the terminal. It lets you add memories, search, manage documents, configure projects, connect external data sources, and administer teams — all programmatically.
Installation & Auth
npm install -g @supermemory/cli
supermemory login
supermemory login --api-key sm_abc_xxx
supermemory whoami
Configuration
The CLI supports three config scopes:
| Scope | File | Use Case |
|---|
project | .supermemory/config.json (gitignored) | Per-machine secrets, API keys |
team | .supermemory/team.json (committed) | Shared tag, team-wide defaults |
global | ~/.config/supermemory/config.json | All projects on this machine |
supermemory init
supermemory init --scope project --tag my-bot
supermemory init --scope team --tag shared-project
supermemory init --scope global --output json
supermemory config
supermemory config set tag my-project
supermemory config set verbose true
supermemory config get tag
Environment Variables
| Variable | Description |
|---|
SUPERMEMORY_API_KEY | API key for authentication |
SUPERMEMORY_TAG | Override default container tag |
OTEL_EXPORTER_OTLP_ENDPOINT | OpenTelemetry collector endpoint |
Global Flags
| Flag | Description |
|---|
--json | Force JSON output (machine-readable) |
--tag | Override default container tag for this command |
--help | Show help for any command |
Core Commands
add — Ingest content
Ingest text, files, or URLs and extract memories into a container tag.
supermemory add "User prefers TypeScript over JavaScript"
supermemory add ./meeting-notes.pdf --tag meetings
supermemory add https://docs.example.com/api --tag docs
cat file.txt | supermemory add --stdin
echo "some content" | supermemory add --stdin --tag notes
supermemory add "Design doc v2" --metadata '{"category": "engineering", "priority": "high"}'
supermemory add "My doc" --id custom-doc-id --tag project
cat batch.jsonl | supermemory add --batch
Options:
--tag <string> — Container tag
--stdin — Read content from stdin
--title <string> — Document title
--metadata <json> — JSON metadata object
--id <string> — Custom document ID
--batch — Batch mode, reads JSONL from stdin
search — Search memories
Semantic search across memories with filtering and reranking.
supermemory search "authentication patterns"
supermemory search "auth" --tag api --limit 5
supermemory search "database migrations" --rerank
supermemory search "how do we handle auth" --rewrite
supermemory search "user prefs" --mode memories
supermemory search "user prefs" --mode hybrid
supermemory search "user prefs" --mode documents
supermemory search "api design" --include summary,chunks,memories
supermemory search "design" --filter '{"AND": [{"key": "category", "value": "engineering"}]}'
supermemory search "preferences" --threshold 0.5
Options:
--tag <string> — Filter by container tag
--limit <number> — Max results (default: 10)
--threshold <number> — Similarity threshold 0-1 (default: 0)
--rerank — Enable reranking for better relevance
--rewrite — Rewrite query using LLM
--mode <string> — memories | hybrid | documents (default: memories)
--include <string> — Fields: summary, chunks, memories, document
--filter <json> — Metadata filter object
remember — Store a memory directly
Store a specific fact or memory without ingesting a full document.
supermemory remember "User prefers dark mode" --tag user_123
supermemory remember "User is a senior engineer at Acme Corp" --static --tag user_123
supermemory remember "Discussed Q3 roadmap" --tag meetings --metadata '{"type": "decision"}'
Options:
--tag <string> — Container tag
--static — Mark as permanent memory
--metadata <json> — JSON metadata
forget — Delete a memory
supermemory forget mem_abc123 --tag default
supermemory forget --content "outdated preference" --tag default
supermemory forget mem_abc123 --reason "User corrected this information"
Options:
--tag <string> — Container tag
--reason <string> — Reason for forgetting
--content <string> — Forget by content match instead of ID
update — Update an existing memory
supermemory update mem_123 "Updated preference: prefers Bun over Node"
supermemory update mem_123 "New content" --metadata '{"updated": true}'
Options:
--tag <string> — Container tag
--metadata <json> — Updated metadata
--reason <string> — Reason for update
profile — Get user profile
Retrieve the auto-generated user profile for a container tag.
supermemory profile
supermemory profile user_123
supermemory profile user_123 --query "programming preferences"
Returns static facts (long-term) and dynamic context (recent activity).
Document Management
docs — Manage documents
supermemory docs list --tag default --limit 20
supermemory docs get doc_abc123
supermemory docs status doc_abc123
supermemory docs chunks doc_abc123
supermemory docs delete doc_abc123 --yes
Subcommands: list, get, delete, chunks, status
Container Tags
tags — Manage container tags
Container tags scope memories to users, projects, or any logical grouping.
supermemory tags list
supermemory tags info user_123
supermemory tags create my-new-project
supermemory tags context user_123 --set "This user is a premium customer"
supermemory tags context user_123 --clear
supermemory tags merge old-tag --into new-tag --yes
supermemory tags delete old-tag --yes
Subcommands: list, info, create, delete, context, merge
API Keys
keys — Manage API keys
supermemory keys list
supermemory keys create --name my-agent --permission write
supermemory keys create --name bot-key --tag user_123 --expires 30
supermemory keys revoke key_abc123 --yes
supermemory keys toggle key_abc123
Subcommands: list, create, revoke, toggle
Connectors
connectors — External data sources
Connect Google Drive, Notion, OneDrive, and other services to automatically sync documents.
supermemory connectors list
supermemory connectors connect google-drive --tag docs
supermemory connectors connect notion --tag notes
supermemory connectors sync conn_abc123
supermemory connectors history conn_abc123 --limit 10
supermemory connectors resources conn_abc123
supermemory connectors disconnect conn_abc123 --yes
Subcommands: list, connect, sync, history, disconnect, resources
Plugins
plugins — IDE and tool integrations
Connect the CLI to Claude Code, Cursor, and other tools.
supermemory plugins list
supermemory plugins connect claude-code --auto-configure
supermemory plugins connect cursor --auto-configure
supermemory plugins status claude-code
supermemory plugins revoke claude-code --yes
Subcommands: list, connect, revoke, status
Team Management
team — Manage team members
supermemory team list
supermemory team invite user@example.com --role admin
supermemory team invite user@example.com --role member
supermemory team role member_123 admin
supermemory team remove member_123 --yes
supermemory team invitations
Subcommands: list, invite, remove, role, invitations
Monitoring
status — Account dashboard
supermemory status
supermemory status --period 7d
Shows memory count, document count, API usage, and storage.
logs — Request logs
supermemory logs
supermemory logs --period 7d
supermemory logs --status error
supermemory logs --type search
supermemory logs get req_abc123
billing — Usage and billing
supermemory billing
supermemory billing usage
supermemory billing invoices
Utility Commands
supermemory open
supermemory open graph
supermemory open billing
supermemory open settings
supermemory open docs
supermemory open keys
supermemory help --json
supermemory help --all
supermemory search --help
supermemory tags --help --json
Scoped Keys Mode
When using a scoped API key (restricted to a single container tag), only these commands are available:
search, add, remember, forget, update, profile, whoami
The tag is automatically set from the key's scope — no need to pass --tag.
Common Patterns
Pipe content from other tools
git log --oneline -20 | supermemory add --stdin --tag git-history
curl -s https://api.example.com/docs | supermemory add --stdin --tag api-docs
supermemory search "auth" --json | jq '.results[].memory'
Scripting with JSON output
supermemory search "query" --json
supermemory tags list --json
supermemory profile user_123 --json
supermemory status --json
CI/CD integration
export SUPERMEMORY_API_KEY=sm_abc_xxx
supermemory add ./docs/api-reference.md --tag api-docs --id api-ref-latest
supermemory status --json | jq '.memoryCount'