Page cover

Overview

Understand how to use Lenses VS Code Extension for Kafka.

Lenses.ioarrow-up-right for VS Code brings the power of Lenses directly into your development environment. Connect to multiple Kafka environments, create and query topics, insert messages, manage users, roles and permissions, search across different entities, compare configurations, and monitor your Kafka infrastructure - all without leaving VS Code.

GitHub Copilot and language model tools

Connect to Lenses first. In Copilot Chat, enable agent mode and extension tools (see Use tools in chatarrow-up-right). Destructive actions (for example delete topic or environment) still show VS Code confirmation dialogs before executing. Authentication commands are not available as tools. Requires VS Code 1.96+.

Tool references

Use these tool references in chat to run SQL, open listings, compare entities, and work with search and indexing.

  • #lensesExtensionSql, #lensesExtensionDoc, #lensesExtensionListing, #lensesExtensionTopic, #lensesExtensionEnv, #lensesExtensionCompare, #lensesExtensionSearch, #lensesExtensionOps, and #lensesExtensionSchema are available in VS Code 1.96+.

Tool reference
Display name
What it does

#lensesExtensionSql

Run Lenses SQL

Opens the SQL editor for an environment and optionally runs a query immediately. Live streaming supported.

#lensesExtensionDoc

Open Lenses document

Opens any virtual document in view or edit mode — IAM entities (User, Group, Role, ServiceAccount), Topics, Connectors, Schemas, Provisioning, EnvironmentConfig, EnvironmentCreate, TopicCreate, TopicConfig.

#lensesExtensionListing

Open Lenses listing

Opens a listing panel: environments table, topics, schema registry, IAM (users / groups / roles / service accounts), or the SQL Results panel.

#lensesExtensionTopic

Topic action

Runs a topic-scoped action: data snapshot, live data, schema view, consumers, configuration, insert messages, compare across environments, open SQL tab, delete topic (with confirmation), create topic, add favourite.

#lensesExtensionEnv

Environment action

Switches the active environment, opens environment config or provisioning YAML, creates or deletes an environment (with confirmation), refreshes health.

#lensesExtensionCompare

Lenses comparison

Opens comparison wizards (topic config, topic schema, groups, roles) or performs a direct diff between two named entities across environments.

#lensesExtensionSearch

Lenses search & index

Opens the global search panel or drives search index actions (rebuild, start/stop/pause/resume indexing, validate, view stats).

#lensesExtensionOps

Lenses misc command

Miscellaneous commands: refresh tree/favourites/notifications, stop SQL, clear results, apply/save changes, schema version actions, connector/consumer group ops, notification management.

#lensesExtensionSchema

Schema Registry action

Manages schema registry subjects: open, edit, create, delete subject or version, version history, cross-environment comparison, favourites. Specify both versions or both environments for instant diffs without prompts.

Last updated

Was this helpful?