LabsThis feature is in Labs.
Prerequisites
- An Astro account. To create one, start a trial.
- The Astro CLI.
- VS Code 1.95 or later, or Cursor.
- (Optional) An Astro project open in your editor. The Deployments and Docs views work without one, but Otto and the Local view need a project to work with.
Install and start using the extension
1
Install the extension
- VS Code
- Cursor
- Open the Extensions view.
- Search for Astro for VS Code, published by Astronomer.
- Click Install.
2
Sign in to Astro
If you already ran
astro login in a terminal, the extension uses that session, and the Profile view shows your account. Continue to the next step.Otherwise:- In the Profile view, click Log in to Astro. You can also run Log In to Astro from the Command Palette.
- Sign in to Astro in the browser window that opens.
- Return to the editor. The Profile view shows your account, environment, Organization, and Workspace.
3
Choose your Organization and Workspace
The Deployments view lists the Deployments in the Workspace that the Profile view shows.To switch, click the Organization or Workspace row in the Profile view, then choose from the list. The extension switches with the Astro CLI, so the change also applies to
astro commands that you run in a terminal.4
Ask Otto your first question
- Open the chat. Click the Otto icon in the Deployments view’s title bar or in the editor toolbar, or run Open Otto Chat from the Command Palette. The chat opens as an editor tab next to your files. The first time you open it, the extension installs Otto with the Astro CLI, which can take a minute.
-
Enter a question in the message box and press Enter. For example:
Otto reads your Dag files and answers in the chat.
Other prompts to try
Why did my last Dag run fail?Otto reads the Dag run history and task logs of your local Airflow environment to find the cause.Add retries to every task in this Dag.Otto shows each file edit as a diff and asks for your approval before it applies the edit.