astro dev init

The behavior and format of this command are the same for both Astro and Astro Private Cloud.

Initialize an Astro project in an empty local directory. An Astro project contains the set of files necessary to run Airflow, including dedicated folders for your dag files, plugins, and dependencies. An Astro project can be either run locally with astro dev start or pushed to Astronomer with astro deploy.

Usage

1astro dev init <project-name>

Options

OptionDescriptionPossible Values
<project-name>Optional name for your Astro project. Creates and initializes a directory with the specified name.Any string
-a, --airflow-versionVersion of Airflow you want to create an Astro project with. If not specified, latest is assumed. You can change this version in your Dockerfile at any time.String (Airflow version)
-v, --runtime-versionAstro Runtime version to use for project initialization.Any supported Runtime version
-n, --nameName for your Astro project.Any string
--from-templateSpecify a getting started template to use as the base for your Astro project.
--remote-execution-enabledEnable Remote Execution mode. Prompts for remote Docker repository, generates client image files and config.N/A
--remote-image-repositoryProvide the remote image repository for client images. If omitted, prompts interactively with a warning if unset.Remote Docker image repository URI

Remote Execution Mode

Enabling remote execution with the --remote-execution-enabled flag results in the following behavior:

  • The CLI prompts you to provide a remote client image repository, unless you specify it with --remote-image-repository.
  • If you do not provide a repository, you receive a warning. You can also configure the remote image repository later via the astro config set remote.client_registry <remote-image-repository> CLI command
  • A new entry in .astro/config.yaml is created or updated with your remote client image repository.
  • These new files are generated for customizing dependencies and build steps for remote execution client images:
    • Dockerfile.client
    • requirements-client.txt
    • packages-client.txt

Examples

1$ astro dev init
2# Initializes default project
3
4$ astro dev init --name=MyProject
5# Generates `config.yaml` file with `name=MyProject`
6
7$ astro dev init --runtime-version=3.1-3
8## Initializes project with Runtime 3.1-3
9
10astro dev init --remote-execution-enabled
11# Initialize with remote execution and prompt for repo