sqlit: a Keyboard-Only DBeaver, and the Whole Model on One Page
The closing recap: five coordinates, the tunnel, docker packaging, and one-shot vs REPL in one page, then the payoff, a keyboard-only DBeaver called sqlit that runs the whole model inside one terminal session.
The whole series was after one thing: a single mental model for reaching a remote DB from a terminal. Here is that model in one breath, and the tool that finally wraps it.
The model in one page
- A connection is five coordinates: host / port / user / password / database. A URI just strings them into one line. → a connection is five coordinates
- A tunnel borrows the remote DB onto
127.0.0.1:PORT: Cloud SQL Proxy for managed DBs,kubectl port-forwardfor DBs inside k8s. Two auth paths, one local port. → two tunnels - docker packages that tunnel: image vs build is provenance. COPY bakes files in, volumes mount them live. → image vs build
- After connecting, a query flag decides the mode: pass one and it is one-shot, omit it and you get a REPL. → one-shot vs REPL
Every database’s CLI is that same model with a different spelling. That last sentence is the whole point.
The payoff: a keyboard-only DBeaver
Before, my data sat behind three different tools. Now most of it opens with one keystroke:
If the concept is identical and only the flag spelling changes, one tool can wrap the SQL-ish engines. That is what sqlit does. I set up Postgres, MySQL, and ClickHouse in it at once. I open them keyboard-only inside one terminal session, no mouse, no jumping between apps. It follows the same “lazy” style as the k9s / lazygit I already live in.
MongoDB stays on Compass, on purpose. Its connection model and query language are different enough (a document store with a JavaScript-flavored shell, not SQL over five coordinates). Folding it into the same TUI pretends they are the same when they are not. Consolidate what shares a model, not everything.
So the arc closes on itself. I started wanting DBeaver’s convenience without leaving the terminal. I took the laptop → remote DB path apart one layer at a time. I came out with a TUI that gives me exactly that for the engines that share the model. I am migrating my daily SQL workflow from DBeaver to sqlit, and so far so good.
One model, one tool: sqlit covers Postgres, MySQL, and ClickHouse at once. MongoDB plays by different rules, so it keeps Compass.
References
Related: back to the remote DB overview. This recaps the five coordinates, the two tunnels, and the one-shot vs REPL fork.