Skip to main content
The Memvid CLI provides complete control over your memory files from the command line. Every operation available in the SDKs is also available via the CLI.

Installation

# npm (recommended)
npm install -g memvid-cli

# Verify installation
memvid --version
See Installation Guide for platform-specific instructions and troubleshooting.

Command Categories

CategoryCommandsDescription
Creationcreate, openCreate and inspect memory files
Dataput, put-many, update, delete, api-fetchAdd, modify, and remove documents
Searchfind, ask, vec-search, timeline, when, auditQuery and retrieve information
Enrichmentenrich, memories, state, facts, export, schemaExtract and query structured facts
Tablestables import, tables list, tables export, tables viewPDF table extraction
Maintenanceverify, doctor, nudgeFile integrity and repair
Sessionssession start, session end, session replayTime-travel debugging
Securitylock, unlock, binding, unbindEncryption and access control
Ticketstickets sync, tickets apply, plan showCapacity and subscription management
Modelsmodels install, models list, models removeLLM and embedding model management

Global Options

These options apply to all commands:
# Increase logging verbosity
memvid --verbose find memory.mv2 --query "test"
memvid -vvv find memory.mv2 --query "test"  # Maximum verbosity

# Set default embedding model
memvid --model bge-small find memory.mv2 --query "test"
memvid -m openai find memory.mv2 --query "test"

# JSON output (most commands support this)
memvid find memory.mv2 --query "test" --json

Environment Variables

VariableDescriptionExample
MEMVID_API_KEYDashboard API key for syncmv_live_xxx
OPENAI_API_KEYOpenAI API key for embeddings/LLMsk-xxx
NVIDIA_API_KEYNVIDIA API key for embeddingsnvapi-xxx
GEMINI_API_KEYGoogle Gemini API keyAIzaxxx
MISTRAL_API_KEYMistral API keyxxx
MEMVID_TELEMETRYDisable telemetry (set to 0)0
MEMVID_LLM_CONTEXT_BUDGETMax context chars for LLMs8000

Common Workflows

Basic Document Ingestion

# Create memory and add documents
memvid create project.mv2

# Add a text file
cat notes.txt | memvid put project.mv2 --title "Notes"

# Add a PDF
memvid put project.mv2 --input report.pdf --title "Report"

# Add with metadata
memvid put project.mv2 --input doc.txt \
  --title "Meeting Notes" \
  --track meetings \
  --tag "date=2024-01-15" \
  --tag "attendees=alice,bob" \
  --label important

Search and Retrieval

# Simple search
memvid find project.mv2 --query "budget projections"

# Semantic search with embeddings
memvid find project.mv2 --query "financial outlook" --mode sem

# Ask questions with LLM
memvid ask project.mv2 --question "What was decided about the budget?" --use-model openai

# Time-filtered search
memvid find project.mv2 --query "status" --as-of-ts 1704067200

Fact Extraction and Entity Queries

# Extract facts (fast, offline)
memvid enrich project.mv2 --engine rules

# Extract facts (LLM, more accurate)
memvid enrich project.mv2 --engine openai

# View all facts
memvid memories project.mv2

# Query specific entity
memvid state project.mv2 "Alice"

# Export facts
memvid export project.mv2 -o facts.json --format json

PDF Table Extraction

# Extract tables from PDF
memvid tables import project.mv2 --input financial.pdf

# List extracted tables
memvid tables list project.mv2

# Export table to CSV
memvid tables export project.mv2 --table-id tbl_001 -o table.csv

Output Formats

Most commands support --json for machine-readable output:
# Human-readable (default)
memvid find project.mv2 --query "test"

# JSON output
memvid find project.mv2 --query "test" --json

# Parse with jq
memvid find project.mv2 --query "test" --json | jq '.hits[0].title'

Exit Codes

CodeMeaning
0Success
1General error
2File not found
3Permission denied
4Capacity exceeded
5Lock conflict

Next Steps