Chonk, the dadbod-grip mascot Dadbod Grip

Edit database tables like Vim buffers.

Dadbod Grip turns database tables into editable Vim buffers, with schema browsing, staged mutations, generated SQL, relationship navigation, and cross-database federation inside Neovim.

dadbod-grip: schema sidebar, query pad, and editable grid with color-coded mutations
PostgreSQLMySQL / MariaDBSQL ServerSQLiteDuckDB / MotherDuckFiles / S3 / HTTPS

Review the write before it runs.

Every change stages before it touches the database. Review the SQL. Commit or cancel. The grid keeps investigation fast and makes the write visible before it runs.

i
Edit
The popup editor opens on the cell. Change the value and press Enter to stage it.
Color-coded
Teal marks an update. Red marks a deletion. Green marks an insertion. Nothing has run yet.
gl
Preview SQL
The live float shows the exact DML as you work. It does not execute the SQL.
a
Apply
Dadbod Grip sends one BEGIN/COMMIT batch. If the client reports an error, inspect the database before retrying.
live SQL float (gl)
-- 3 staged changes, waiting for `a` to apply

BEGIN;
UPDATE orders SET status = 'shipped' WHERE id = 42;
DELETE FROM orders WHERE id = 17;
INSERT INTO orders (customer_id, total) VALUES (88, 149.99);
COMMIT;

Click any cell. Delete a row. Insert one. Watch the SQL update live.

idnamestatustotal
42Alice Chenpending149.99
43Bob Parkshipped89.50
44Carol Diazpending234.00
45Dan Kimreturned67.25
46Eve Lushipped412.80

The database work stays in one workspace.

01

Staged mutations stay visible.

Stage one change or fifty, then inspect the generated SQL. Dadbod Grip sends one BEGIN/COMMIT batch and keeps the staging state when the client reports an error, so you can inspect the database before retrying.

Editing docs →
02

DuckDB joins the sources.

Use DuckDB as a hub for PostgreSQL, MySQL, SQLite, MotherDuck, local files, S3 objects, and HTTPS sources. SQL and attachment credentials travel through standard input instead of process arguments.

Federation docs →
03

AI generates SQL, not approval.

A, or gA in the query pad, sends the request, current SQL, and cached schema metadata to the configured provider. The request travels through curl config on standard input. Generated SQL returns for review and does not run automatically. Grid gA stages generated rows instead.

AI docs →

The rest of the workflow stays keyboard-native.

Editing

+Visual mode stages one edit across selected rows.
+The staging buffer supports multi-level undo, and applied batches produce best-effort compensating SQL.
+DDL actions rename, add, and drop columns and tables after showing the statement.
+gA or :GripFill sends the active schema to the configured provider and stages its returned rows for review.
+:GripToggle closes or restores the Dadbod Grip windows.
+Conditional formatting marks negative numbers, booleans, dates, and URLs without changing their values.

Navigation

+gf follows an outgoing foreign key, gm follows incoming references, and <C-o> returns.
+The schema sidebar marks primary and foreign keys and opens table-depth views with keys 1 through 9.
+<C-p> searches the actions available on the current surface.
+K turns the current row into a vertical key-value record.
+gG opens an ER map of the tables and their foreign-key relationships.

Analysis

+gR profiles distributions, completeness, and cardinality across the table.
+gQ turns an EXPLAIN plan into cost bars and heuristic index suggestions.
+gD compares two tables by primary key.
+s changes the primary sort, while S adds another sort tier.
+gF builds filters for equality, ranges, patterns, sets, and null values.
+gP saves the active filters, and gp restores a preset.
+gx opens an HTTP, HTTPS, or FTP URL from the current cell.

Integration

+Built-in SQL completion includes tables, columns, aliases, and attached schemas.
+The picker option delegates supported lists to Telescope or snacks.nvim.
+blink.cmp and nvim-cmp can consume Dadbod Grip's completion source.
+gn opens a SQL notebook, and <C-CR> runs the block under the cursor.
+Saved queries bind to opaque connection IDs instead of copied database URLs.

I/O

+gE and gX export the current page or every filtered and sorted row.
+:GripOpen reads Parquet, CSV, JSON, Excel, ORC, Arrow, IPC, HTTPS, and S3 sources through DuckDB.
+gW reruns a file query on a timer while no edits are staged.
+g! enables write mode for supported local files.

Query three databases in one statement

Attach any combination of databases to a DuckDB session. Every attachment gets a schema prefix. JOIN across them like they are local tables.

-- attach your sources
:GripAttach postgres:dbname=production host=db.internal user=app  prod
:GripAttach sqlite:archive.db  legacy
:GripAttach s3://my-bucket/enrichment.parquet  enrichment

-- then JOIN in the query pad (<C-CR> to run)
SELECT
  prod.customers.email,
  legacy.orders.total,
  enrichment.data.segment
FROM prod.customers
JOIN legacy.orders ON legacy.orders.customer_id = prod.customers.id
JOIN enrichment.data ON enrichment.data.email = prod.customers.email

Load the plugin with Lazy.

lazy.nvim
-- lazy.nvim
{ "joryeugene/dadbod-grip.nvim" }

-- then connect
:GripConnect