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.

Grid row edits stage before they touch 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.
+Prompted DDL actions preview the statement; the two-name :GripRename form executes immediately.
+gA or :GripFill sends the active schema to the configured provider and stages its returned rows for review.
+gz zooms a pane and restores its split layout; :GripToggle closes Grip buffers.
+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. Use h/l to fold groups and / to find hidden objects.
+? shows the current pane’s keys. Digits are contextual: 2 opens SQL from results and history from SQL.
+Welcome offers demo, connection, table, and SQL actions. Select with Tab or j/k, then press Enter.
+gG opens the ER map. Result shortcut hints fit two rows and stay visible during horizontal scrolling.

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 loads a notebook copy, and <C-CR> runs its SQL fence or the current SQL paragraph.
+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 databases and a file in one statement

Attach supported databases to a DuckDB session, then JOIN their prefixed tables with a file read by DuckDB. Private remote files need credentials available to the client.

-- attach your sources
:GripAttach postgres:dbname=production host=db.internal user=app  prod
:GripAttach sqlite:archive.db  legacy
-- read the Parquet source in the JOIN below

-- then JOIN in the query pad (<C-CR> to run)
SELECT
  prod.customers.email,
  legacy.orders.total,
  enrichment.segment
FROM prod.customers
JOIN legacy.orders ON legacy.orders.customer_id = prod.customers.id
JOIN read_parquet('s3://my-bucket/enrichment.parquet') AS enrichment ON enrichment.email = prod.customers.email

Load the plugin with Lazy.

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

-- then connect
:GripConnect