←back to thread

190 points MaxTeabag | 6 comments | | HN request time: 0.214s | source | bottom

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

1. oulipo2 ◴[] No.46296205[source]
What would be the main differences with Harlequin?
replies(2): >>46299354 #>>46299611 #
2. NSPG911 ◴[] No.46299354[source]
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

3. jbstack ◴[] No.46299611[source]
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.

replies(1): >>46304759 #
4. MaxTeabag ◴[] No.46304759[source]
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 :)

replies(1): >>46310836 #
5. jbstack ◴[] No.46310836{3}[source]
Great. If you added those this would probably become my go-to SQL client.
replies(1): >>46335978 #
6. MaxTeabag ◴[] No.46335978{4}[source]
Hi,

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

Thank you for the suggestion.