Skip to main content

Install the CLI

1

Install from npm

npm install -g memoclaw
2

Set your private key

MemoClaw uses x402 for payments. You need a wallet with USDC on Base.
export MEMOCLAW_PRIVATE_KEY=0xYourPrivateKey
Keep your private key secure. Consider using a dedicated wallet with small amounts for API payments.
3

Store your first memory

memoclaw store "User prefers dark mode and vim keybindings" \
  --importance 0.8 \
  --tags preferences,editor
Output:
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "stored": true,
  "tokens_used": 8
}
4

Recall memories

memoclaw recall "What are the user's editor preferences?"
Output:
[0.847] User prefers dark mode and vim keybindings
  tags: preferences, editor

Pricing

Each API call costs $0.001 USDC on Base. Your wallet address is your identity — no API keys needed.
OperationCost
Store$0.001
Recall$0.001
List$0.0005
Delete$0.0001

Using Namespaces

Namespaces isolate memories per project. Memories in one namespace won’t appear in another.
# Store project-specific context
memoclaw store "Uses PostgreSQL 15 with pgvector" \
  --namespace acme-api \
  --importance 0.9

memoclaw store "Deploy to staging before production" \
  --namespace acme-api \
  --importance 0.95 \
  --tags decisions

# Recall only from that project
memoclaw recall "database setup" --namespace acme-api

# List memories in a namespace
memoclaw list --namespace acme-api
Suggested namespaces:
  • default — General user preferences
  • project-{name} — Project-specific knowledge
  • client-{name} — Client-specific context

CLI Reference

# Store with all options
memoclaw store "content" --importance 0.9 --tags tag1,tag2 --namespace project-x

# Recall with filters
memoclaw recall "query" --limit 10 --min-similarity 0.7 --namespace project-x

# List memories
memoclaw list --limit 20 --namespace project-x

# Delete a memory
memoclaw delete <memory-id>

Next steps