Built-in database viewer panel (SQLite, PostgreSQL, MySQL) #50628
Replies: 23 comments 11 replies
|
There is a similar #24000 discussion |
|
I think this is incredibly cool! There was a lot of interest in this feature in the discussion I started, and I think people will really like it. |
|
The three-crate split ( On the built-in vs extension question: the MCP tool registration point is what tips this toward built-in. Extensions can't register MCP tools today, and the AI-assisted query workflow ( One suggestion on the The connection trait pattern with credential storage in OS keychain rather than config files is a nice security detail. One thing worth considering: a Disclosure: I work on ai2sql.io, a natural language to SQL tool. |
|
Awesome initiative. @so-keyldzn if you have Discord, you can find me there under same nickname as here, so feel free to ping me, I'd like to chirp about this matter |
|
I would also like to point out that databases list should be extendable using extensions or at least be easy to make extendable. |
|
why isn't this in production already? At least csv and sqlite should be easily viewed in table format since they are flat files, add xlsx and md tables while you are at it |
|
Microsoft SQL support would be nice ;) |
|
we need this! |
|
bump |
|
We need this feature |
|
100%. This is the only reason that I haven't made the complete switch yet. |
|
NATS/Kafka support would be also super-useful, btw |
|
Amazing work. Can we add duckdb support as well? There's a first party rust lib for it, and duckdb has tons of extensions for other databases so people can connect to them without zed integration. |
|
@mathroc @devurandom Am I missing something? Has this been implemented and that's the motivation for the downvotes? I would love this, personally. |
|
I was just looking for a SQLite plugin for Zed... assumed it already existed lol so ya PR for sure bro :) |
|
Very interesting feature ! |
This comment was marked as spam.
This comment was marked as spam.
|
definitely needed this. could you please tell us the current status of it @so-keyldzn? |
|
Hi, would be very happy if the core team can integrate this!! This is something I truly miss in Zed! |
This comment was marked as spam.
This comment was marked as spam.
|
So I forked zed and started adding some things because it didn't have every tool I needed and this as well is a feature I was thinking about its a very needed feature and people and some editors dont always have what you want |
|
Add DuckDb support please |
|
Thanks everyone for the replies, and sorry for going quiet here. Quick status update, then some answers. The PR (#50877) was closed. The team said it's more maintenance than they can take on right now, which is fair for ~20k lines landing in one go. So this isn't coming to Zed, at least not in that form. @itsbalamurali suggested on the PR that it could be its own app, so I started over and built one: https://github.com/so-keyldzn/oxyn. It's a standalone desktop app with a Rust core, written from scratch rather than extracted from the Zed branch. To be clear about where it stands: v0.0.1, macOS only, no release binary yet, and only SQLite and PostgreSQL drivers so far. If you want this inside Zed specifically, follow @HalavicH's work. His CSV preview and the SQLite previewer built on top of it are going through review in small pieces (#63752 is one of them). That's a much more realistic path into main than my giant PR was. @HalavicH sorry the branch didn't build for you. I stopped maintaining it once the PR closed, so it has only drifted further since. Reusing your tabular component for DB results sounds like the right call to me. I don't use Discord, but happy to talk here or in an issue on the Oxyn repo. @torikki-tou agreed on extensibility. In Oxyn the driver API sits in its own crates under Apache-2.0, so anyone can write a driver under whatever license they like. Loading drivers as plugins is planned but not built yet. @kylejbrk @VladimirKosimovsky DuckDB is on the list, and yes, the official duckdb crate makes it pretty painless. MySQL comes first though. @ghedwards SQL Server is in scope too, just further out. @sergeyzwezdin NATS and Kafka are brokers more than databases, so they're not planned for now. @mergisi thanks for the architecture notes. A test_connection tool for the agent is a good idea, I'll look into it. @ilkersigirci hopefully that answers your question. And thanks to everyone who upvoted or said they wanted this. That's a big part of why I kept going. |






Uh oh!
There was an error while loading. Please reload this page.
I built a database viewer panel for Zed and wanted to check if there's interest before opening a PR. It works as a dock panel — same placement as the terminal or project panel — and lets you connect to SQLite, PostgreSQL, and MySQL databases without leaving the editor.
I've been using it daily for a few weeks. Here's what it does:
Connections
Schema browser
Query editor
@name), tab pinningResult grid
Import / Export
AI tools
How it's built
Three crates:
database_core— No GPUI dependency. Connection trait with three drivers, schema introspection, query results (11 cell types including JSON, UUID, Blob), export to 8 formats. ~100 tests.database_ui— The panel. Built on GPUI. Connection manager, schema tree, query editor, result grid, import/export dialogs. ~60 tests.database_ai— Registers 6 MCP tools for agent threads. Depends ondatabase_coreonly.The wiring into
crates/zed/touches 4 files with minimal changes. Total is around 16k lines across 35 new files with 170 tests.Why not an extension?
I looked into this first. A few things pushed me toward a built-in panel:
database_corehas zero GPUI dependencies, so if the extension API grows to cover these things later, pulling the feature out into an extension would be doable.Questions
Happy to share a screen recording or hop on a call if that helps. Code is on my fork: https://github.com/so-keyldzn/zed/tree/feature/database-viewer-panel
All reactions