Skip to main content

Command Reference

vai provides a broad CLI surface organized by function. Every command supports --help for detailed usage.

Project Setup

CommandDescription
vai initInitialize a project with .vai.json config
vai generateGenerate production code snippets (client, retrieval, ingest, search-api)
vai scaffoldCreate complete starter projects (Node.js, Next.js, Python)

RAG Pipeline

CommandDescription
vai pipelineEnd-to-end: chunk files, embed, store in MongoDB, create index
vai queryTwo-stage retrieval: embed query, vector search, rerank results
vai chunkSplit documents into chunks (5 strategies: fixed, sentence, paragraph, recursive, markdown)
vai estimateCompare embedding costs across models and strategies

Embeddings and Reranking

CommandDescription
vai nanoSet up and manage local voyage-4-nano inference
vai embedGenerate vector embeddings for text
vai rerankRerank documents by relevance to a query
vai similarityCompare text similarity using cosine distance

Data Management

CommandDescription
vai storeEmbed and store a single document
vai ingestBulk import documents from JSONL with progress tracking
vai searchVector similarity search against MongoDB Atlas
vai indexManage vector search indexes (create, list, delete)
vai purgeRemove embeddings by model, date, source, or staleness
vai refreshRe-embed documents with a new model or dimensions

Evaluation and Benchmarking

CommandDescription
vai evalEvaluate retrieval quality (MRR, nDCG, Recall, MAP, Precision)
vai eval compareCompare evaluation results across configurations
vai benchmarkRun benchmarks (embed, rerank, asymmetric, quantization, cost, batch, space, e2e)

MCP Server

CommandDescription
vai mcpStart the Model Context Protocol server (11 tools for AI editors)
vai mcp installAuto-install MCP server into Claude, Cursor, Windsurf, VS Code
vai mcp uninstallRemove MCP server from AI tool configs
vai mcp statusShow MCP installation status across all supported tools

Tools and Learning

CommandDescription
vai modelsList available models with architecture, pricing, and benchmark scores
vai explainInteractive explainer for 30+ topics (embeddings, RAG, reranking, etc.)
vai configManage persistent configuration (set, get, delete, list, path, reset)
vai pingTest Voyage AI API and MongoDB Atlas connectivity
vai playgroundLaunch the web playground (7 interactive tabs)
vai completionsGenerate shell completion scripts for Bash and Zsh
vai demoGuided interactive walkthrough of vai features
vai aboutDisplay version, system info, and project details

Advanced

CommandDescription
vai chatConversational RAG with Anthropic, OpenAI, or Ollama
vai workflow runExecute a workflow definition (built-in or custom)
vai workflow validateValidate workflow syntax, dependencies, and detect cycles
vai workflow listList built-in workflow templates
vai workflow initScaffold a new workflow JSON file

Global Flags

These flags work with any command:

FlagDescription
--helpShow command help
-V, --versionShow vai version
--jsonOutput in JSON format (machine-readable)
--quietSuppress non-essential output