---
title: Install the legacy Python CLI for AI Runtime
description: Install the AI Runtime CLI (`air`) and authenticate it against your Databricks workspace.
canonical_url: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/legacy-cli/installation
---

# Install the legacy Python CLI for AI Runtime

> [!IMPORTANT]
>
> This documentation has been retired and might not be updated.
>
> The Python-based `air` CLI, installed with the `databricks-air` package, is now deprecated and is no longer actively maintained.
>
> Use the Databricks CLI for new workloads. See [Use the Databricks CLI with AI Runtime](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/index.md).

Install the `air` CLI with [uv](https://docs.astral.sh/uv/) and authenticate it against a Databricks workspace using a Databricks CLI profile. The CLI requires Python 3.10 or newer.

## Requirements

* Python 3.10 or newer.
* A Databricks workspace with AI Runtime enabled. See [ Requirements](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/overview.md#requirements).
* The [Databricks CLI](https://docs.databricks.com/aws/en/dev-tools/cli/install.md), which manages authentication profiles in `~/.databrickscfg`.

## Install the CLI

Databricks recommends installing the CLI with [uv](https://docs.astral.sh/uv/):

```bash
uv tool install --force databricks-air --python 3.12
```

`uv tool install` puts `air` in its own isolated environment and exposes it on your `PATH`, so it doesn't conflict with the Python interpreter you use for your training code.

`--python 3.12` is recommended but optional. If you do not specify the Python version, `uv` uses the latest available version that satisfies the package's Python constraint.

If you don't already have `uv`, install it first:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Verify the installation:

```bash
air --version
air --help
```

## Authenticate

The AI Runtime CLI reuses Databricks CLI authentication profiles. Log in to your workspace and name the profile when prompted:

```bash
databricks auth login --host https://<your-workspace>.cloud.databricks.com
```

Pass the profile name to any `air` command with `-p`. For example:

```bash
air list runs -p my-workspace
```

Alternatively, set `DATABRICKS_CONFIG_PROFILE` in your shell to make a profile the default:

```bash
export DATABRICKS_CONFIG_PROFILE=my-workspace
```

For all authentication options, see [Authentication for the Databricks CLI](https://docs.databricks.com/aws/en/dev-tools/cli/authentication.md).

## <a id="additional-resources" /> Additional resources

After installing, define workloads in a `train.yaml` config with inline dependencies. Start with the quickstart, then use the YAML reference as you build out your config:

* [Legacy Python CLI quickstart for AI Runtime](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/legacy-cli/quickstart.md)
* [Workload YAML reference for the legacy Python CLI](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/legacy-cli/yaml-config.md)
