Features
Understand the capabilities of the Lenses VS Code Extension for Kafka.
Use the extension to explore environments, manage Kafka resources, run SQL, and monitor health without leaving VS Code.
Start with Install, then follow Quick Start. For language model tooling and command references, see Overview.
Environments
Explore environments
View and search all your Kafka environments with status indicators.

Each environment shows a green or red indicator so you can see at a glance whether the Lenses agent is connected
Click any environment name to explore its topics, schemas, and connectors
Create environments
Create new Kafka environments with a guided workflow directly from VS Code.

Click the "+" icon on Environments or use Command Palette → Lenses: Create Environment
YAML editor for environment profile with full schema validation
After creation, deploy the agent: if your Lenses HQ is local (e.g. localhost or private network), you can run or paste a Docker command, copy the agent key for later, or skip. If you are connected to a remote/cloud HQ, the extension does not offer local Docker (it would not connect); you get a short explanation and can copy the agent key to deploy where your HQ can reach the agent.
When using local Docker from the extension, connection polling runs until the agent connects (or you cancel)
Transition to provisioning configuration once connected
The guided workflow walks you through environment definition and agent handoff; remote setups rely on copying the agent key into your own deployment process.
Topics
Create topics
Create new Kafka topics directly from VS Code with full schema validation and autocompletion.

To create a new topic, just click the "+" icon next to the Topics section in the tree, or open the Command Palette and choose Lenses: Create Topic. You'll be taken to a YAML editor with instant schema validation and smart autocompletion to help you fill in details like partitions, replication, and any other Kafka topic settings you need. Once you hit "Create," your new topic will show up in the list right away—even before the backend has fully finished its setup. For best results, give it a moment before working with the topic, as it may take a little time (sometimes a few minutes) for everything to be ready behind the scenes.
Insert messages
Insert messages directly into Kafka topics with full schema validation and autocompletion.

To quickly add test messages to any topic, just right-click it and choose Insert Messages. You’ll get an easy-to-use JSON editor that checks your input in real time against the topic's schema. The editor can even generate sample messages for you, based on the topic’s AVRO or JSON schema. You can provide a key, value, and optional headers, then hit the Play button to send your messages. As soon as they’re inserted, you’ll jump straight to a pre-filled SQL query so you can view your new data right away. If there are any issues, errors are shown inline and connected to VS Code’s Problems panel, making fixes simple.
Query topic data
Browse and query topics with the integrated SQL editor.

Data Snapshot — Click directly on any topic or right-click and select Data Snapshot to query historical data with SQL:

Press Cmd+Enter to run the query or click the Play icon in the top right corner. Results appear in the bottom panel below the editor.
Live Data — For real-time streaming, right-click on a topic and select Live Data. This opens a streaming SQL query panel, continuously showing new records as they arrive.
You can stop the stream whenever you like and resume later
Add SQL filters to narrow down what you see in real time
Keep an eye on high-throughput topics, as they can increase memory and CPU usage
Results appear in an interactive data grid in the bottom panel, showing all message fields with sorting and filtering. You can control live data behavior with the lenses.sql.liveData.maxRecords and lenses.sql.liveData.rateWarningEnabled settings.
Edit topic configuration
Edit topic configurations directly in VS Code's native JSON editor.

JSON schema validation highlights errors inline as you type
Hover over any property to see its documentation
When you apply changes, only the values you actually modified are sent to the API
Manage schemas
View and manage topic schemas with version history.

View both key and value schemas for any topic
Browse through previous versions using the version dropdown
Compare any two schema versions side by side to see what changed
Edit schemas directly and apply updates from VS Code
Schema Registry
Schema Registry
Browse and manage Schema Registry subjects for each environment, right next to its Topics node in the tree.

Click the Schema Registry node under any environment to load every subject; the inline icons let you create a new subject (
+), refresh the list, or open a full listing webview ($(table)).Click any subject to view its latest schema directly in VS Code's native JSON editor — no extra panels, full syntax highlighting, foldable AVRO/JSON/Protobuf payloads. Inline CodeLens actions appear above the document to edit, refresh, browse version history, compare versions or environments, and toggle favourites.
Click the + icon (or run Lenses: Create Schema Subject) to open a JSON-Schema-validated template document. Fill in
subjectName,format(AVRO / JSON / PROTOBUF), and theschemaitself; the editor autocompletes valid options and highlights mistakes inline. Saving the document registers the subject through the Lenses API and immediately opens it for review.Browse version history for any subject and compare versions side by side using VS Code's native diff editor. Cross-environment comparison lets you spot schema drift between staging and production.
Delete subjects or individual versions from the tree context menu with confirmation prompts.
Schema Registry subjects are included in the global search index — press
Cmd+Shift+Lto find any subject instantly across environments.
Access control
Manage IAM entities
Manage identity and access directly from VS Code.

Users — Create, view, and delete user accounts for your Lenses instance
Groups — Organize users into groups and assign roles to control what each group can access
Roles — Define fine-grained permissions that specify exactly which actions are allowed on which resources
Service Accounts — Manage credentials for API and programmatic access
All IAM entities open in a JSON editor with full schema validation, so you get instant feedback if something is misconfigured. Role names and permissions autocomplete as you type, and changes you make are reflected in real time across any open tabs.
Comparison and monitoring
Compare configuration
Compare entities across environments using VS Code's native diff editor.

You can compare topic configurations and schemas (both key and value) across different environments to spot differences between staging and production. For global entities like groups and roles, compare any two side by side regardless of environment.
Start a comparison from the Command Palette or by right-clicking an entity in the tree view.
Monitor health
Monitor Kafka infrastructure health in VS Code's Problems panel.

Warns you when consumer lag crosses your configured thresholds, so you can catch slow consumers early
Alerts you when a connector fails or enters an unhealthy state
Flags environment connectivity issues if an agent goes offline
Optionally shows real-time toast notifications for critical issues so you don't miss anything while coding
Productivity
Use bookmarks and saved queries
Keep your frequently accessed topics and queries at your fingertips.

Topic Favourites — Right-click any topic and choose Add to Favourites to pin it for quick access. Clicking a favourited topic opens a pre-configured SQL query right away, and you can remove favourites with a single click when you no longer need them.
Saved Queries — Save any SQL query you want to reuse by pressing Cmd+Shift+P → Lenses: Save Query, or click the star icon in the SQL editor. Your saved queries appear in the sidebar so you can open them in a new tab with one click, and rename or delete them from the context menu.
All favourites and saved queries sync with your Lenses.io web app, so your workflow carries over seamlessly between platforms.
Search globally
Find any entity instantly with fuzzy search (requires initial indexing; very large environments may take longer to index). You can adjust search behavior, result limits, and other indexing options in the extension's settings.
Press Cmd+Shift+L (Ctrl+Shift+L on Windows/Linux) to open the search panel, then start typing. Results span all your environments, topics, users, and other entities, ranked by relevance. Click any result to navigate directly to that entity in the tree or open its document.
Last updated
Was this helpful?

