Introduction
Overview
The mxbai CLI is a comprehensive tool for managing vector stores, uploading documents, and performing AI-powered search and question-answering operations. Built on top of the Mixedbread SDK, it provides an efficient command-line interface for all core platform features.
New to Mixedbread? Check out our API documentation to understand the underlying services that power the CLI.
Key Features
Vector Store Management
Create, list, update, and manage your vector stores with comprehensive control.
File Upload & Processing
Upload files with intelligent processing strategies, metadata, and batch operations.
Semantic Search
Search through your vector stores using natural language queries with advanced filtering.
Question Answering
Ask questions and get AI-powered answers based on your vector store content.
Intelligent Sync
Sync files with Git-based change detection and intelligent processing strategies.
Shell Completion
Set up tab completion for commands and subcommands to improve your CLI experience.
Quick Start
1. Install the CLI
2. Set your API key
3. Install shell completion (optional but recommended)
4. Create a vector store
5. Upload files
6. Search your content
Command Structure
The mxbai CLI is organized around vector store operations using the vs
subcommand:
Configuration Management
mxbai config set <key> <value>
- Set configuration valuesmxbai config get [key]
- Get configuration valuesmxbai config keys add <key> [name]
- Add a new API keymxbai config keys list
- List all API keysmxbai config keys remove <name>
- Remove an API keymxbai config keys set-default <name>
- Set the default API key
Shell Completion
mxbai completion install
- Install shell completionmxbai completion uninstall
- Uninstall shell completionmxbai completion refresh
- Refresh completion cache for vector store names
Vector Store Management
mxbai vs list
- List all vector storesmxbai vs create <name>
- Create a new vector storemxbai vs get <name-or-id>
- Get vector store detailsmxbai vs update <name-or-id>
- Update vector store settingsmxbai vs delete <name-or-id>
- Delete a vector store
File Operations
mxbai vs upload <name-or-id> <patterns...>
- Upload filesmxbai vs files list <name-or-id>
- List files in vector storemxbai vs files get <name-or-id> <file-id>
- Get file detailsmxbai vs files delete <name-or-id> <file-id>
- Delete a file
Search & Query
mxbai vs search <name-or-id> <query>
- Search vector storemxbai vs qa <name-or-id> <question>
- Ask questions about content
Intelligent Sync
mxbai vs sync <name-or-id> <patterns...>
- Intelligent sync with change detection
Global Options
All commands support these global options:
--api-key <key>
- Actual API key for authentication--saved-key <name>
- Name of saved API key from config--base-url <url>
- Custom API base URL--format <format>
- Output format:table
,json
, orcsv
(default:table
)--debug
- Enable debug output (equivalent toMXBAI_DEBUG=true
)--help
- Show help information for commands
Environment Variables
The CLI supports the following environment variables:
MXBAI_API_KEY
- API key for authentication (must start withmxb_
)MXBAI_DEBUG
- Enable debug output (set totrue
or1
)MXBAI_CONFIG_PATH
- Override default config file location
Authentication
The CLI looks for your API key in this order:
--api-key
or--saved-key
command line flagsMXBAI_API_KEY
environment variable- Default API key from config file (platform-specific location):
- Linux/Unix:
~/.config/mixedbread/config.json
(or$XDG_CONFIG_HOME/mixedbread/config.json
) - macOS:
~/Library/Application Support/mixedbread/config.json
- Windows:
%APPDATA%\mixedbread\config.json
- Custom: Set
MXBAI_CONFIG_PATH
environment variable to override
- Linux/Unix:
Multi-Organization Support
The CLI supports multiple API keys for different organizations or environments:
Getting Help
Use the --help
flag to get detailed information about any command:
Last updated: August 26, 2025