Astro CLI

Product · Developer tool · Engineering & development by Astronomer

The command-line interface for enterprise-grade Airflow development.

A command-line interface for data engineers to build, test, and deploy Apache Airflow DAGs locally and to the Astro platform. It is the essential tool for managing the Airflow lifecycle with integrated AI assistance.

Category: Developer Tools

Works with

Platforms
Windows, macOS, Linux
Editors and tools
Windows PowerShell, macOS Terminal, Linux Terminal
Supported Operating Systems
Windows 10+, macOS, Linux
Default Container Engine
Podman (since v1.32.0)
Alternative Container Engine
Docker Engine
Windows Requirements
WSL 2 enabled
  • Run a complete local Airflow environment
  • Deploy to Astro with a single command
  • Supports Podman and Docker container engines
  • Integrated AI troubleshooting with Otto
  • Automate platform operations via API access

Overview

Astro CLI is Astronomer's command-line interface designed for data engineers to build, test, and deploy Apache Airflow DAGs. It allows users to run a complete local Airflow environment to validate code before shipping it to production environments. The tool supports multiple container engines, including Podman and Docker, and provides direct API access for automating platform operations. It serves as the primary interface for managing the entire lifecycle of an Airflow project, from initial project setup to final deployment on the Astro platform. Additionally, it integrates with Otto, an AI-powered data engineering agent, to assist with terminal-based troubleshooting and code authoring.

Development and Testing

  • One-Command Deployment: Developers can deploy code to the Astro platform with a single command once local testing is complete.
  • Container Engine Flexibility: The tool supports running and managing containers using either Podman or Docker Engine.
  • Project Initialization: The CLI allows for initializing new Astro projects from templates with a single command.

Workflow Automation

  • API Access: The CLI provides direct access to the Astro API to automate platform operations from the terminal.
  • Authentication Management: Users can manage Astro credentials and authentication directly from the command line.
  • Service Management: The tool includes commands to start and stop local Airflow services for active development.
  • Infrastructure as Code: The CLI supports managing Astro infrastructure as code through integration with the Astro Terraform Provider.

AI-Assisted Engineering

  • AI-Assisted Troubleshooting: The CLI integrates with Otto, a data engineering agent, for terminal-based troubleshooting and authoring.
  • Contextual AI Support: Otto provides context-aware assistance by accessing task logs, connections, and run history.

Use cases

  • Data engineers run local Airflow environments to test DAGs before deploying to production.
  • Teams automate Astro platform operations and infrastructure provisioning using the CLI and API.
  • Developers use the integrated Otto AI agent to troubleshoot pipeline failures directly from the terminal.
  • Organizations implement automated CI/CD workflows by running CLI commands within GitHub Actions.

Specifications

Platforms
Windows, macOS, Linux
Editors and tools
Windows PowerShell, macOS Terminal, Linux Terminal
Integrations
Docker, Podman, GitHub Actions, Terraform, dbt, Slack, PagerDuty
Deployment
Local development with deployment to Astro cloud or private cloud environments
Supported Operating Systems
Windows 10+, macOS, Linux
Default Container Engine
Podman (since v1.32.0)
Alternative Container Engine
Docker Engine
Windows Requirements
WSL 2 enabled
Installation Methods
Homebrew, winget, Manual EXE, GitHub Releases
Primary Integration
Apache Airflow

How it works

  1. Installation: Install the CLI on macOS, Windows, or Linux using package managers like Homebrew or winget.
  2. Project Initialization: Initialize a new project from a template to create the necessary directory structure for Airflow DAGs.
  3. Local Development: Start a local Airflow environment using Podman or Docker to test and validate DAG code.
  4. Deployment: Authenticate to the Astro platform and use a single command to ship production-ready pipelines.

FAQ

What is the Astro CLI?

The Astro CLI is Astronomer's command-line interface used to build, test, and deploy Apache Airflow DAGs to the Astro platform.

How do I install the Astro CLI?

The CLI can be installed on macOS using Homebrew, on Windows using the winget tool or manual installation, and on Linux via a direct download.

Does the Astro CLI require Docker?

Starting with version 1.32.0, the Astro CLI uses Podman by default for running Airflow locally, though users can opt to use Docker instead.

Can I use the Astro CLI with CI/CD tools?

Yes, you can run Astro CLI commands and deploy to Astro using GitHub Actions if you cannot install the tool locally.

Added by AntSpace from public sources (astronomer.io).

Related

More products by Astronomer