DBClient.nvim is a Neovim database client with a Lua UI and a Rust core.
Adapters are lazy-loaded, so database-specific code is only loaded when a configured connection needs it.
This is an initial implementation intended for publication after more real database testing. It was built with AI-assisted rapid development, so treat the current version as early software: useful, inspectable, and moving quickly, but not yet a mature database client.
DBClient.nvim is being prepared for public release. Before publishing, the main work is adapter hardening against real MariaDB, PostgreSQL, and SQLite databases, plus focused tests around cell updates, SSH tunnels, and result rendering.
- MariaDB, PostgreSQL, and SQLite adapters through
dbclient-core. - SSH local forwarding support for database connections behind a jump host.
- A keyboard-first, Neovim-native database workspace.
- Query execution into scratch result buffers.
- Data preview buffers with explicit primary-key guarded cell updates.
- Schema/object inspection buffers separate from data buffers.
- Procedure/function discovery with query-buffer call seeding.
- Lazy Lua adapter registry and Rust
DbAdapterimplementations. - Reusable scratch buffers with default Neovim highlight groups.
These screenshots are generated from a real DBClient session against a disposable MariaDB Docker container with a sample schema. The SVG sources are kept beside the PNGs so the captures stay reviewable and easy to regenerate.
- Neovim 0.10 or newer.
sshonPATHwhen using SSH tunnels.- MariaDB, PostgreSQL, or SQLite access from the local machine or through SSH forwarding where supported by the adapter.
With lazy.nvim:
{
"DorianDevp/dbnvimer",
}DBClient.nvim ships a bundled dbclient-core binary in bin/ and uses it by
default when it matches the current OS and CPU architecture.
Bundled binary names:
bin/dbclient-core-linux-x86_64bin/dbclient-core-linux-aarch64bin/dbclient-core-macos-x86_64bin/dbclient-core-macos-aarch64bin/dbclient-core-windows-x86_64.exe
If your platform does not have a bundled binary yet, install a Rust stable toolchain and build the core manually:
cargo build --release --manifest-path rust/dbclient-core/Cargo.tomlThen point DBClient at the built binary in setup():
require("dbclient").setup({
core = {
command = vim.fn.stdpath("data") .. "/lazy/dbnvimer/rust/dbclient-core/target/release/dbclient-core",
},
})require("dbclient").setup({
connections = {
local_mariadb = {
adapter = "mariadb",
host = "127.0.0.1",
port = 3306,
user = "root",
password = vim.env.MARIADB_PASSWORD,
database = "app",
},
via_ssh = {
adapter = "mariadb",
host = "127.0.0.1",
port = 3306,
user = "app",
password = vim.env.MARIADB_PASSWORD,
database = "app",
ssh = {
host = "bastion.example.com",
user = "deploy",
port = 22,
remote_host = "127.0.0.1",
remote_port = 3306,
},
},
local_postgres = {
adapter = "postgres",
host = "127.0.0.1",
port = 5432,
user = "postgres",
password = vim.env.POSTGRES_PASSWORD,
database = "app",
},
local_sqlite = {
adapter = "sqlite",
path = vim.fn.expand("~/data/app.sqlite3"),
},
},
})SQLite uses path for the database file. PostgreSQL supports the same optional
ssh table as MariaDB.
:DBClientopens the database sidebar.:DBClientConnect <name>selects a configured connection.:DBClientQueryexecutes the selected SQL or current statement.:DBClientQueryTabopens or focuses the query buffer.:DBClientData <schema.table>opens a table preview buffer.:DBClientClosecloses active tunnels.
qcloses DBClient windows.<CR>opens the item under cursor.oopens the item under cursor.gdopens table data for the focused table.gsopens schema or table inspection.gqopens or focuses the query buffer.]t/[tjump between visible tables.ssearches visible table names.nrepeats the last table-name match.rrefreshes schemas and tables.eopens a query buffer for the active connection.Ftoggles fullscreen for DBClient windows.- In data buffers,
]c/[cmove cells,]r/[rmove rows,istages a cell edit in a transaction,I/Eupdates a cell immediately, andTreviews pending transaction changes. <leader>dqexecutes SQL from a query buffer.<C-CR>executes SQL from normal or insert mode in a query buffer.<leader>dcopens the connection picker.
Cell updates require a primary key. In a data buffer, press i on a cell to
open an empty edit popup and stage the new value in a pending transaction. Press
T to review staged changes, then c to commit them in one backend
transaction, r to rollback the local changes, or q / <Esc> to keep
editing.
Press I or E to edit the current cell and execute the update immediately.
The edit popup starts empty and shows the old value in the popup title. To set a
SQL NULL, enter NULL without quotes. For date and datetime values, enter the
raw scalar value, for example 2025-05-29 or 2025-05-29 00:00:00.
Adapters live under lua/dbclient/adapters/<name>.lua and are only loaded when
selected. Current adapters:
mariadbpostgressqlite
Each adapter returns a table with:
connect(connection, config)close(handle)schemas(handle)tables(handle, schema)columns(handle, schema, table)routines(handle, schema)preview(handle, schema, table, limit)update_cell(handle, schema, table, column, value, pk)update_cells(handle, updates)query(handle, sql)
This keeps DB-specific code outside the UI and lets new adapters remain lazy.
The Rust core mirrors this with a DbAdapter trait; DB-specific SQL,
identifier quoting, and value validation live in Rust adapter modules.
The git history documents each implementation step with small commits. User
visible behavior is also covered in doc/dbclient.txt, and release-level notes
are kept in CHANGELOG.md.
cargo fmt --manifest-path rust/dbclient-core/Cargo.toml
cargo check --manifest-path rust/dbclient-core/Cargo.toml
nvim --headless -u NONE -i NONE -c "set rtp+=." -c "lua require('dbclient').setup({ connections = {} })" -c "qa"The README screenshots are generated by scripts/capture_readme_screenshots.lua.
It expects a MariaDB instance on 127.0.0.1:13306 with the sample shop
schema used for the captures, then drives DBClient in headless Neovim and
rewrites docs/screenshots/*.svg. PNG copies are rendered from those SVGs with
rsvg-convert.
Run the Bundle core binaries GitHub Actions workflow manually before tagging a
release. It builds dbclient-core on Linux, macOS, and Windows runners, copies
the outputs into bin/, and commits changed binaries back to the repository.
After the workflow commit lands:
git pull
git tag v0.1.0
git push origin v0.1.0

