Installation
Copy
# npm (recommended)
npm install -g memvid-cli
# From source
cargo install memvid-cli
Create & Manage
Copy
# Create new memory
memvid create memory.mv2
# Create with options
memvid create memory.mv2 --size 25MB # Custom size
memvid create memory.mv2 --no-vec # No vector index
memvid create memory.mv2 --no-lex # No lexical index
memvid create memory.mv2 --memory-id <UUID> # Bind to dashboard
# View memory info
memvid open memory.mv2
memvid stats memory.mv2
memvid stats memory.mv2 --json
Ingest Content
Copy
# Add single file
memvid put memory.mv2 --input document.pdf
# Add folder
memvid put memory.mv2 --input ./documents/
# Add with metadata
memvid put memory.mv2 --input doc.pdf --metadata '{"author":"John"}'
# Add with timestamp
memvid put memory.mv2 --input doc.pdf --timestamp "2024-01-15"
# Add with URI
memvid put memory.mv2 --input doc.pdf --uri "docs/guide/intro"
# Skip embedding (faster)
memvid put memory.mv2 --input logs.txt --embedding-skip
# Enable entity extraction
memvid put memory.mv2 --input doc.pdf --logic-mesh
# Parallel ingestion (faster)
memvid put memory.mv2 --input ./large-folder/ --parallel-segments
# Fetch from URL
memvid api-fetch memory.mv2 --url https://example.com/doc.pdf
Search
Copy
# Basic search
memvid find memory.mv2 --query "search term"
# Search modes
memvid find memory.mv2 --query "term" --mode auto # Hybrid (default)
memvid find memory.mv2 --query "term" --mode lex # Lexical only
memvid find memory.mv2 --query "term" --mode sem # Semantic only
# Limit results
memvid find memory.mv2 --query "term" --top-k 5
# Disable adaptive
memvid find memory.mv2 --query "term" --no-adaptive --top-k 10
# Filter by scope
memvid find memory.mv2 --query "term" --scope "docs/"
memvid find memory.mv2 --query "term" --uri "specific/path"
# Filter by date
memvid find memory.mv2 --query "term" --start 2024-01-01 --end 2024-06-30
# JSON output
memvid find memory.mv2 --query "term" --json
# Graph-filtered search
memvid find memory.mv2 --query "revenue" --graph "?:works_at:Acme"
Ask (RAG)
Copy
# Ask a question
memvid ask memory.mv2 --question "What is the main topic?"
# Choose synthesis model
memvid ask memory.mv2 --question "..." --use-model tinyllama # Local (default)
memvid ask memory.mv2 --question "..." --use-model openai # GPT-4
memvid ask memory.mv2 --question "..." --use-model claude # Claude
memvid ask memory.mv2 --question "..." --use-model groq # Llama via Groq
memvid ask memory.mv2 --question "..." --use-model gemini # Gemini
# Get context only (no synthesis)
memvid ask memory.mv2 --question "..." --context-only
# Include sources
memvid ask memory.mv2 --question "..." --sources
# Mask PII in response
memvid ask memory.mv2 --question "..." --mask-pii
# Include memory cards
memvid ask memory.mv2 --question "..." --memories
Browse & View
Copy
# Timeline view
memvid timeline memory.mv2
memvid timeline memory.mv2 --limit 20
memvid timeline memory.mv2 --reverse
memvid timeline memory.mv2 --since 1704067200
memvid timeline memory.mv2 --until 1706745600
# View single frame
memvid view memory.mv2 --frame-id frame_abc123
memvid view memory.mv2 --uri "docs/intro"
memvid view memory.mv2 --frame-id frame_abc --json
# Play audio/video
memvid view memory.mv2 --frame-id frame_abc --play
memvid view memory.mv2 --frame-id frame_abc --play --start-seconds 30
# Time-travel queries
memvid find memory.mv2 --query "term" --as-of-frame frame_old
memvid find memory.mv2 --query "term" --as-of-ts "2024-01-01T00:00:00Z"
memvid timeline memory.mv2 --as-of-frame frame_old
Enrichment & Memory Cards
Copy
# Enrich with different engines
memvid enrich memory.mv2 --engine rules # Fast, free
memvid enrich memory.mv2 --engine candle # Local LLM
memvid enrich memory.mv2 --engine groq # Fast + quality
memvid enrich memory.mv2 --engine openai # GPT-4
memvid enrich memory.mv2 --engine claude # Claude
# Force re-enrichment
memvid enrich memory.mv2 --engine groq --force
# View memory cards
memvid memories memory.mv2
memvid memories memory.mv2 --json
# Query entity state
memvid state memory.mv2 --entity "John Smith"
memvid state memory.mv2 --entity "John Smith" --json
# View fact history
memvid facts memory.mv2 --entity "John Smith"
memvid facts memory.mv2 --entity "John" --predicate job_title
# Export facts
memvid export memory.mv2 --format ntriples --out facts.nt
memvid export memory.mv2 --format json --out facts.json
memvid export memory.mv2 --format csv --out facts.csv
Graph Traversal
Copy
# List entities
memvid follow entities memory.mv2
memvid follow entities memory.mv2 --kind person
memvid follow entities memory.mv2 --query "John"
# Traverse relationships
memvid follow traverse memory.mv2 --start "John Smith"
memvid follow traverse memory.mv2 --start "Acme" --link "employs"
memvid follow traverse memory.mv2 --start "Acme" --hops 3
# Graph statistics
memvid follow stats memory.mv2
Tables
Copy
# Import tables from PDF
memvid tables import memory.mv2 --input report.pdf
memvid tables import memory.mv2 --input report.pdf --mode conservative
# List tables
memvid tables list memory.mv2
# View table
memvid tables view memory.mv2 --table-id tbl_abc123
# Export table
memvid tables export memory.mv2 --table-id tbl_abc --format csv --out data.csv
memvid tables export memory.mv2 --table-id tbl_abc --format json --as-records
Maintenance
Copy
# Verify integrity
memvid verify memory.mv2
memvid verify memory.mv2 --deep
# Repair and optimize
memvid doctor memory.mv2 --vacuum # Compact storage
memvid doctor memory.mv2 --rebuild-lex-index # Rebuild lexical
memvid doctor memory.mv2 --rebuild-vec-index # Rebuild vectors
memvid doctor memory.mv2 --rebuild-time-index # Rebuild timeline
# Full repair
memvid doctor memory.mv2 --vacuum --rebuild-lex-index --rebuild-vec-index
# Build sketch index
memvid sketch build memory.mv2 --variant medium
memvid sketch info memory.mv2
# Check lock status
memvid who memory.mv2
memvid nudge memory.mv2 # Request lock release
Encryption
Copy
# Encrypt memory file
memvid lock memory.mv2 --out memory.mv2e
memvid lock memory.mv2 --out memory.mv2e --keep-original
# Encrypt from stdin (for scripts)
echo "password" | memvid lock memory.mv2 --password-stdin --out memory.mv2e
# Decrypt
memvid unlock memory.mv2e --out memory.mv2
echo "password" | memvid unlock memory.mv2e --password-stdin --out memory.mv2
Configuration
Copy
# Set API key
memvid config set api_key mv2_xxx
# Set dashboard URL
memvid config set dashboard_url https://memvid.com
# Set named memory
memvid config set memory.work <MEMORY_ID>
memvid config set memory.personal <MEMORY_ID>
# List configuration
memvid config list
memvid config list --show-values
# Get single value
memvid config get api_key
# Remove value
memvid config unset api_key
# Verify API key
memvid config check
# View system status
memvid status
memvid status --json
Plan & Usage
Copy
# Show plan info
memvid plan show
memvid plan show --json
# Sync plan from dashboard
memvid plan sync
# Clear cached ticket
memvid plan clear
Tickets & Capacity
Copy
# List current ticket
memvid tickets list memory.mv2
# Sync from dashboard
memvid tickets sync memory.mv2 --memory-id <UUID>
# Apply ticket
memvid tickets apply memory.mv2 --memory-id <UUID>
Models
Copy
# List available models
memvid models list
# Install model
memvid models install bge-base
memvid models install nomic
# Remove model
memvid models remove bge-base
# Verify model integrity
memvid models verify bge-small
Global Options
Copy
# Verbose output
memvid -v find memory.mv2 --query "term"
memvid -vv find memory.mv2 --query "term" # More verbose
# Specify embedding model
memvid -m nomic put memory.mv2 --input docs/
memvid -m openai put memory.mv2 --input docs/
# Available models: bge-small, bge-base, nomic, gte-large, openai
Common Workflows
Quick Start
Copy
memvid create brain.mv2
memvid put brain.mv2 --input ~/Documents/
memvid find brain.mv2 --query "meeting notes"
memvid ask brain.mv2 --question "What was decided in the last meeting?"
Code Search
Copy
memvid create code.mv2 --no-vec
memvid put code.mv2 --input ./src/
memvid find code.mv2 --query "handleAuth" --mode lex
Knowledge Base with Enrichment
Copy
memvid create kb.mv2
memvid put kb.mv2 --input ./docs/ --logic-mesh
memvid enrich kb.mv2 --engine groq
memvid state kb.mv2 --entity "Product"
memvid find kb.mv2 --query "pricing" --graph "?:feature:Product"
Encrypted Backup
Copy
memvid lock important.mv2 --out backups/important-$(date +%Y%m%d).mv2e
Environment Variables
Copy
MEMVID_API_KEY=mv2_xxx # Dashboard API key
MEMVID_DASHBOARD_URL=... # Custom dashboard URL
MEMVID_TELEMETRY=0 # Opt out of telemetry
OPENAI_API_KEY=sk-xxx # For OpenAI embeddings/LLM
ANTHROPIC_API_KEY=sk-ant-xxx # For Claude
GROQ_API_KEY=gsk_xxx # For Groq
GOOGLE_API_KEY=xxx # For Gemini
Getting Help
Copy
# General help
memvid --help
# Command-specific help
memvid find --help
memvid put --help
memvid ask --help
# Version
memvid --version