Skip to content
mistralaiPublic

About

No description, website, or topics provided.

Resources

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

mistral CLI

Standalone binaries for the mistral command-line tool.

This repository (mistralai/cli) hosts the compiled release assets only. The source lives in the mistralai/dashboard monorepo under ts/cli/mistral, and each release is built and published automatically from there.

This repository hosts mistral CLI releases exclusively. The installer fetches the latest release by default, so publishing any unrelated release here would break installs.

Install

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

The installer detects your platform, downloads the matching binary and checksums.txt from the latest release, verifies the SHA-256 checksum, installs to ~/.mistral/bin/mistral, and prints PATH instructions if needed.

mistral apps needs bun. If bun is not on your PATH, the installer asks whether to run the official bun installer, pinned to the bun version the CLI is built with. If you decline, or no terminal is attached, it prints the bun install command instead.

MISTRAL_INSTALL_BUN=0 never installs bun and only prints the command. To install bun without asking, for example in CI or from a coding agent, set MISTRAL_INSTALL_BUN=1:

curl -fsSL https://raw.githubusercontent.com/mistralai/cli/main/install.sh | MISTRAL_INSTALL_BUN=1 bash

Override the install location with MISTRAL_INSTALL_DIR:

curl -fsSL https://mistral.ai/cli/install.sh | MISTRAL_INSTALL_DIR="$HOME/.local/bin" bash

Pin a specific release with MISTRAL_VERSION (plain X.Y.Z); unset installs the latest:

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

Upgrade

Upgrading is the same command as installing — re-run it and it overwrites the existing binary in place:

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

To roll back to a known-good release, re-run it with MISTRAL_VERSION set. Releases are immutable, so a bad version is never republished under the same number.

Shell completions

The CLI prints a static completion script for your shell with --completions. The installer prints the command for your current shell when it finishes, but does not add completions to your shell profile itself. The bash line runs the installed CLI each time a shell starts, so it stays current; re-run the zsh or fish command after an upgrade so new commands complete.

Bash: add this line to ~/.bashrc:

command -v mistral >/dev/null && eval "$(mistral --completions bash)"

Zsh: write the script to a directory on your fpath, then add that directory in ~/.zshrc before compinit runs:

mkdir -p ~/.zsh/completions && mistral --completions zsh > ~/.zsh/completions/_mistral
fpath=(~/.zsh/completions $fpath)

If your ~/.zshrc doesn't run compinit already (plain zsh, including the macOS default, doesn't), add this after the fpath line:

autoload -Uz compinit && compinit

Fish:

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

Open a new shell for the completions to load.

Supported platforms

OS Architecture Asset
macOS Apple Silicon mistral-darwin-arm64
macOS Intel mistral-darwin-x64
Linux x86_64 mistral-linux-x64
Linux arm64 / aarch64 mistral-linux-arm64

Troubleshooting

macOS 27: mistral exits at once with no output

The macOS binaries of v0.18.0 and earlier carry an invalid code signature. macOS 27 stops such a binary at launch without a message (exit code 137); earlier macOS versions still run it. The installer now re-signs it, so re-running the install command fixes it. To fix an installed copy by hand (~/.mistral/bin/mistral, or the one in your MISTRAL_INSTALL_DIR):

codesign --force --sign - ~/.mistral/bin/mistral

A re-signed binary no longer matches its release's checksums.txt or attestation: verify the downloaded file, as below, not the installed one.

Verify a download manually

Each release ships a checksums.txt with a SHA-256 line per binary:

base=https://github.com/mistralai/cli/releases/latest/download
curl -fsSLO "$base/mistral-darwin-arm64"   # your platform's asset
curl -fsSLO "$base/checksums.txt"
sha256sum --ignore-missing -c checksums.txt      # Linux
shasum -a 256 --ignore-missing -c checksums.txt  # macOS

