Must know Airflow CLI commands

DataGeeks
3 min readApr 23, 2024

The Airflow Command Line Interface (CLI) is a tool that allows users to interact with Airflow’s functionality through the command line. It provides various commands for managing workflows, DAGs, connections, variables, and other Airflow components. With the CLI, users can perform tasks such as initializing the metadata database, starting the web server, triggering DAGs manually, testing tasks, managing connections and variables, and more.

In this article, you will see some most important Airflow CLI commands that can help you a lot in your Airflow journey.

To use the Airflow CLI, you typically type airflow followed by the desired command and any necessary options or arguments in your terminal or command prompt.

If you’re using Airflow within Docker, start by accessing the bash shell of the Airflow service running in the Docker container. To do this, list all the running services in Docker using docker ps, then copy the container ID where Airflow is running. Finally, access the bash shell of the Airflow service using the command docker exec -it [container_id] bash.

Most useful Airflow CLI commands

Let’s check out the most useful airflow CLI commands one by one. Here are some essential Airflow CLI commands:

--

--

DataGeeks

A data couple, Having 15 years of combined experience in data and love to share the knowledge about Data