voyageai-cli 1.20.5 → 1.21.0
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/CHANGELOG.md +142 -26
- package/README.md +153 -2
- package/package.json +1 -1
- package/src/cli.js +12 -0
- package/src/commands/about.js +39 -3
- package/src/commands/doctor.js +325 -0
- package/src/commands/eval.js +420 -10
- package/src/commands/generate.js +220 -0
- package/src/commands/playground.js +93 -0
- package/src/commands/purge.js +271 -0
- package/src/commands/quickstart.js +203 -0
- package/src/commands/refresh.js +322 -0
- package/src/commands/scaffold.js +217 -0
- package/src/lib/codegen.js +313 -0
- package/src/lib/explanations.js +163 -1
- package/src/lib/scaffold-structure.js +114 -0
- package/src/lib/templates/nextjs/README.md.tpl +106 -0
- package/src/lib/templates/nextjs/env.example.tpl +8 -0
- package/src/lib/templates/nextjs/layout.jsx.tpl +29 -0
- package/src/lib/templates/nextjs/lib-mongo.js.tpl +111 -0
- package/src/lib/templates/nextjs/lib-voyage.js.tpl +103 -0
- package/src/lib/templates/nextjs/package.json.tpl +33 -0
- package/src/lib/templates/nextjs/page-search.jsx.tpl +147 -0
- package/src/lib/templates/nextjs/route-ingest.js.tpl +114 -0
- package/src/lib/templates/nextjs/route-search.js.tpl +97 -0
- package/src/lib/templates/nextjs/theme.js.tpl +84 -0
- package/src/lib/templates/python/README.md.tpl +145 -0
- package/src/lib/templates/python/app.py.tpl +221 -0
- package/src/lib/templates/python/chunker.py.tpl +127 -0
- package/src/lib/templates/python/env.example.tpl +12 -0
- package/src/lib/templates/python/mongo_client.py.tpl +125 -0
- package/src/lib/templates/python/requirements.txt.tpl +10 -0
- package/src/lib/templates/python/voyage_client.py.tpl +124 -0
- package/src/lib/templates/vanilla/README.md.tpl +156 -0
- package/src/lib/templates/vanilla/client.js.tpl +103 -0
- package/src/lib/templates/vanilla/connection.js.tpl +126 -0
- package/src/lib/templates/vanilla/env.example.tpl +11 -0
- package/src/lib/templates/vanilla/ingest.js.tpl +231 -0
- package/src/lib/templates/vanilla/package.json.tpl +31 -0
- package/src/lib/templates/vanilla/retrieval.js.tpl +100 -0
- package/src/lib/templates/vanilla/search-api.js.tpl +175 -0
- package/src/lib/templates/vanilla/server.js.tpl +81 -0
- package/src/lib/zip.js +130 -0
- package/src/playground/index.html +772 -33
package/CHANGELOG.md
CHANGED
|
@@ -4,49 +4,165 @@ All notable changes to voyageai-cli are documented here.
|
|
|
4
4
|
|
|
5
5
|
Format based on [Keep a Changelog](https://keepachangelog.com/).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [1.21.0] - 2026-02-10
|
|
8
8
|
|
|
9
9
|
### Added
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
10
|
+
- **`vai generate`** — Emit production code snippets for RAG applications
|
|
11
|
+
- Components: client, connection, retrieval, ingest, search-api
|
|
12
|
+
- Targets: Node.js/Express, Next.js/MUI, Python/Flask
|
|
13
|
+
- Auto-detects target from project files
|
|
14
|
+
- Reads configuration from `.vai.json`
|
|
15
|
+
- **`vai scaffold`** — Create complete starter projects
|
|
16
|
+
- Vanilla (9 files), Next.js (13 files), Python (8 files)
|
|
17
|
+
- Includes server, API routes, client, connection, retrieval, ingest
|
|
18
|
+
- `.env.example` and README with setup instructions
|
|
19
|
+
- **`vai purge`** — Remove embeddings from MongoDB by criteria
|
|
20
|
+
- Filter by `--source`, `--before`, `--model`, `--stale`
|
|
21
|
+
- `--dry-run` for safe preview before deletion
|
|
22
|
+
- **`vai refresh`** — Re-embed documents with new model/settings
|
|
23
|
+
- `--model` and `--dimensions` for model upgrades
|
|
24
|
+
- `--rechunk` to re-chunk before re-embedding
|
|
25
|
+
- Batch processing with progress reporting
|
|
26
|
+
- **`vai eval compare`** — Compare multiple configurations side-by-side
|
|
27
|
+
- **`vai eval --save/--baseline`** — Track quality metrics over time
|
|
28
|
+
- **`vai init`** — Modernized with @clack/prompts and back navigation
|
|
29
|
+
- **Desktop App: Check for Updates** — Menu item in app menu (macOS) / Help menu (Windows/Linux)
|
|
30
|
+
- **Desktop App: Generate tab** — Code generation and scaffold UI
|
|
31
|
+
- Electron: Create projects on disk with native file dialog
|
|
32
|
+
- Web: Download as ZIP file
|
|
33
|
+
- **Playground: ZIP scaffold** — `/api/scaffold` endpoint for web mode
|
|
34
|
+
- **Onboarding walkthrough** — Updated to 9 steps covering all tabs
|
|
35
|
+
- **Sidebar reorganized** — Tools (Embed, Compare, Search, Multimodal, Generate) / Learn (Benchmark, Explore, About)
|
|
36
|
+
- 3 new explanation topics: `code-generation`, `scaffolding`, `eval-comparison`
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- Template engine (`src/lib/codegen.js`) supports `{{var}}`, `{{#if}}`, `{{#each}}` — no external deps
|
|
40
|
+
- 390 tests (up from 360)
|
|
41
|
+
|
|
42
|
+
## [1.20.0] - 2026-02-04
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
- **Desktop App** — Signed and notarized macOS DMG via electron-builder
|
|
46
|
+
- Auto-update via electron-updater
|
|
47
|
+
- Settings cog in header for API key management
|
|
48
|
+
- OS keychain encryption for stored credentials
|
|
49
|
+
- **Multimodal tab** — Image ↔ text similarity, cross-modal gallery search
|
|
50
|
+
- **Vector Space Invaders** — Easter egg (Konami code or 7x logo click)
|
|
51
|
+
- Anonymous telemetry to vai.mlynn.org (opt-out available)
|
|
52
|
+
- 4 new multimodal explanation topics
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
- CLI npm package optimized with `files` whitelist (327KB, was 550MB)
|
|
56
|
+
|
|
57
|
+
## [1.19.0] - 2026-02-03
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
- **`vai benchmark`** — 8 subcommands for model comparison
|
|
61
|
+
- `embed`, `rerank`, `similarity`, `cost`, `batch`, `asymmetric`, `quantization`, `space`
|
|
62
|
+
- Latency (p50/p95), throughput, cost per million tokens
|
|
63
|
+
- `--save` results to JSON
|
|
64
|
+
- **`vai estimate`** — Cost calculator for symmetric vs asymmetric retrieval
|
|
65
|
+
- Marketing site vai.mlynn.org deployed
|
|
66
|
+
|
|
67
|
+
## [1.18.0] - 2026-02-02
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
- **`vai eval`** — Evaluate retrieval quality with MRR, nDCG, Recall@K, Precision@K
|
|
71
|
+
- Supports retrieval and rerank modes
|
|
72
|
+
- Custom K values and test sets
|
|
73
|
+
- **`vai query`** — Two-stage retrieval (vector search + rerank)
|
|
74
|
+
- **`vai pipeline`** — End-to-end chunk → embed → store
|
|
75
|
+
- `--create-index` flag for automatic index creation
|
|
76
|
+
- Progress reporting on stderr
|
|
77
|
+
- **`vai chunk`** — 5 chunking strategies (fixed, sentence, paragraph, recursive, markdown)
|
|
78
|
+
- **`vai init`** — Initialize project with `.vai.json` configuration
|
|
79
|
+
|
|
80
|
+
## [1.17.0] - 2026-02-01
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
- **Playground** — Web UI at `vai playground`
|
|
84
|
+
- Embed, Compare, Search, Benchmark tabs
|
|
85
|
+
- Model selector, dark/light theme toggle
|
|
86
|
+
- Real-time similarity heatmap
|
|
87
|
+
- **`vai explain`** — 22 interactive concept explainers
|
|
88
|
+
- Topics: embeddings, reranking, vector-search, RAG, cosine-similarity, etc.
|
|
89
|
+
- Alias resolution for common terms
|
|
90
|
+
- Links and "try it" commands for each topic
|
|
91
|
+
- **`vai app`** — Launch Electron desktop app
|
|
92
|
+
- **`vai completions`** — Shell completions for bash and zsh
|
|
93
|
+
- **`vai about`** — Version and system info
|
|
94
|
+
|
|
95
|
+
## [1.15.0] - 2026-01-30
|
|
96
|
+
|
|
97
|
+
### Added
|
|
98
|
+
- **voyage-4 model family** support
|
|
99
|
+
- voyage-4-large, voyage-4, voyage-4-lite
|
|
100
|
+
- Shared embedding space for asymmetric retrieval
|
|
101
|
+
- MoE architecture detection
|
|
102
|
+
- **Quantization support** — `--output-dtype` for int8/ubinary embeddings
|
|
103
|
+
- **Dimensions parameter** — `--dimensions` for reduced output dimensions
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
- Default model updated to voyage-4-lite
|
|
107
|
+
- MODEL_CATALOG expanded with architecture info and benchmark scores
|
|
108
|
+
|
|
109
|
+
## [1.10.0] - 2026-01-25
|
|
110
|
+
|
|
111
|
+
### Added
|
|
112
|
+
- **`vai ingest`** — Bulk import from JSONL/JSON/CSV/text
|
|
113
|
+
- Batching with configurable batch size
|
|
114
|
+
- Progress bar and dry-run mode
|
|
115
|
+
- Token estimation and cost preview
|
|
116
|
+
- **`vai similarity`** — Compute cosine similarity without MongoDB
|
|
117
|
+
- **`vai demo`** — Interactive guided walkthrough
|
|
13
118
|
- ASCII banner when running `vai` with no arguments
|
|
14
|
-
- CONTRIBUTING.md for open-source contributors
|
|
15
|
-
- This changelog
|
|
16
119
|
|
|
17
|
-
|
|
120
|
+
### Changed
|
|
121
|
+
- Improved error messages with actionable hints
|
|
122
|
+
- Rate limit retry with exponential backoff (up to 3 attempts)
|
|
123
|
+
|
|
124
|
+
## [1.5.0] - 2026-01-20
|
|
125
|
+
|
|
126
|
+
### Added
|
|
127
|
+
- **PDF support** — Optional pdf-parse dependency for `vai pipeline`
|
|
128
|
+
- **HTML stripping** — Automatic for .html files
|
|
129
|
+
- **Readers module** — Unified file reading with type detection
|
|
130
|
+
- **Directory scanning** — Recursive with extension filtering
|
|
131
|
+
|
|
132
|
+
### Fixed
|
|
133
|
+
- JSONL parsing edge cases
|
|
134
|
+
- Empty chunk handling
|
|
135
|
+
|
|
136
|
+
## [1.1.0] - 2026-01-15
|
|
18
137
|
|
|
19
138
|
### Added
|
|
20
|
-
-
|
|
139
|
+
- **`vai config`** — Persistent config management (`~/.vai/config.json`)
|
|
21
140
|
- `set`, `get`, `delete`, `path`, `reset` subcommands
|
|
22
141
|
- Secrets masked in output, config file chmod 600
|
|
23
|
-
- `--stdin` flag for secure key input
|
|
24
|
-
-
|
|
142
|
+
- `--stdin` flag for secure key input
|
|
143
|
+
- **`vai ping`** — Test API and MongoDB connectivity
|
|
25
144
|
- `.env` file support via dotenv
|
|
26
|
-
- Colored output with picocolors
|
|
27
|
-
- Animated spinners on
|
|
28
|
-
- npm update notifier (
|
|
145
|
+
- Colored output with picocolors
|
|
146
|
+
- Animated spinners on network operations
|
|
147
|
+
- npm update notifier (daily, non-blocking)
|
|
29
148
|
- GitHub Actions CI (Node 18, 20, 22)
|
|
30
|
-
- README badges (CI, npm, license, node version)
|
|
31
|
-
- Credential priority chain: env var → .env → config file
|
|
32
|
-
- Security documentation in README
|
|
33
149
|
|
|
34
150
|
### Fixed
|
|
35
|
-
- `
|
|
36
|
-
- `
|
|
37
|
-
- `index create` parseInt handling for dimensions (was producing NaN)
|
|
151
|
+
- `rerank` endpoint corrected to `/v1/rerank`
|
|
152
|
+
- `index create` parseInt handling for dimensions
|
|
38
153
|
|
|
39
|
-
## [1.0.0] - 2026-
|
|
154
|
+
## [1.0.0] - 2026-01-10
|
|
40
155
|
|
|
41
156
|
### Added
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
157
|
+
- **`vai embed`** — Generate embeddings (text, file, stdin, bulk)
|
|
158
|
+
- **`vai rerank`** — Rerank documents with relevance scoring
|
|
159
|
+
- **`vai store`** — Embed and insert into MongoDB Atlas
|
|
160
|
+
- **`vai search`** — $vectorSearch with pre-filter support
|
|
161
|
+
- **`vai index`** — Create, list, delete Atlas Vector Search indexes
|
|
162
|
+
- **`vai models`** — List available Voyage AI models with pricing
|
|
48
163
|
- REST API integration with `https://ai.mongodb.com/v1/`
|
|
49
164
|
- MongoDB Atlas Vector Search integration
|
|
50
165
|
- API retry on 429 with exponential backoff
|
|
51
166
|
- `--json` and `--quiet` flags on all commands
|
|
52
167
|
- 50+ unit tests
|
|
168
|
+
- MIT license
|
package/README.md
CHANGED
|
@@ -12,6 +12,28 @@ The fastest path from documents to semantic search. Chunk files, generate [Voyag
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## Why Voyage AI?
|
|
16
|
+
|
|
17
|
+
Voyage AI provides **state-of-the-art embedding models** with the best quality-to-cost ratio in the industry. Here's why developers choose Voyage AI:
|
|
18
|
+
|
|
19
|
+
| Advantage | What It Means |
|
|
20
|
+
|-----------|---------------|
|
|
21
|
+
| **🎯 #1 on MTEB** | Voyage-3 ranks first on retrieval benchmarks, outperforming OpenAI, Cohere, and other providers |
|
|
22
|
+
| **💰 Up to 83% Cost Savings** | Asymmetric retrieval: embed docs with `voyage-3-lite`, query with `voyage-3-large` — same quality, fraction of the cost |
|
|
23
|
+
| **🔗 Shared Embedding Space** | All Voyage-3 models produce compatible embeddings — mix and match for optimal cost-quality tradeoffs |
|
|
24
|
+
| **🏢 Domain-Specific Models** | Specialized models for code, finance, law, and multilingual content that beat general-purpose alternatives |
|
|
25
|
+
| **⚡ Two-Stage Retrieval** | Rerank-2 boosts search precision by re-scoring candidates with a powerful cross-encoder |
|
|
26
|
+
|
|
27
|
+
**Get started:**
|
|
28
|
+
```bash
|
|
29
|
+
# Get a free API key at https://dash.voyageai.com
|
|
30
|
+
vai quickstart # Interactive tutorial — zero to semantic search in 2 minutes
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Learn more:** [Voyage AI Docs](https://docs.voyageai.com) · [Pricing](https://voyageai.com/pricing) · [Blog](https://blog.voyageai.com)
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
15
37
|
## Three Ways to Use It
|
|
16
38
|
|
|
17
39
|
<table>
|
|
@@ -44,6 +66,7 @@ MongoDB LeafyGreen design system<br/><br/>
|
|
|
44
66
|
|
|
45
67
|
## Table of Contents
|
|
46
68
|
|
|
69
|
+
- [Why Voyage AI?](#why-voyage-ai)
|
|
47
70
|
- [Desktop App](#desktop-app)
|
|
48
71
|
- [Web Playground](#web-playground)
|
|
49
72
|
- [CLI — Quick Start](#cli--quick-start)
|
|
@@ -173,6 +196,91 @@ Creates `.vai.json` with your defaults — model, database, collection, chunking
|
|
|
173
196
|
}
|
|
174
197
|
```
|
|
175
198
|
|
|
199
|
+
### Code Generation & Scaffolding
|
|
200
|
+
|
|
201
|
+
#### `vai generate` — Production code snippets
|
|
202
|
+
|
|
203
|
+
Generate ready-to-use code from your `.vai.json` config:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
# List available components
|
|
207
|
+
vai generate --list
|
|
208
|
+
|
|
209
|
+
# Generate and pipe to files
|
|
210
|
+
vai generate client > lib/voyage.js
|
|
211
|
+
vai generate retrieval > lib/retrieval.js
|
|
212
|
+
vai generate search-api > routes/search.js
|
|
213
|
+
|
|
214
|
+
# Different targets
|
|
215
|
+
vai generate client --target python # Flask
|
|
216
|
+
vai generate retrieval --target nextjs # Next.js + MUI
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Components: `client`, `connection`, `retrieval`, `ingest`, `search-api`
|
|
220
|
+
|
|
221
|
+
Targets: `vanilla` (Node.js/Express), `nextjs` (Next.js + MUI), `python` (Flask)
|
|
222
|
+
|
|
223
|
+
#### `vai scaffold` — Complete starter projects
|
|
224
|
+
|
|
225
|
+
Create a full project directory with all files pre-configured:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# Node.js + Express API (9 files)
|
|
229
|
+
vai scaffold my-rag-api
|
|
230
|
+
|
|
231
|
+
# Next.js + Material UI (13 files)
|
|
232
|
+
vai scaffold my-app --target nextjs
|
|
233
|
+
|
|
234
|
+
# Python + Flask (8 files)
|
|
235
|
+
vai scaffold flask-api --target python
|
|
236
|
+
|
|
237
|
+
# Preview without creating files
|
|
238
|
+
vai scaffold my-app --dry-run
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Each project includes: server, API routes, Voyage AI client, MongoDB connection, retrieval module, ingestion pipeline, `.env.example`, and README.
|
|
242
|
+
|
|
243
|
+
### Data Lifecycle
|
|
244
|
+
|
|
245
|
+
#### `vai purge` — Remove stale embeddings
|
|
246
|
+
|
|
247
|
+
Remove embeddings from MongoDB based on criteria:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
# Remove docs embedded with an old model
|
|
251
|
+
vai purge --model voyage-3.5
|
|
252
|
+
|
|
253
|
+
# Remove docs whose source files no longer exist
|
|
254
|
+
vai purge --stale
|
|
255
|
+
|
|
256
|
+
# Remove docs older than a date
|
|
257
|
+
vai purge --before 2026-01-01
|
|
258
|
+
|
|
259
|
+
# Filter by source pattern
|
|
260
|
+
vai purge --source "docs/old/*.md"
|
|
261
|
+
|
|
262
|
+
# Preview before deleting
|
|
263
|
+
vai purge --model voyage-3.5 --dry-run
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
#### `vai refresh` — Re-embed with new settings
|
|
267
|
+
|
|
268
|
+
Re-embed documents in-place with a new model, dimensions, or chunk settings:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
# Upgrade to a new model
|
|
272
|
+
vai refresh --model voyage-4-large
|
|
273
|
+
|
|
274
|
+
# Change dimensions for cost savings
|
|
275
|
+
vai refresh --model voyage-4-large --dimensions 256
|
|
276
|
+
|
|
277
|
+
# Re-chunk with a better strategy, then re-embed
|
|
278
|
+
vai refresh --rechunk --strategy markdown --chunk-size 1024
|
|
279
|
+
|
|
280
|
+
# Preview what would change
|
|
281
|
+
vai refresh --model voyage-4-large --dry-run
|
|
282
|
+
```
|
|
283
|
+
|
|
176
284
|
### Core Workflow
|
|
177
285
|
|
|
178
286
|
#### `vai pipeline` — Chunk → embed → store
|
|
@@ -322,6 +430,37 @@ vai benchmark quantization --model voyage-4-large --dtypes float,int8,ubinary
|
|
|
322
430
|
vai benchmark cost --tokens 500 --volumes 100,1000,10000,100000
|
|
323
431
|
```
|
|
324
432
|
|
|
433
|
+
### Evaluation
|
|
434
|
+
|
|
435
|
+
Measure and compare your retrieval quality:
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
# Evaluate retrieval pipeline
|
|
439
|
+
vai eval --test-set test.jsonl --db myapp --collection docs
|
|
440
|
+
|
|
441
|
+
# Save results for later comparison
|
|
442
|
+
vai eval --test-set test.jsonl --save baseline.json
|
|
443
|
+
|
|
444
|
+
# Compare against a baseline (shows deltas)
|
|
445
|
+
vai eval --test-set test.jsonl --baseline baseline.json
|
|
446
|
+
|
|
447
|
+
# Compare multiple configurations
|
|
448
|
+
vai eval compare --test-set test.jsonl --configs baseline.json,experiment.json
|
|
449
|
+
|
|
450
|
+
# Evaluate reranking in isolation
|
|
451
|
+
vai eval --mode rerank --test-set rerank-test.jsonl
|
|
452
|
+
|
|
453
|
+
# Compare rerank models
|
|
454
|
+
vai eval --mode rerank --models "rerank-2.5,rerank-2.5-lite" --test-set test.jsonl
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
**Metrics:** MRR, nDCG@K, Recall@K, MAP, Precision@K
|
|
458
|
+
|
|
459
|
+
**Test set format (JSONL):**
|
|
460
|
+
```json
|
|
461
|
+
{"query": "What is vector search?", "relevant": ["doc_id_1", "doc_id_2"]}
|
|
462
|
+
```
|
|
463
|
+
|
|
325
464
|
### Learn
|
|
326
465
|
|
|
327
466
|
Interactive explanations of key concepts:
|
|
@@ -371,21 +510,33 @@ Covers all 22 commands, subcommands, flags, model names, and explain topics.
|
|
|
371
510
|
|
|
372
511
|
| Command | Description |
|
|
373
512
|
|---------|-------------|
|
|
513
|
+
| **Project Setup** | |
|
|
374
514
|
| `vai init` | Initialize project with `.vai.json` |
|
|
515
|
+
| `vai generate` | Generate code snippets (retrieval, ingest, client) |
|
|
516
|
+
| `vai scaffold` | Create complete starter projects |
|
|
517
|
+
| **RAG Pipeline** | |
|
|
375
518
|
| `vai pipeline` | Chunk → embed → store (end-to-end) |
|
|
376
519
|
| `vai query` | Search + rerank (two-stage retrieval) |
|
|
377
520
|
| `vai chunk` | Chunk documents (5 strategies) |
|
|
378
521
|
| `vai estimate` | Cost estimator (symmetric vs asymmetric) |
|
|
522
|
+
| **Embeddings** | |
|
|
379
523
|
| `vai embed` | Generate embeddings |
|
|
380
524
|
| `vai rerank` | Rerank documents by relevance |
|
|
381
525
|
| `vai similarity` | Compare text similarity |
|
|
526
|
+
| **Data Management** | |
|
|
382
527
|
| `vai store` | Embed and store single documents |
|
|
383
528
|
| `vai ingest` | Bulk import with progress |
|
|
384
529
|
| `vai search` | Vector similarity search |
|
|
385
530
|
| `vai index` | Manage Atlas Vector Search indexes |
|
|
386
|
-
| `vai
|
|
531
|
+
| `vai purge` | Remove embeddings by criteria |
|
|
532
|
+
| `vai refresh` | Re-embed with new model/settings |
|
|
533
|
+
| **Evaluation** | |
|
|
534
|
+
| `vai eval` | Evaluate retrieval quality (MRR, nDCG, Recall) |
|
|
535
|
+
| `vai eval compare` | Compare configurations side-by-side |
|
|
387
536
|
| `vai benchmark` | 8 subcommands for model comparison |
|
|
388
|
-
|
|
|
537
|
+
| **Tools & Learning** | |
|
|
538
|
+
| `vai models` | List models, benchmarks, architecture |
|
|
539
|
+
| `vai explain` | 25 interactive concept explainers |
|
|
389
540
|
| `vai config` | Manage persistent configuration |
|
|
390
541
|
| `vai ping` | Test API and MongoDB connectivity |
|
|
391
542
|
| `vai playground` | Interactive web playground |
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -26,8 +26,14 @@ const { registerChunk } = require('./commands/chunk');
|
|
|
26
26
|
const { registerQuery } = require('./commands/query');
|
|
27
27
|
const { registerPipeline } = require('./commands/pipeline');
|
|
28
28
|
const { registerEval } = require('./commands/eval');
|
|
29
|
+
const { registerGenerate } = require('./commands/generate');
|
|
30
|
+
const { registerScaffold } = require('./commands/scaffold');
|
|
31
|
+
const { register: registerPurge } = require('./commands/purge');
|
|
32
|
+
const { register: registerRefresh } = require('./commands/refresh');
|
|
29
33
|
const { registerApp } = require('./commands/app');
|
|
30
34
|
const { registerAbout } = require('./commands/about');
|
|
35
|
+
const { register: registerDoctor } = require('./commands/doctor');
|
|
36
|
+
const { register: registerQuickstart } = require('./commands/quickstart');
|
|
31
37
|
const { showBanner, showQuickStart, getVersion } = require('./lib/banner');
|
|
32
38
|
|
|
33
39
|
const version = getVersion();
|
|
@@ -58,8 +64,14 @@ registerChunk(program);
|
|
|
58
64
|
registerQuery(program);
|
|
59
65
|
registerPipeline(program);
|
|
60
66
|
registerEval(program);
|
|
67
|
+
registerGenerate(program);
|
|
68
|
+
registerScaffold(program);
|
|
69
|
+
registerPurge(program);
|
|
70
|
+
registerRefresh(program);
|
|
61
71
|
registerApp(program);
|
|
62
72
|
registerAbout(program);
|
|
73
|
+
registerDoctor(program);
|
|
74
|
+
registerQuickstart(program);
|
|
63
75
|
|
|
64
76
|
// Append disclaimer to all help output
|
|
65
77
|
program.addHelpText('after', `
|
package/src/commands/about.js
CHANGED
|
@@ -20,6 +20,7 @@ function registerAbout(program) {
|
|
|
20
20
|
name: 'Michael Lynn',
|
|
21
21
|
role: 'Principal Staff Developer Advocate, MongoDB',
|
|
22
22
|
github: 'https://github.com/mrlynn',
|
|
23
|
+
vai_website: 'https://vai.mlynn.org',
|
|
23
24
|
website: 'https://mlynn.org',
|
|
24
25
|
},
|
|
25
26
|
links: {
|
|
@@ -52,23 +53,58 @@ function registerAbout(program) {
|
|
|
52
53
|
console.log(` into their applications — right from the terminal.`);
|
|
53
54
|
console.log('');
|
|
54
55
|
|
|
56
|
+
// Why Voyage AI?
|
|
57
|
+
console.log(` ${pc.bold(pc.green('Why Voyage AI?'))}`);
|
|
58
|
+
console.log(` Voyage AI provides state-of-the-art embedding models with`);
|
|
59
|
+
console.log(` the best quality-to-cost ratio in the industry.`);
|
|
60
|
+
console.log('');
|
|
61
|
+
console.log(` ${pc.cyan('🎯 SOTA Quality')}`);
|
|
62
|
+
console.log(` Voyage-3 ranks #1 on MTEB retrieval benchmarks, outperforming`);
|
|
63
|
+
console.log(` OpenAI, Cohere, and other providers on real-world tasks.`);
|
|
64
|
+
console.log('');
|
|
65
|
+
console.log(` ${pc.cyan('💰 Best Value')}`);
|
|
66
|
+
console.log(` Up to 83% cost reduction with asymmetric retrieval: embed`);
|
|
67
|
+
console.log(` documents with voyage-3-lite, query with voyage-3-large.`);
|
|
68
|
+
console.log('');
|
|
69
|
+
console.log(` ${pc.cyan('🔗 Shared Embedding Space')}`);
|
|
70
|
+
console.log(` All Voyage-3 models share the same embedding space — mix`);
|
|
71
|
+
console.log(` and match models for optimal cost-quality tradeoffs.`);
|
|
72
|
+
console.log('');
|
|
73
|
+
console.log(` ${pc.cyan('🏢 Domain-Specific Models')}`);
|
|
74
|
+
console.log(` Specialized models for code, finance, law, and multilingual`);
|
|
75
|
+
console.log(` content that outperform general-purpose alternatives.`);
|
|
76
|
+
console.log('');
|
|
77
|
+
console.log(` ${pc.cyan('⚡ Reranking')}`);
|
|
78
|
+
console.log(` Two-stage retrieval with rerank-2 boosts precision by`);
|
|
79
|
+
console.log(` re-scoring candidates with a powerful cross-encoder.`);
|
|
80
|
+
console.log('');
|
|
81
|
+
|
|
55
82
|
// Features
|
|
56
83
|
console.log(` ${pc.bold('What You Can Do')}`);
|
|
84
|
+
console.log(` ${pc.cyan('vai quickstart')} Zero-to-search tutorial (start here!)`);
|
|
57
85
|
console.log(` ${pc.cyan('vai embed')} Generate vector embeddings for text`);
|
|
58
86
|
console.log(` ${pc.cyan('vai similarity')} Compare texts with cosine similarity`);
|
|
59
87
|
console.log(` ${pc.cyan('vai rerank')} Rerank documents against a query`);
|
|
60
88
|
console.log(` ${pc.cyan('vai search')} Vector search against Atlas collections`);
|
|
61
89
|
console.log(` ${pc.cyan('vai store')} Embed and store documents in Atlas`);
|
|
62
90
|
console.log(` ${pc.cyan('vai benchmark')} Compare model latency, ranking & costs`);
|
|
91
|
+
console.log(` ${pc.cyan('vai doctor')} Health-check your setup`);
|
|
63
92
|
console.log(` ${pc.cyan('vai explain')} Learn about embeddings, vector search & more`);
|
|
64
93
|
console.log(` ${pc.cyan('vai playground')} Launch interactive web playground`);
|
|
65
94
|
console.log('');
|
|
66
95
|
|
|
67
|
-
// Links
|
|
68
|
-
console.log(` ${pc.bold('
|
|
96
|
+
// Voyage AI Links
|
|
97
|
+
console.log(` ${pc.bold('Voyage AI Resources')}`);
|
|
98
|
+
console.log(` ${pc.dim('Docs:')} https://docs.voyageai.com`);
|
|
99
|
+
console.log(` ${pc.dim('Dashboard:')} https://dash.voyageai.com`);
|
|
100
|
+
console.log(` ${pc.dim('Pricing:')} https://voyageai.com/pricing`);
|
|
101
|
+
console.log(` ${pc.dim('Blog:')} https://blog.voyageai.com`);
|
|
102
|
+
console.log('');
|
|
103
|
+
|
|
104
|
+
// Tool Links
|
|
105
|
+
console.log(` ${pc.bold('This Tool')}`);
|
|
69
106
|
console.log(` ${pc.dim('npm:')} https://www.npmjs.com/package/voyageai-cli`);
|
|
70
107
|
console.log(` ${pc.dim('GitHub:')} https://github.com/mrlynn/voyageai-cli`);
|
|
71
|
-
console.log(` ${pc.dim('Docs:')} https://www.mongodb.com/docs/voyageai/`);
|
|
72
108
|
console.log(` ${pc.dim('Author:')} https://mlynn.org`);
|
|
73
109
|
console.log('');
|
|
74
110
|
|