StreamLens
Open source Kafka UI for VS Code — manage your clusters, topics, consumer
groups, and messages directly from VS Code without setting up a Docker image
or opening another IDE.
StreamLens brings a comprehensive Kafka management experience natively to VS Code:
a TreeView for quick navigation in the Activity Bar and modern React-based webview
panels for rich details and message operations.
How it works
StreamLens runs entirely inside VS Code — no Docker image or separate IDE needed.
- Add a cluster — open the StreamLens view in the Activity Bar and add a
connection (bootstrap brokers + optional SASL/SSL). Credentials are stored in
VS Code
SecretStorage, never in your settings or workspace.
- Connect — StreamLens connects with KafkaJS and shows cluster health,
brokers and the controller in the Cluster Overview panel.
- Browse the tree — the Activity Bar TreeView lists Topics, Consumer Groups,
Brokers and Schema Registry subjects. Hover a topic for inline Consume
and Produce actions; right-click any item for the full context menu.
- Operate — every topic, consumer, producer, consumer group and schema
registry opens in its own editor tab (with its own icon, in the editor group
you are working in), styled like the rest of VS Code: browse topic
partitions/configs, produce messages (with schema support), consume in real
time with offset/timestamp seeking, per-column filters and a resizable
record detail pane, and inspect/validate schemas.
- Monitor & fix — track consumer group lag per partition (owner, committed,
end, lag and an inline lag bar), then reset offsets (earliest/latest/timestamp/
specific) with a preview and post-reset verification.
Everything auto-refreshes on an interval (configurable) so new topics, groups
and schemas surface without manual reloads.
Features (Roadmap)
- Cluster Management — Multi-cluster connections, broker list, and cluster health
- Topic Browser — Topic list, partition details, and config viewing/editing
- Consumer Groups — Offset tracking, lag monitoring, reset offset
- Message Producer — Send messages with key/value/headers and schema support
- Message Consumer — Real-time consume, seek by offset/timestamp, and filtering
- Schema Registry — Browse/validate Avro/Protobuf/JSON schemas
- ACL Viewer — Permission list
- Serialization — Avro, Protobuf, JSON, String, binary deserializer
- ZooKeeper/KRaft — Metadata viewing
See .github/plans/streamlens/ for the phased roadmap.
Architecture
| Layer |
Location |
Responsibility |
| Extension host |
src/ |
VS Code API, commands, TreeView, Kafka service layer |
| Shared types |
shared/ |
Host ↔ webview message and model contracts |
| Webview UI |
webview-ui/ |
React + Tailwind, theme-aware interface |
- Kafka client: KafkaJS (pure JS, no native dependencies)
- Webview security: strict CSP + per-load nonce
- Credentials: VS Code
SecretStorage only
Development
Prerequisites: Node.js 18+ and VS Code 1.85+.
# Install dependencies (root + webview-ui)
npm run install:all
# Build the webview + extension host
npm run build
# Start the Extension Development Host with F5 in VS Code
Then, in the new window, run the Cmd/Ctrl+Shift+P → StreamLens: Open Panel command
or click the StreamLens icon in the Activity Bar.
Useful commands
| Command |
Description |
npm run build |
Builds the webview and extension host |
npm run watch |
Builds the extension host in watch mode |
npm run lint |
Runs ESLint |
npm run format |
Formats with Prettier |
npm test / npm run test:e2e |
Runs the src/ integration tests (needs the Docker stack, see below) |
npm run test:webview |
Runs the webview UI component tests (jsdom) |
Testing
The webview component tests run in jsdom and need no services:
npm run test:webview
The src/ integration (e2e) tests exercise the Kafka + Schema Registry service
layer against real containers. Bring up the bundled stack first:
docker compose up -d # Kafka on localhost:9092, Schema Registry on :8081
npm run test:e2e # run the integration tests
docker compose down -v # stop and wipe state
Releasing
Releases are automated by .github/workflows/release.yaml.
Pushing a version tag builds, packages and publishes the extension to the VS Code
Marketplace and Open VSX, and creates a GitHub Release with the .vsix attached.
One-time setup (repository Settings → Secrets and variables → Actions):
- VS Code Marketplace — no secret needed. Publishing uses OIDC trusted
publishing: on the
streamlens publisher at
https://marketplace.visualstudio.com/manage, a Trusted Publishing policy
allows seneralkan/streamlens → release.yaml to publish.
- Open VSX (used by Cursor, Windsurf, VSCodium) — also OIDC trusted
publishing, but Open VSX only allows it once the extension has a published
version. For the very first release, add an
OVSX_PAT secret (token from
https://open-vsx.org, streamlens namespace, signed Publisher Agreement).
Afterwards register seneralkan/streamlens → release.yaml under
Settings → Trusted Publishers and delete the secret.
To cut a release, bump the version and push a matching tag:
npm version patch # updates package.json and creates a vX.Y.Z commit + tag
git push --follow-tags
The workflow fails fast if the tag (e.g. v0.1.0) does not match the
version field in package.json.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md and
CODE_OF_CONDUCT.md.
Support
If StreamLens saves you a Docker image or an IDE switch, consider supporting the
project: ☕ Buy Me a Coffee.
License
MIT