> ## Documentation Index
> Fetch the complete documentation index at: https://astronomer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Astro for VS Code reference

> Reference for the commands, keyboard shortcuts, settings, environment variables, and telemetry of Astro for VS Code.

<Info>
  **Labs**

  This feature is in [Labs](/docs/astro/feature-previews).
</Info>

This document lists the commands, keyboard shortcuts, settings, and environment variables that Astro for VS Code uses.

## Command Palette commands

The following commands appear under **Astro** in the Command Palette.

| Command | Description |
| - | - |
| **Open Otto Chat** | Opens the Otto chat, or brings the open chat forward. |
| **New Otto Chat** | Opens a new Otto chat in a new tab. |
| **Resume Otto Chat** | Lists your past chats so you can reopen one. |
| **Export Otto Chat** | Copies or saves the current chat as Markdown or HTML. |
| **Add Selection to Otto Chat** | Attaches the selected code, or the line your cursor is on, to the chat you used last. |
| **Add Current File to Otto Chat** | Attaches the open file to the chat you used last. |
| **Log In to Astro** | Signs in to Astro in your browser with the Astro CLI. |
| **Log Out of Astro** | Signs out of Astro with the Astro CLI. This also signs out the `astro` commands in your terminals. |
| **Switch Organization** | Switches to another Organization, and a Workspace in it. |
| **Switch Workspace** | Switches to another Workspace in the current Organization. |
| **Set Dag Run Failure Range** | Sets how far back the **Deployments** view looks for failed runs: 1, 5, 12, or 24 hours. The default is 1 hour. |
| **Search Docs** | Moves focus to the search box in the **Docs** view. |
| **Refresh Profile**, **Refresh Deployments**, **Refresh Local**, **Refresh Docs Search** | Reloads the view. |

## Row actions

The following actions apply to a row in a view, so they appear on the row or in its right-click menu instead of in the Command Palette.

| View | Row | Actions |
| - | - | - |
| **Profile** | Account | **Log Out of Astro** |
| **Profile** | Organization, Workspace | **Copy Organization ID**, **Copy Workspace ID** |
| **Deployments** | Deployment | **Deploy Image and Dags**, **Deploy Dags Only**, **Open Airflow UI**, **Open in Astro**, **Copy Deployment ID** |
| **Deployments** | Development Deployment | **Wake Up…**, **Hibernate**, **Keep Awake…**, **Resume Hibernation Schedule** |
| **Deployments**, **Local** | Failed run | **Ask Otto About This Failure**, **Show Failure Logs**, **Open Failed Run in Airflow** (**Deployments** only) |
| **Deployments**, **Local** | Import error | **Ask Otto About This Import Error**, **Show Import Error Traceback** |
| **Deployments**, **Local** | Airflow 2 Deployment or project | **Upgrade to Airflow 3 with Otto** |
| **Local** | Project | **Start Local Airflow (Standalone)**, **Start Local Airflow (Docker)**, **Stop Local Airflow**, **Open Local Airflow UI**, **Use This Project's Airflow Environment for Python**, **Kill Local Airflow and Delete Its Data** |

## Keyboard shortcuts

| Shortcut | Where | Action |
| - | - | - |
| **Cmd+Option+O** (macOS), **Ctrl+Alt+O** (Windows, Linux) | Editor | **Add Selection to Otto Chat** |
| **Enter** | Chat message box | Sends the message. While Otto works, sends a message that Otto reads after its current step. |
| **Shift+Enter** | Chat message box | Starts a new line. |
| **Up**, **Down** | Empty chat message box | Recalls messages you sent earlier. |
| **Esc** | Chat | Closes an open menu, then declines a pending approval, then stops the turn. |

To change the shortcut, search for **Add Selection to Otto Chat** in your editor's keyboard shortcuts settings.

## Settings

To find these settings, search for **Astro** in your editor's settings.

| Setting | Default | Description |
| - | - | - |
| `astroOtto.domain` | Empty | The Astro environment to use, such as `astronomer.io`. When empty, the extension follows the Astro CLI's active context, which you set with `astro context switch`. |
| `astroOtto.astroPath` | Empty | The full path to the `astro` binary. When empty, the extension searches `PATH`, then standard install locations such as `/opt/homebrew/bin` and `~/.astro/bin`. Set this if the extension reports that it can't find `astro`. |
| `astroOtto.ottoPath` | Empty | The path to an Otto binary. When empty, the extension uses `~/.astro/bin/otto`, which the Astro CLI installs. |

## Environment variables

The extension reads the following variables from the environment that started your editor.

| Variable | Effect |
| - | - |
| `ASTRO_HOME` | The folder where the Astro CLI keeps its configuration. The default is `~/.astro`. |
| `ASTRO_DOMAIN` | The Astro environment to use when `astroOtto.domain` isn't set. |
| `ASTRO_API_TOKEN` | Ignored. See [ASTRO\_API\_TOKEN](#astro_api_token). |
| `ASTRO_TELEMETRY_DISABLED` | Set to `1` or `true` to turn off telemetry for the extension and the Astro CLI. |

### ASTRO\_API\_TOKEN

If `ASTRO_API_TOKEN` is set when your editor starts, the extension and Otto ignore it and act as the user you signed in as. This keeps the token from replacing your sign-in session, which would change the Organization and Workspace that every view and Otto use. Commands you run in your own terminal still use the token.

When the variable is set, the **Profile** view shows **ASTRO\_API\_TOKEN is set · ignored here**.

## Telemetry

The extension sends usage events to Astronomer, such as when you send a message to Otto, open a failure's logs, or request a deploy. Events can include your editor and operating system, your Astro Organization ID, the model and permission mode of a chat, and counts such as message length. Events never include your code, the text of your messages to Otto or your docs searches, or Otto's answers.

To turn off telemetry, use any of the following options:

* Set your editor's `telemetry.telemetryLevel` setting to `off`.
* Run [`astro telemetry disable`](/docs/cli/v1.46/astro-telemetry-disable), which also turns off telemetry for the Astro CLI.
* Set `ASTRO_TELEMETRY_DISABLED=1` in your environment.

## Logs

The extension writes diagnostic logs to the **Astro** output channel. To open it, run **Output: Show Output Channels** from the Command Palette and choose **Astro**.
