# Commands and Keyboard Shortcuts

### Commands

Access all commands via the Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`).

| Command                                | Description                               |
| -------------------------------------- | ----------------------------------------- |
| `Lenses: Connect to Instance`          | Connect to your Lenses.io API             |
| `Lenses: Sign in with OAuth (browser)` | Connect via OAuth 2.0 browser flow        |
| `Lenses: Search`                       | Open global fuzzy search                  |
| `Lenses: Switch Environment`           | Quick switch between environments         |
| `Lenses: Create Environment`           | Create a new environment                  |
| `Lenses: Create Topic`                 | Create a new Kafka topic                  |
| `Lenses: Save Query`                   | Save the current SQL query                |
| `Lenses: Compare Topic Configuration`  | Compare topic configs across environments |
| `Lenses: Compare Topic Schema`         | Compare topic schemas across environments |
| `Lenses: Compare Groups`               | Compare groups side by side               |
| `Lenses: Compare Roles`                | Compare roles side by side                |
| `Lenses: Refresh Health Status`        | Refresh health monitoring data            |
| `Lenses: Open SQL Query`               | Open a new SQL query editor               |
| `Lenses: Run SQL Query`                | Execute the current SQL query             |
| `Lenses: Sign Out`                     | Disconnect from the Lenses instance       |

***

### Keyboard Shortcuts

| Shortcut      | Action                        |
| ------------- | ----------------------------- |
| `Cmd+Shift+L` | Global Search                 |
| `Cmd+Shift+E` | Switch Environment            |
| `Cmd+Shift+Q` | Open SQL Query                |
| `Cmd+Enter`   | Run SQL Query (in SQL editor) |

***

### Settings

Configure the extension via VS Code Settings (`Cmd+,`).

#### General

| Setting                | Default | Description                                                |
| ---------------------- | ------- | ---------------------------------------------------------- |
| `lenses.apiUrl`        | `""`    | Base URL for your Lenses.io API                            |
| `lenses.oauthClientId` | `""`    | OAuth client ID (when dynamic registration is unavailable) |

#### Health Monitoring

| Setting                                       | Default  | Description                                    |
| --------------------------------------------- | -------- | ---------------------------------------------- |
| `lenses.health.pollingInterval`               | `30000`  | Health check interval (ms)                     |
| `lenses.health.consumerLagWarningThreshold`   | `10000`  | Consumer lag warning threshold                 |
| `lenses.health.consumerLagErrorThreshold`     | `100000` | Consumer lag error threshold                   |
| `lenses.health.notifications.enabled`         | `false`  | Enable toast notifications for critical issues |
| `lenses.health.notifications.errorOnly`       | `false`  | Only show error notifications                  |
| `lenses.health.notifications.cooldownMs`      | `300000` | Notification cooldown (5 min)                  |
| `lenses.health.notifications.showInStatusBar` | `true`   | Show unread notification count in status bar   |

#### Health Checks

| Setting                                  | Default | Description                |
| ---------------------------------------- | ------- | -------------------------- |
| `lenses.health.checks.consumerLag`       | `true`  | Monitor consumer lag       |
| `lenses.health.checks.connectorStatus`   | `true`  | Monitor connector status   |
| `lenses.health.checks.environmentStatus` | `true`  | Monitor environment health |

#### SQL Queries

| Setting                                  | Default | Description                                            |
| ---------------------------------------- | ------- | ------------------------------------------------------ |
| `lenses.sql.liveData.maxRecords`         | `5000`  | Maximum records for live data streaming (0 = no limit) |
| `lenses.sql.liveData.rateWarningEnabled` | `true`  | Show warning when message rate is high                 |
| `lenses.sql.acceptSelfSignedCerts`       | `false` | Trust self-signed TLS certificates for SQL connections |

#### Search Index

| Setting                                  | Default   | Description                                 |
| ---------------------------------------- | --------- | ------------------------------------------- |
| `lenses.search.index.enabledEntityTypes` | all types | Entity types to include in search index     |
| `lenses.search.index.autoIndexOnStartup` | `false`   | Automatically start indexing when connected |
| `lenses.search.cache.enabled`            | `true`    | Persist search index between sessions       |
| `lenses.search.cache.ttlHours`           | `24`      | Search index cache duration (hours)         |

#### Other

| Setting                        | Default | Description                                                 |
| ------------------------------ | ------- | ----------------------------------------------------------- |
| `lenses.yaml.schemaValidation` | `true`  | YAML schema validation for provisioning files               |
| `lenses.telemetry.enabled`     | `true`  | Anonymous usage telemetry (respects VS Code global setting) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenses.io/latest/vs-code-extension/commands-and-keyboard-shortcuts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
