Command Reference
vai provides a broad CLI surface organized by function. Every command supports --help for detailed usage.
Project Setup
| Command | Description |
|---|---|
vai init | Initialize a project with .vai.json config |
vai generate | Generate production code snippets (client, retrieval, ingest, search-api) |
vai scaffold | Create complete starter projects (Node.js, Next.js, Python) |
RAG Pipeline
| Command | Description |
|---|---|
vai pipeline | End-to-end: chunk files, embed, store in MongoDB, create index |
vai query | Two-stage retrieval: embed query, vector search, rerank results |
vai chunk | Split documents into chunks (5 strategies: fixed, sentence, paragraph, recursive, markdown) |
vai estimate | Compare embedding costs across models and strategies |
Embeddings and Reranking
| Command | Description |
|---|---|
vai nano | Set up and manage local voyage-4-nano inference |
vai embed | Generate vector embeddings for text |
vai rerank | Rerank documents by relevance to a query |
vai similarity | Compare text similarity using cosine distance |
Data Management
| Command | Description |
|---|---|
vai store | Embed and store a single document |
vai ingest | Bulk import documents from JSONL with progress tracking |
vai search | Vector similarity search against MongoDB Atlas |
vai index | Manage vector search indexes (create, list, delete) |
vai purge | Remove embeddings by model, date, source, or staleness |
vai refresh | Re-embed documents with a new model or dimensions |
Evaluation and Benchmarking
| Command | Description |
|---|---|
vai eval | Evaluate retrieval quality (MRR, nDCG, Recall, MAP, Precision) |
vai eval compare | Compare evaluation results across configurations |
vai benchmark | Run benchmarks (embed, rerank, asymmetric, quantization, cost, batch, space, e2e) |
MCP Server
| Command | Description |
|---|---|
vai mcp | Start the Model Context Protocol server (11 tools for AI editors) |
vai mcp install | Auto-install MCP server into Claude, Cursor, Windsurf, VS Code |
vai mcp uninstall | Remove MCP server from AI tool configs |
vai mcp status | Show MCP installation status across all supported tools |
Tools and Learning
| Command | Description |
|---|---|
vai models | List available models with architecture, pricing, and benchmark scores |
vai explain | Interactive explainer for 30+ topics (embeddings, RAG, reranking, etc.) |
vai config | Manage persistent configuration (set, get, delete, list, path, reset) |
vai ping | Test Voyage AI API and MongoDB Atlas connectivity |
vai playground | Launch the web playground (7 interactive tabs) |
vai completions | Generate shell completion scripts for Bash and Zsh |
vai demo | Guided interactive walkthrough of vai features |
vai about | Display version, system info, and project details |
Advanced
| Command | Description |
|---|---|
vai chat | Conversational RAG with Anthropic, OpenAI, or Ollama |
vai workflow run | Execute a workflow definition (built-in or custom) |
vai workflow validate | Validate workflow syntax, dependencies, and detect cycles |
vai workflow list | List built-in workflow templates |
vai workflow init | Scaffold a new workflow JSON file |
Global Flags
These flags work with any command:
| Flag | Description |
|---|---|
--help | Show command help |
-V, --version | Show vai version |
--json | Output in JSON format (machine-readable) |
--quiet | Suppress non-essential output |