Installation & Setup
Prerequisites
Before installing the mxbai CLI, ensure you have:
- Node.js version 20.0 or higher
- A package manager
- A Mixedbread API key (get one here)
Installation Methods
Global Installation (Recommended)
Install the CLI globally to use it from any directory:
Local Installation
For project-specific installations:
When installed locally, use npx mxbai
or add scripts to your package.json
:
Verify Installation
After installation, verify the CLI is working:
Authentication
To use the CLI, you need a Mixedbread API key. The CLI checks for authentication in this order:
- Command line flag:
--api-key mxb_xxxxx
- Environment variable:
export MXBAI_API_KEY=mxb_xxxxx
- Configuration file:
mxbai config set api_key mxb_xxxxx
Quick Setup
The easiest way to get started is with an environment variable:
For persistent configuration across sessions, use the config file:
Learn more about configuration options in the Configuration Guide.
Shell Completion
The CLI supports tab completion for commands and subcommands. To set up completion:
Supported shells: bash, zsh, fish, pwsh (PowerShell)
After installation, restart your shell or reload your shell configuration:
- bash:
source ~/.bashrc
or restart terminal - zsh:
source ~/.zshrc
or restart terminal - fish: Completion is ready to use (fish auto-loads completions)
- pwsh:
. $PROFILE
or restart terminal
To remove completion:
Next Steps
Now that you have the CLI installed, proceed to:
Configuration
Set up defaults, aliases, and authentication.
Vector Store Management
Learn how to create and manage vector stores.
File Operations
Start uploading documents to your vector store.
Last updated: July 5, 2025