Mistral CLI
The mistral CLI creates projects, runs them locally, deploys apps and workflows, and manages Studio resources from your terminal.
Install
curl -fsSL https://mistral.ai/cli/install.sh | bashThe installer selects the binary for your platform, verifies its checksum, and installs it to ~/.mistral/bin/mistral. If that directory is not on your PATH, the installer asks to add it to your shell profile, for example ~/.zshrc. Set MISTRAL_NO_MODIFY_PATH=1 to print the line to add instead. macOS and Linux are supported on x64 and arm64.
The profile change applies to new shells only. Open a new terminal, or run source on the file the installer names, then check the installation:
source ~/.zshrc # zsh; bash: ~/.bashrc or ~/.bash_profile, fish: ~/.config/fish/config.fish
mistral --version
mistral --helpApps need Bun. If it is missing, the installer offers to run Bun's installer. If you decline or no terminal is attached, it prints the command instead. Set MISTRAL_INSTALL_BUN=1 to install Bun without a prompt, or MISTRAL_INSTALL_BUN=0 to skip it.
To pin a release, set MISTRAL_VERSION to a published X.Y.Z version. Use MISTRAL_INSTALL_DIR for a different installation directory. See CLI releases.
Upgrade
mistral upgrade
mistral --versionmistral upgrade --dry-run previews the installation command. You can also rerun the installer with MISTRAL_VERSION to install a specific release. Regenerate static shell completions after upgrading.
Shell completions
The CLI generates completion scripts for Bash, Zsh, and Fish. Generating a file alone does not load it into your current shell.
For Bash, add this line to ~/.bashrc:
command -v mistral >/dev/null && eval "$(mistral --completions bash)"For Zsh, generate the file:
mkdir -p ~/.zsh/completions
mistral --completions zsh > ~/.zsh/completions/_mistralAdd the directory to fpath before compinit in ~/.zshrc:
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinitFor Fish:
mkdir -p ~/.config/fish/completions
mistral --completions fish > ~/.config/fish/completions/mistral.fishOpen a new shell. After an upgrade, regenerate Zsh or Fish completions. For Zsh, check that fpath includes the generated directory and that compinit runs after it is set if new commands still do not complete.
Commands
| Command | Use it to |
|---|---|
mistral init | Create an app or workflow from a preset or selected capabilities. |
mistral dev | Run the local development stack. |
mistral deploy | Deploy the current project to Studio. |
mistral workflows | Create workflow projects. |
mistral apps | List apps, manage capabilities, inspect logs, and publish deployed apps. |
mistral evals | Run, optimize, and manage offline evaluations. |
mistral observability | Search and inspect traces, spans, and logs. |
mistral login, logout, whoami, context | Sign in and out, and select your organization and workspace. |
mistral upgrade | Update the CLI. |
Run mistral --help for the commands available in your installed version, or mistral COMMAND --help for its flags. Some commands, such as mistral deploy, appear only after you sign in with mistral login.
Configuration
The configuration directory is $MISTRAL_CONFIG_DIR if set, otherwise $XDG_CONFIG_HOME/mistral, otherwise ~/.config/mistral. Keep credentials private. See Telemetry for analytics and opt-out settings.
Start with the CLI quickstart or build your first app.