---
title: Legacy Python CLI command reference for AI Runtime
description: Reference for `air` CLI subcommands and flags used to manage AI Runtime training workloads.
canonical_url: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/legacy-cli/command-reference
---

# Legacy Python CLI command reference 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).

The `air` CLI provides five subcommands for managing training workloads: `air run`, `air get run`, `air list runs`, `air logs`, and `air cancel`. The same reference is always available from the CLI itself:

```bash
air --help              # All commands
air <command> --help    # Flags for a specific command
air -h config           # YAML config reference
air -h config.compute   # Per-field help for a YAML section
```

The CLI help reflects the exact version you have installed, so it is the source of truth if it differs from the table below.

## Commands

| Command              | Purpose                                                                                                                                                                                                                              |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `air run`            | Submit a workload defined by a YAML file. Supports `--file`, `--watch`, `--dry-run`, `--override`, `--idempotency-key`, `--email`, and `-p` to select an authentication profile.                                                     |
| `air get run`        | Show metadata, status, and configuration for a specific run.                                                                                                                                                                         |
| `air list runs`      | List recent runs. Use `--limit` to bound the result count and `--active` to show only running workloads.                                                                                                                             |
| `air logs`           | Stream or download logs for a run. Use `--node` to target a specific node and `--download-to` to write logs to a directory.                                                                                                          |
| `air cancel`         | Cancel a running workload.                                                                                                                                                                                                           |
| `air register image` | Register and cache a custom Docker image for use in workloads. See [Use custom Docker images with the legacy Python CLI](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/legacy-cli/docker-images.md). |

## Global flags

| Flag              | Purpose                                                                                |
| ----------------- | -------------------------------------------------------------------------------------- |
| `--version`       | Print the installed CLI version.                                                       |
| `-p`, `--profile` | Use the named Databricks CLI authentication profile instead of the default.            |
| `-h`, `--help`    | Show help. When followed by a config path (`-h config.compute`), show YAML field help. |

## See also

* [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)
* [Track runs with the legacy Python CLI](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/legacy-cli/track-runs.md)
* [Use custom Docker images with the legacy Python CLI](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/legacy-cli/docker-images.md)
