astro login

The behavior and format of this command differs depending on what Astronomer product you’re using. Use the following tabs to change product contexts.

Authenticate to Astro. After you run this command, the CLI prompts you for your login email address. Using the provided email address, the CLI assumes your organization and redirects you to a web browser where you can log in to the Astro UI. After you log in, the CLI automatically recognizes this and authenticates your account.

If you’re running the Astro CLI on a headless system or in an environment without browser access (such as a remote server, Docker container, or CI/CD pipeline), use the --login-link or --token-login flags to authenticate without needing a local browser.

Usage

1astro login

Options

OptionDescriptionPossible Values
-l, --login-linkForce the CLI to print a login URL instead of automatically opening a browser. Copy the URL and open it on any device that has browser access to complete authentication. This is useful for headless environments, remote servers, or SSH sessions where a browser is not availableNone
-t, --token-loginAuthenticate by providing a token directly, without any browser interaction. Generate a token at cloud.astronomer.io/token from a device with browser access, then pass it to this flag. This is the recommended approach for fully headless systems and non-interactive environments such as CI/CD pipelines, Docker containers, or automated scriptsA valid authentication token from cloud.astronomer.io/token

Examples

1astro login
2# The CLI automatically opens the Astro UI in a web browser, which prompts you to log in.
3
4astro login --login-link
5# The CLI prints a login URL instead of opening a browser.
6# Use this on headless systems or SSH sessions: copy the URL to a device with a browser to authenticate.
7
8astro login --token-login <your-token>
9# Authenticate without any browser interaction.
10# Generate a token at cloud.astronomer.io/token and pass it directly.
11# Recommended for CI/CD pipelines, Docker containers, and other non-interactive environments.