Top
Best
New

Posted by MaxTeabag 12/15/2025

Show HN: Sqlit – A lazygit-style TUI for SQL databases(github.com)
I work mostly in the terminal but found myself constantly switching to bloated GUIs like SSMS only for the simple task of browsing tables and run queries. And I didn't find Existing SQL TUIs intuitive, having to read documentation to learn keybindings and CLI flags to connect. Given I had recently switched to linux, I found myself using vs code's sql database extension. Something was awfully wrong.

I wanted something like lazygit for databases – run it, connect, and query and frankly just make it enjoyable to access data.

  Sqlit is a keyboard-driven SQL TUI with:

  - Context-based keybindings (always visible)
  - Neovim-like interface with normal and insert mode for query editing
  - Browse databases, tables, views, stored procedures
  - Adapters for SQL Server, SQLite, PostgreSQL, Turso & more
  - SSH tunneling support
  - Themes (Tokyo Night, Nord, Gruvbox etc.)

  Inspired by lazygit, neovim and lazysql. Built with Python/Textual.
Feedback welcome – especially on which adapters to prioritize next. My vision of sqlit is to make a tool that makes it easy to connect and query data, and to do that, and that thing only, really well.

https://github.com/Maxteabag/sqlit

190 points | 42 commentspage 2
mxgrn 12/20/2025|
Love how easy and intuitive it is to use it! Keep it up, what a great project!
waterTanuki 12/17/2025||
Tried it out on a local test postgres db.

First error: "Connection failed, no module named 'psycopg2'"

lgas 12/17/2025|
You need to install psycopg2, or perhaps more likely psycopg2-binary to access postgres databases. After hiichbindermax and mrbump helped me out upthread, I was able to get it working via:

    uvx --from sqlit-tui --with psycopg2-binary sqlit
If you're not using uv, then you'll need to install psycopg2-binary in whatever environment you're using (probably via `pip install psycopg2-binary`).
ruicraveiro 12/17/2025||
There's only one thing I can say about this: THANK YOU!!!!! Really cool!
MaxTeabag 12/17/2025|
Thanks! I'm glad you liked it.
oulipo2 12/16/2025||
What would be the main differences with Harlequin?
NSPG911 12/17/2025||
I asked the same thing on Discord where he also showcased it. He answered the question with this.

> I wanted to make something that makes intuitive sense to me, and I wanted to make a sql version of what lazygit does, namely you can just jump in and there's no need for external documentation. To navigate the harlequin with keyboard only you have to learn the keybindings. Also I though it was quite hard to connect to databases via the cli and install adapters (again, documentation necessary). I wanted to have a tool that you can just run and its intuitive. There's definitely more features in harlequin and I went with more lightweight, though sqlit has SSH tunnels, which harlequin lacks.

When I linked lazysql[0], he replied with this

> That was my original inspiration. Same problem with harlequin, I didn't feel like it was intutive and to follow the "lazy" mindset of lazydocker and lazygit, it should just be easy and not require looking up keybindings. Lazysql ended up with too many features for my taste to the point it was difficult to use

[0]: https://github.com/jorgerojas26/lazysql

jbstack 12/17/2025||
I've recently been trying to find a good SQL TUI client, and one of the ones I tried was Harlequin. The main disadvantage, which every other SQL TUI I tried also suffers from, is that they don't comprehensively show every type of database object in the browser pane (e.g. tables, views, indexes, procedures). For example Harlequin only shows tables. This means that when you want to view one of the missing ones, you have to run a query. This means that you have to already know that the object you are looking for exists: there's no way to get a good overview of what you have in the database just by glancing at the browser. For me this sort of defeats the point of having a TUI in the first place.

It seems like the OP's offering has the same problem, although it does offer more objects than Harlequin. I'll be bookmarking it to see how it develops.

MaxTeabag 12/17/2025||
Appreciate that take!

I'm looking into indexes/triggers/sequences. That will be added in a near-future release, I hope you can benefit from it once I release it :)

jbstack 12/18/2025||
Great. If you added those this would probably become my go-to SQL client.
MaxTeabag 12/20/2025||
Hi,

I've added this now: https://github.com/Maxteabag/sqlit/releases/tag/v1.1

Thank you for the suggestion.

le-mark 12/16/2025||
What tool is used to make the gifs of the ui?
ursula_gren 12/17/2025||
I know that licecap(https://www.cockos.com/licecap/) can be used to accomplish that.

Not sure if this is what is being used here though.

talideon 12/17/2025||
asciinema should do the job. It has GIF generation support via its 'agg' tool: https://docs.asciinema.org/manual/agg/
alsetmusic 12/16/2025||
Very attractive design.
onemoresoop 12/16/2025||
Looks fantastic.
bpiroman 12/17/2025||
dude, this looks so cool!!!