Configure the Astro CLI
Every Astro project includes a file called .astro/config.yaml
that supports various project-level settings, including:
- The name of your Astro project.
- The port for the Airflow webserver and Postgres metadata database.
- The username and password for accessing the Postgres metadata database.
In most cases, you only need to modify these settings in the case of debugging and troubleshooting the behavior of Airflow components in your local environment.
Set a configuration
You can set Astro configurations at two different scopes: global and project.
For project-specific configurations, Astro stores the settings in a file named .astro/config.yaml
in your project directory. This file is generated when you run astro dev init
in your project folder. Global configurations, however, are stored in a central location with the Astro executable. If a configuration is set in a project configuration file, it always overrides any of the same configuration in the global configuration file.
Set project configurations
Run the following command in an Astro project to set a configuration for that project:
This command applies your configuration to .astro/config.yaml
in your current Astro project. Configurations do not persist between Astro projects.
For example, to update the port of your local Airflow webserver to 8081 from the default of 8080, run:
Set global configurations
Use the --global
flag with astro config set [option] --global
to set a configuration for all current and new Astro projects on your machine. Your global Astro CLI configuration is saved in a central location on your machine. For example, the configurations are stored in ~/.astro/config.yaml
on Mac OS and /home//.astro/config.yaml
on Linux.
Note that you can override global configurations by setting a project-level configuration. If an Astro project contains an .astro/config.yaml
file, any configuration values in that file take precedence over the same global configuration values.
The following example shows how to set the local Airflow webserver port to 8081
for all Astro projects on your local machine: