←back to thread

190 points MaxTeabag | 4 comments | | HN request time: 0s | source

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. lgas ◴[] No.46296692[source]
I was surprised to find that I could not run it with uvx:

    % uvx sqlit
       Built unicodecsv==0.14.1
       Built sqlit==0.1.6
    Installed 2 packages in 1ms
    Traceback (most recent call last):
      File "/Users/john/.cache/uv/archive-v0/AP7XgAQ1v0HpPxXUi-hs4/bin/sqlit", line 7, in <module>
        from sqlit.main import main
      File "/Users/john/.cache/uv/archive-v0/AP7XgAQ1v0HpPxXUi-hs4/lib/python3.12/site-packages/sqlit/main.py", line 125
        print sql
        ^^^^^^^^^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
replies(1): >>46297209 #
2. hiichbindermax ◴[] No.46297209[source]
That's not the same package. You should try sqlit-tui
replies(1): >>46299277 #
3. mrbump ◴[] No.46299277[source]
Yes, for uvx you need to do "uvx --from sqlit-tui sqlit"
replies(1): >>46299639 #
4. lgas ◴[] No.46299639{3}[source]
Ah, thanks. This worked great. I was fooled by the package name.