Like most people, I thought Apache Airflow and Astronomer were confusing. However, after getting hands-on experience, I’ve come to really appreciate what makes Airflow so widely used. It turns out, building DAGs (Directed Acyclic Graphs) is intuitive once you get the hang of it. And I promise you, after reading this blog, it’ll make a lot more sense why Astro CLI is the easiest way to go.
Setting up Apache Airflow locally with Astro CLI, assuming Docker and the CLI are already installed, takes about 5–10 minutes if everything goes smoothly. To emphasize, this is just the setup process, it might take you longer to understand the UI and how to define your DAGs. In this blog, I’ll share how I set up Airflow locally using Astronomer and explain why the Astro CLI is the fastest and easiest way to get started.
The Astro CLI is an open-source command-line tool that simplifies working with Apache Airflow, especially for local development. While you can install and run Airflow manually (e.g., via PyPI or Docker), Astro CLI provides a streamlined experience with key enhancements:
The "Secret Sauce" of Astro CLI:
There are three ways to install Airflow on your local machine:
1. Using the Python Package Index (PyPI)
This method is great for anyone comfortable with Python environments or who only has access to Python locally.
2. Using Containerization Solutions (e.g., Docker, Podman)
This is ideal for users already familiar with containers.
3. Using Astro CLI (Recommended)
Astro CLI simplifies the entire process by automating setup through containerization. It requires minimal manual configuration and is the fastest, most beginner-friendly way to get a local Airflow environment up and running. Overall ideal for development and experimentation.
| Method | Pros | Cons |
|---|---|---|
| PyPI (Python-only) | Familiar for Python users | Manual setup, dependency management, less scalable |
| Docker/Podman | Clean environment, better isolation | Requires container knowledge, more config needed |
| Astro CLI (Recommended) | Fast setup, beginner-friendly, preconfigured structure | Requires Docker/Podman, slight learning curve on CLI usage |
Prerequisites:
Installation (via winget):
Astro CLI also supports Windows (via manual install), mac and Linux (via curl).
For full setup instructions across all operating systems, check the official Astro docs here: Astro CLI Installation Guide
Once Astro CLI is installed, create a new folder for your project and run: astro dev init
This command will generate a standard Astro project structure with all necessary folders and files. And if you open your code editor of your choice in that folder (I'm using vscode), you'll have all those files and directories that have been generated for you on the left side.
And just like that, you have a fully functional local environment to run Airflow.
Getting started with Apache Airflow can seem intimidating at first, but tools like the Astro CLI make the process far more accessible, especially for beginners or those just looking to prototype quickly. With just a few commands, you can start building and testing DAGs in no time.
Now that your local Airflow setup is up and running, the only thing left to schedule… is your coffee break. Happy orchestrating!