checksums.txt catches incomplete or corrupted downloads. It ships in the same release as the binaries, so it is not an independent guarantee against a malicious publisher — publisher integrity rests on write access to the release repository.

Usage data

mistral apps commands, and mistral init, dev, deploy and workflows init, send Mistral an event when they start and when they finish: the command, how it ended, how long it took, the CLI version and the app's ID. init and the capability commands also send the names of Mistral's own capabilities they add or remove. Events go out with your API key or sign-in, so they are linked to your Mistral account. The CLI never sends your code, files, environment variables or credentials.

To turn it off, set DO_NOT_TRACK=1 or MISTRAL_TELEMETRY_OPT_OUT=1, or add "telemetryOptOut": true to config.json in the CLI's config directory (~/.config/mistral by default). Telemetry lists everything that is recorded.

Uninstall

Run the installer in uninstall mode. If you installed to a custom directory, pass the same MISTRAL_INSTALL_DIR you used then (it defaults to ~/.mistral/bin):

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

In order, it:

  1. Runs mistral logout, which revokes your session and deletes the mistral-cli keychain item (on macOS through /usr/bin/security). This comes first because it needs the binary and the config directory. If it fails or takes a while offline (up to a minute), the uninstall carries on.
  2. Removes the mistral binary.
  3. Removes the # >>> Mistral >>> block from ~/.zshrc (or $ZDOTDIR/.zshrc), ~/.bashrc, ~/.bash_profile and ~/.config/fish/config.fish.
  4. Deletes the completion files ~/.zsh/completions/_mistral and ~/.config/fish/completions/mistral.fish.
  5. Asks before deleting the config directory ($MISTRAL_CONFIG_DIR, else $XDG_CONFIG_HOME/mistral, else ~/.config/mistral). It holds your API key, feature-flag overrides, and caches. The default answer is no, and it keeps the directory when no terminal is attached, printing the rm -rf command instead. It never deletes your home directory or a directory containing it, and leaves a symbolic link in place.

It then lists, without deleting, what other tools or your own data may depend on:

  • bun in ~/.bun, if the installer offered it, and any lines bun's installer added to your shell profile.
  • mistral apps dev Postgres containers and volumes named mistral-dev-*. The volumes hold your local database data.
  • Pulled prompts in ~/.mistral/registry, with any skill pulled before 0.12.0.
  • Skills pulled with --global: only the ones ~/.agents/registry.lock.json lists, in ~/.agents/skills/, since other agents use that folder too, and their entries in the folders you added with --also-in.
  • Remaining lines in your shell profile that mention the install directory, such as the bash completion line.
  • Anything else left in the install directory.

Open a new shell afterwards. Running the command again is safe.

By hand

Older installers ignore MISTRAL_UNINSTALL; if the one-liner starts downloading, press Ctrl-C and use these steps instead:

mistral logout
rm -f ~/.mistral/bin/mistral
rm -f ~/.zsh/completions/_mistral ~/.config/fish/completions/mistral.fish
rm -rf ~/.config/mistral

Then delete the lines from # >>> Mistral >>> to # <<< Mistral <<< in your shell profile (~/.zshrc, ~/.bashrc, ~/.bash_profile or ~/.config/fish/config.fish), and the mistral --completions bash line if you added it to ~/.bashrc. If you set MISTRAL_INSTALL_DIR or MISTRAL_CONFIG_DIR, use those paths instead.

Optionally, remove the rest:

docker ps -a --filter 'name=^mistral-dev-'        # list, then: docker rm <container>
docker volume ls --filter 'name=^mistral-dev-'    # list, then: docker volume rm <volume>
rm -rf ~/.mistral/registry
rm -rf ~/.bun    # only if nothing else uses bun

Skills pulled with --global live in ~/.agents/skills/, which other agents use too: remove only the ones listed in ~/.agents/registry.lock.json, their entries in the folders listed under alsoIn there, then the lockfile.

About

No description, website, or topics provided.

Resources

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages