Skip to main content
LabsThis feature is in Labs.
This quickstart shows you how to install Astro for VS Code, sign in to Astro, and ask Otto your first question. When you finish, the Deployments in your Workspace appear in the editor’s sidebar and Otto runs in your project.

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

  1. Open the Extensions view.
  2. Search for Astro for VS Code, published by Astronomer.
  3. Click Install.
You can also install the extension from the Visual Studio Marketplace.
An Astro icon appears in the activity bar. Click it to open the Profile, Deployments, Local, and Docs views.
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:
  1. In the Profile view, click Log in to Astro. You can also run Log In to Astro from the Command Palette.
  2. Sign in to Astro in the browser window that opens.
  3. Return to the editor. The Profile view shows your account, environment, Organization, and Workspace.
If the extension reports that it can’t find astro, your editor didn’t inherit your shell’s PATH. This happens when you start the editor from the Dock, Finder, or Start menu. Run which astro in a terminal, then set the astroOtto.astroPath setting to the path it prints. See Troubleshoot Astro for VS Code.
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

  1. 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.
  2. 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.

Next steps