Skip to content
All writing Part 09 of 09 · Reaching a Remote DB From Your Laptop
Engineering · 3 min read

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-forward for 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:

BEFORE Postgres · MySQL DBeaver (GUI) ClickHouse port-forward + clickhouse-client MongoDB Compass (GUI) NOW Postgres · MySQL · ClickHouse sqlit · one TUI MongoDB Compass (still; different model) the SQL-ish engines collapse into sqlit; MongoDB keeps Compass
Before, three tools; now Postgres, MySQL, and ClickHouse share sqlit, while MongoDB stays on Compass.

If the concept is identical and only the flag spelling changes, one tool can wrap the SQL-ish engines. That is what sqlit does. Postgres, MySQL, and ClickHouse are set up in it at once, opened 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) that folding it into the same TUI would pretend 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, took the laptop → remote DB path apart one layer at a time, and came out with a TUI that gives me exactly that for the engines that share the model. I’m 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.

Tags #databases #cli
// connect

Be brave | Be wise | Be grateful

21 BreakinCode

// elsewhere
LinkedInMedium (lang: en)Life RecordYoutube
wh:~$William Hung· © 2026 Taipei · GMT+8 · Available for collaboration