mistralM

Docs

sideBar

Quickstart: install the Mistral CLI and create a project

Install the Mistral CLI, sign in to your workspace, and scaffold your first workflows project, in about 5 minutes.
flagThis step takes ~5 minutes to complete.

In this quickstart, you install the Mistral CLI, sign in, check which organization and workspace your commands use, and scaffold a workflows project. It takes about 5 minutes. For what the CLI does, see Mistral CLI.

Before you begin

1. Install the CLI

Run the installer:

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

Accept the installer's offer to add ~/.mistral/bin to your PATH. It also offers to install Bun, which runs workflows and apps on your machine: accept it too. The PATH change applies to new shells only, so open a new terminal or source the profile that the installer names, then check the version:

source ~/.zshrc   # zsh; bash: ~/.bashrc or ~/.bash_profile, fish: ~/.config/fish/config.fish
mistral --version

2. Sign in

Sign in through your browser, then check who you are and where your commands run:

mistral login
mistral whoami
mistral context show

mistral login opens your browser to sign in. If no organization and workspace are selected yet, it selects the default ones of your account. mistral whoami prints the signed-in identity, and mistral context show prints the active organization and workspace. To use another workspace, run mistral context set.

lightbulb

On a machine without a browser, save an API key with mistral login --api-key -, which reads it from standard input. If no OS keychain is available, add --insecure-storage to keep the sign-in in a file. An API key belongs to one workspace, and mistral apps publish and mistral apps unpublish still need the browser sign-in. Don't commit credentials.

3. Create a project

Scaffold a workflows project with mistral init:

mistral init my-workflow --preset workflow --yes

--preset workflow picks the capabilities of a workflows project, and --yes accepts the defaults without asking. To build a full-stack app with a database instead, use --preset app.

You should see

The CLI installs the project dependencies, creates a Git repository, and ends with a summary that starts with:

Created my-workflow: workflows, apps (core included)

  cd my-workflow

The new my-workflow directory holds a Python worker in apps/worker and a .env file. The summary also reminds you to set MISTRAL_API_KEY in .env before you run the worker.

If mistral isn't found, open a new terminal: the PATH change from step 1 applies to new shells only.

Clean up

Keep my-workflow for the Workflows quickstart, which starts from this project. Otherwise, delete the directory. To sign out, run mistral logout.

Going further

Quickstart: build your first workflow
illustrationRocket

Quickstart: build your first workflow

Scaffold a workflows project, run a worker on your machine, and get the result of your first execution, in about 15 minutes.

Quickstart: build your first app
illustrationApp

Quickstart: build your first app

Create, run, and deploy an app with the Mistral CLI.

Quickstart: deploy a workflow to Mistral
illustrationWorkflow

Quickstart: deploy a workflow to Mistral

Scaffold a Workflows project with the Mistral CLI, push it to GitHub, and let Mistral Cloud build and run the worker for you.

CLI reference
illustrationBook

CLI reference

Mistral CLI commands and flags.