Mistral CLI

The mistral CLI creates projects, runs them locally, deploys apps and workflows, and manages Studio resources from your terminal.

Install

Install

curl -fsSL https://mistral.ai/cli/install.sh | bash

The 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 --help

Apps 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

Upgrade

mistral upgrade
mistral --version

mistral 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

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/_mistral

Add the directory to fpath before compinit in ~/.zshrc:

fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit

For Fish:

mkdir -p ~/.config/fish/completions
mistral --completions fish > ~/.config/fish/completions/mistral.fish

Open 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

Commands

CommandUse it to
mistral initCreate an app or workflow from a preset or selected capabilities.
mistral devRun the local development stack.
mistral deployDeploy the current project to Studio.
mistral workflowsCreate workflow projects.
mistral appsList apps, manage capabilities, inspect logs, and publish deployed apps.
mistral evalsRun, optimize, and manage offline evaluations.
mistral observabilitySearch and inspect traces, spans, and logs.
mistral login, logout, whoami, contextSign in and out, and select your organization and workspace.
mistral upgradeUpdate 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

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.