memvid-cli 2.0.140 → 2.0.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -34
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,66 +1,196 @@
|
|
|
1
|
-
# memvid
|
|
1
|
+
# memvid
|
|
2
2
|
|
|
3
|
-
AI memory
|
|
3
|
+
A command-line tool for building and querying AI memory files. Store documents, search with BM25 + vector ranking, and run RAG queries from a single portable `.mv2` file.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Built in Rust. No database required.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
10
|
npm install -g memvid-cli
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
Or
|
|
13
|
+
Or run directly without installing:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
16
|
npx memvid-cli --help
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
##
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Create a memory and add some documents
|
|
23
|
+
memvid create research.mv2
|
|
24
|
+
memvid put research.mv2 --text "Rust achieves memory safety without garbage collection"
|
|
25
|
+
memvid put research.mv2 --text "Python excels at rapid prototyping and data analysis"
|
|
26
|
+
memvid put research.mv2 --input ./papers/
|
|
27
|
+
|
|
28
|
+
# Search
|
|
29
|
+
memvid find research.mv2 --query "memory safety"
|
|
30
|
+
|
|
31
|
+
# Ask questions (requires OPENAI_API_KEY for synthesis)
|
|
32
|
+
memvid ask research.mv2 --question "Compare Rust and Python for systems programming"
|
|
33
|
+
|
|
34
|
+
# Check stats
|
|
35
|
+
memvid stats research.mv2
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
|
|
40
|
+
### Creating and Ingesting
|
|
18
41
|
|
|
19
42
|
```bash
|
|
20
43
|
# Create a new memory file
|
|
21
|
-
memvid create
|
|
44
|
+
memvid create notes.mv2
|
|
22
45
|
|
|
23
|
-
# Add
|
|
24
|
-
memvid put
|
|
25
|
-
memvid put my-memory.mv2 --input folder/
|
|
46
|
+
# Add text directly
|
|
47
|
+
memvid put notes.mv2 --text "Your content here"
|
|
26
48
|
|
|
27
|
-
#
|
|
28
|
-
memvid
|
|
49
|
+
# Add from file (supports PDF, DOCX, TXT, MD, HTML, and more)
|
|
50
|
+
memvid put notes.mv2 --input document.pdf
|
|
29
51
|
|
|
30
|
-
#
|
|
31
|
-
memvid
|
|
52
|
+
# Add entire folder recursively
|
|
53
|
+
memvid put notes.mv2 --input ./documents/
|
|
32
54
|
|
|
33
|
-
#
|
|
34
|
-
memvid
|
|
55
|
+
# Batch ingest with embeddings for semantic search
|
|
56
|
+
memvid put-many notes.mv2 --input ./corpus/ --embedding bge-small
|
|
35
57
|
```
|
|
36
58
|
|
|
37
|
-
|
|
59
|
+
### Searching
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Lexical search (BM25)
|
|
63
|
+
memvid find notes.mv2 --query "machine learning"
|
|
64
|
+
|
|
65
|
+
# Semantic search (requires embeddings)
|
|
66
|
+
memvid find notes.mv2 --query "ML algorithms" --mode sem
|
|
67
|
+
|
|
68
|
+
# Hybrid search (lexical + semantic reranking)
|
|
69
|
+
memvid find notes.mv2 --query "neural networks" --mode auto
|
|
70
|
+
|
|
71
|
+
# Limit results
|
|
72
|
+
memvid find notes.mv2 --query "data" --k 5
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Question Answering
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Basic RAG query
|
|
79
|
+
memvid ask notes.mv2 --question "What are the key findings?"
|
|
80
|
+
|
|
81
|
+
# Use a specific model
|
|
82
|
+
memvid ask notes.mv2 --question "Summarize the main points" --model openai:gpt-4o
|
|
83
|
+
|
|
84
|
+
# Get context only (no LLM synthesis)
|
|
85
|
+
memvid ask notes.mv2 --question "What is discussed?" --context-only
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Inspection and Maintenance
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# View stats
|
|
92
|
+
memvid stats notes.mv2
|
|
93
|
+
|
|
94
|
+
# View timeline of recent additions
|
|
95
|
+
memvid timeline notes.mv2 --limit 20
|
|
96
|
+
|
|
97
|
+
# View a specific frame
|
|
98
|
+
memvid view notes.mv2 --frame 42
|
|
99
|
+
|
|
100
|
+
# Verify file integrity
|
|
101
|
+
memvid verify notes.mv2
|
|
102
|
+
|
|
103
|
+
# Repair indexes
|
|
104
|
+
memvid doctor notes.mv2 --rebuild-lex-index
|
|
105
|
+
```
|
|
38
106
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
107
|
+
## Embedding Models
|
|
108
|
+
|
|
109
|
+
For semantic search, you need to generate embeddings during ingestion:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Local models (fast, no API key needed)
|
|
113
|
+
memvid put notes.mv2 --input doc.pdf --embedding bge-small
|
|
114
|
+
memvid put notes.mv2 --input doc.pdf --embedding nomic
|
|
115
|
+
|
|
116
|
+
# OpenAI models (requires OPENAI_API_KEY)
|
|
117
|
+
memvid put notes.mv2 --input doc.pdf --embedding openai-small
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Available local models: `bge-small`, `bge-base`, `nomic`, `gte-large`
|
|
121
|
+
|
|
122
|
+
Available OpenAI models: `openai-small`, `openai-large`, `openai-ada`
|
|
123
|
+
|
|
124
|
+
**Windows users:** Local embedding models are not available on Windows due to ONNX runtime limitations. Use OpenAI embeddings instead:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
set OPENAI_API_KEY=sk-...
|
|
128
|
+
memvid put notes.mv2 --input doc.pdf --embedding openai-small
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Environment Variables
|
|
132
|
+
|
|
133
|
+
| Variable | Description |
|
|
134
|
+
|----------|-------------|
|
|
135
|
+
| `OPENAI_API_KEY` | Required for OpenAI embeddings and LLM synthesis |
|
|
136
|
+
| `OPENAI_BASE_URL` | Custom OpenAI-compatible endpoint |
|
|
137
|
+
| `NVIDIA_API_KEY` | For NVIDIA NIM embeddings |
|
|
138
|
+
| `MEMVID_MODELS_DIR` | Where to cache local embedding models |
|
|
139
|
+
| `MEMVID_API_KEY` | For capacity beyond the free tier |
|
|
47
140
|
|
|
48
141
|
## Supported Platforms
|
|
49
142
|
|
|
50
|
-
| Platform | Architecture |
|
|
51
|
-
|
|
52
|
-
| macOS | ARM64 (Apple Silicon) |
|
|
53
|
-
| macOS | x64 (Intel) |
|
|
54
|
-
| Linux | x64 (glibc) |
|
|
55
|
-
| Windows | x64 |
|
|
143
|
+
| Platform | Architecture | Local Embeddings |
|
|
144
|
+
|----------|--------------|------------------|
|
|
145
|
+
| macOS | ARM64 (Apple Silicon) | Yes |
|
|
146
|
+
| macOS | x64 (Intel) | Yes |
|
|
147
|
+
| Linux | x64 (glibc) | Yes |
|
|
148
|
+
| Windows | x64 | No (use OpenAI) |
|
|
56
149
|
|
|
57
|
-
|
|
150
|
+
## Document Formats
|
|
58
151
|
|
|
59
|
-
|
|
152
|
+
The CLI uses Apache Tika for document extraction and supports:
|
|
60
153
|
|
|
61
|
-
-
|
|
62
|
-
-
|
|
154
|
+
- PDF, DOCX, XLSX, PPTX
|
|
155
|
+
- HTML, XML, Markdown
|
|
156
|
+
- Plain text, CSV, JSON
|
|
157
|
+
- Images (with OCR when available)
|
|
158
|
+
- And many more
|
|
159
|
+
|
|
160
|
+
## Examples
|
|
161
|
+
|
|
162
|
+
### Build a Research Knowledge Base
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
memvid create papers.mv2
|
|
166
|
+
memvid put-many papers.mv2 --input ~/Downloads/arxiv/ --embedding bge-small
|
|
167
|
+
memvid ask papers.mv2 --question "What are recent advances in transformer architectures?"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Index Code Documentation
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
memvid create docs.mv2
|
|
174
|
+
memvid put docs.mv2 --input ./docs/ --label documentation
|
|
175
|
+
memvid put docs.mv2 --input ./README.md --label readme
|
|
176
|
+
memvid find docs.mv2 --query "authentication" --k 10
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Personal Note Archive
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
memvid create notes.mv2
|
|
183
|
+
memvid put notes.mv2 --text "Meeting with Alice: discussed Q4 roadmap" --label meeting
|
|
184
|
+
memvid put notes.mv2 --text "Idea: use vector search for semantic dedup" --label idea
|
|
185
|
+
memvid timeline notes.mv2 --limit 50
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## More Information
|
|
189
|
+
|
|
190
|
+
- Documentation: https://docs.memvid.com
|
|
63
191
|
- GitHub: https://github.com/memvid/memvid
|
|
192
|
+
- Discord: https://discord.gg/2mynS7fcK7
|
|
193
|
+
- Website: https://memvid.com
|
|
64
194
|
|
|
65
195
|
## License
|
|
66
196
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memvid-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.147",
|
|
4
4
|
"description": "AI memory CLI - crash-safe, single-file storage with semantic search",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"postinstall": "node scripts/postinstall.js"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@memvid/cli-darwin-arm64": "2.0.
|
|
36
|
-
"@memvid/cli-darwin-x64": "2.0.
|
|
37
|
-
"@memvid/cli-linux-x64": "2.0.
|
|
38
|
-
"@memvid/cli-win32-x64": "2.0.
|
|
35
|
+
"@memvid/cli-darwin-arm64": "2.0.147",
|
|
36
|
+
"@memvid/cli-darwin-x64": "2.0.147",
|
|
37
|
+
"@memvid/cli-linux-x64": "2.0.147",
|
|
38
|
+
"@memvid/cli-win32-x64": "2.0.147"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=14"
|