Skip to content

Azure ai CLI Installation

The Azure AI Command-Line Interface (the ai CLI) is a cross-platform command-line tool to connect and immediately use Azure AI services with or without writing code.

Use winget to install the .NET 8 SDK,
Use winget to install the Azure CLI (az),
Use dotnet to install the Azure AI CLI (ai).

winget install -e --id Microsoft.DotNet.SDK.8
winget install -e --id Microsoft.AzureCLI
dotnet tool install -g Azure.AI.CLI --prerelease
If you don't have winget ...

Install WinGet
Walks you thru installing the Windows Package Manager.

Use brew to install the .NET 8 SDK,
Use brew to install the Azure CLI (az),
Use dotnet to install the Azure AI CLI (ai).

brew install --cask dotnet-sdk
brew install azure-cli
dotnet tool install -g Azure.AI.CLI --prerelease
If you don't have brew ...

Install Homebrew
Walks you through installing Homebrew, a package manager for macOS.

Use curl to download the script,
Use bash to run the script:

curl -sL https://aka.ms/InstallAzureAICLIDeb | sudo bash
If you don't have curl ...

Install curl
Walks you through installing curl, a command-line tool for transferring data with URL syntax.

Use git to clone the repository,
Use code to open the folder:

git clone https://github.com/Azure/azure-ai-cli
code azure-ai-cli

Then, click the "Reopen in Container" button in the notification.

If the "Reopen in Container" notification does not appear ...

Open the command palette and run the Dev Containers: Reopen in Container command.

Learn more about Dev Containers ...

Installation instructions
Walks you through installing and configuring the required software.

VS Code Dev Containers Tutorial
Walks you through running Dev Containers using the VS Code Extension.

You can run the Azure ai CLI in a browser using GitHub Codespaces:

Open in GitHub Codespaces

Learn more about GitHub Codespaces ...

GitHub Codespaces Documentation
Walks you through creating and using Codespaces.