16 ms·
Harlequin: SQL IDE for Your Terminal
- jcuenod 3y agoHarlequin has been on my "to investigate" list since it popped up on hn a few weeks/months ago. I still need to experiment with it a bit more, but I had been thinking of building a some tragic equivalent to this, and now I don't have to :)
- jadbox 3y agoThe HN hive mind is amusing as I came here to get to comment this exact post. It looks really interesting, and I'm also tired of giving up so much memory for just a SQL GUI tool.
- graemep 3y agoI have been looking for a nice SQL TUI and this looks like it. Will give it a try. Thank you.
- hans_castorp 3y agopspg is a pager intended to be used with SQL command line clients. It was originally created for Postgres (hence the name), but also works with MySQL and others https://github.com/okbob/pspg https://github.com/okbob/pspg
- patja 3y agoSuggestion: under "works with your database" consider naming the databases rather than only offering a list of icons. Also seems to be a bit of hubris to claim a SQL IDE "works with your database" when SQL Server and Oracle, two of the database products with the largest market share, are not supported (yet?)
- garciasn 3y agoAgreed. I found the current connectors in their docs here: https://harlequin.sh/docs/adapters https://harlequin.sh/docs/adapters I’m pretty pumped to try this seeing BigQuery is supported.
- boomskats 3y ago> SQL Server and Oracle, two of the database products with the largest market share Agree on the first point, but is 'market share' - a metric comparing commercial sales revenue which by definition excludes open source software, really that relevant when critiquing a tagline for a FOSS tool implicitly targeting FOSS databases at a time when FOSS dominates? If this wasn't an MIT licensed project without a single hint of a commercial offering I'd get it, but come on.
- chrsig 3y agoIt's relevant in that they're prolific databases, so there's a nontrivial chance that a user of one of them will: - stumble across the tool - read that it "works with their database" - hopefully read the actual list of supported databases - become disappointed to learn that it does not in fact work with their database In the case that hopes are not met, the user actually downloads the application and discovers the hard way that it does not work with their database. So market share does seem relevant to the frequency of disappointment though. Is it going to be a frequent enough occurrence to be worth spending any time doing anything about? I don't know.
- tconbeer 3y agoAuthor here. If that disappointment fuels a half day of dev time, anyone who knows Python can just create their own adapter.
- deleted 3y ago[deleted]
- pmarreck 3y ago> SQL Server and Oracle Alright so first off, for 90% of SQL Server's existence, Microsoft was openly open-source-hostile, so give me a fucking break with this. Microsoft used to be way worse than even Apple about keeping everything in their ecosystem- at least Apple is built on BSD underpinnings and was therefore also always compatible with POSIX stuff. Oracle... last I checked on that monstrosity it had about 20 different clients all written at different times for different use cases over the long course of Oracle's history. So, which of these 20 different clients should one write a TUI for?
- Koshkin 3y ago> give me a fucking break No we won't :) https://pypi.org/project/pyodbc/ https://pypi.org/project/pyodbc/
- tconbeer 3y agoFair enough (author here). I just launched support for any databases other than DuckDb and published a guide to create adapters for new dbs. I’m expecting the community to step up here, since I’d rather spend my time adding features to Harlequin. ODBC should be coming shortly. The hard part is honestly just having access to a DB server for testing.
- e12e 3y ago> The hard part is honestly just having access to a DB server for testing. Fwiw Microsoft SQL server is available as a Linux Docker build: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver16 https://learn.microsoft.com/en-us/sql/linux/quickstart-insta... Oracle is available as a container and vm: https://container-registry.oracle.com/ords/f?p=113:4:117302132754070:::4:P4_REPOSITORY,AI_REPOSITORY,AI_REPOSITORY_NAME,P4_REPOSITORY_NAME,P4_EULA_ID,P4_BUSINESS_AREA_ID:803,803,Oracle%20Database%20Express%20Edition,Oracle%20Database%20Express%20Edition,1,0&cs=3gHks_8F924aSHIhBvP0MCOEexZZjXTOG7Q6s6897m4_ZDQ8UxLpZyvl_SU0guSc2W9sroWsZw3opuAspyRbK2w https://container-registry.oracle.com/ords/f?p=113:4:1173021... https://github.com/oracle/vagrant-projects https://github.com/oracle/vagrant-projects
- tconbeer 3y agoharlequin-odbc was released today. https://harlequin.sh/docs/odbc/index https://harlequin.sh/docs/odbc/index
- jsjsjsjjbbx999 3y ago[dead]
- alberth 3y agoQuestion: do people love TUI, because they love being in a terminal? Or ... is this a movement against application bloat, which has become all to common these days? EDIT: why the downvotes?
- tconbeer 3y agoI originally wrote this because sometimes a CLI or TUI is just super convenient. I used to use the DuckDB and Sqlite CLIs a lot, but was frustrated by their limitations, especially for doing data analysis work (my background).
- sprash 3y agoIf you develop SQL you need to write code and view tables. A grid with monospace characters is perfectly suitable for that. But other than that, no, people don't love being in a terminal. It just happens that all open source portable toolkits like qt and gtk do not work via ssh and are in general total abominations for developers and users. The vt100 standard is 45 years old and turned out to be the lowest common denominator to write GUIs for better or worse.
- alberth 3y ago> "if you develop SQL you need to write code and view tables ... [other tools] do not work via ssh" Are you implying that people only write code inside of a terminal ssh session?
- greggyb 3y agoI believe their next sentence took away the need to try to infer anything, and in fact made their point quite clear: > A grid with monospace characters is perfectly suitable for that.
- chrsig 3y agoIt doesn't seem like it to me. ISTM that they're implying that most sql tools have a gui component which isn't friendly to running remotely over an ssh session. I've personally never seen a good experience of display forwarding over ssh. Of course, most people and tools get around this by tunneling a connection to the database over ssh and running the GUI locally.
- pmarreck 3y agoEvery time I notice something is a Python codebase I feel a letdown as it means it will likely break some other Python project from someone else I have on my dev machine which I may not have touched in a while but which I will find got silently broken when I most need it Especially if it's a nice TUI app like this looks EDIT: Guys, in my experience, virtual environments do not fix this problem in all cases. At least, not sufficiently for me (after getting used to Nix's guarantees, for example). Not to mention, there's multiple ways/attempts at creating and working with virtual environments: https://twitter.com/pmarreck/status/1735363908515295253 https://twitter.com/pmarreck/status/1735363908515295253). See below comment.
- nicoco 3y agoInstall using pipx to avoid that. (or virtualenvs directly if you don't mind getting your hands dirty)
- pmarreck 3y agosee my response to your sibling comment by whalesalad.
- sgarland 3y agoWhile I do like pipx, and am a diehard Python fan, if the interpreter used to install the project changes, I still have to reinstall the project, which is annoying. I suppose I could get around that by installing a Python interpreter outside of brew, and only use that for packages.
- isp 3y agoThis is the problem that 'venv' (virtual environments) was designed to solve. You can run pip in an isolated virtual environment, in user mode (not as root) - see https://gist.github.com/saurabhshri/46e4069164b87a708b39d947e4527298 https://gist.github.com/saurabhshri/46e4069164b87a708b39d947...
- pmarreck 3y agoSee my sibling response(s). Also this comment criticizing the solution in that link you gave me: https://gist.github.com/saurabhshri/46e4069164b87a708b39d947e4527298?permalink_comment_id=2268663#gistcomment-2268663 https://gist.github.com/saurabhshri/46e4069164b87a708b39d947...
- seanw444 3y agoThe horizontal scroll animation on the query results table is fascinating. Never seen animations like that in a TUI app.
- billowycoat 3y agohttps://textual.textualize.io/ https://textual.textualize.io/
- neverartful 3y agoThat's impressive! Anyone know if there are similar libraries available for other languages?
- SlackingOff123 3y agoI like this one for .NET https://github.com/spectreconsole/spectre.console https://github.com/spectreconsole/spectre.console which I found in this list https://github.com/shadawck/awesome-cli-frameworks https://github.com/shadawck/awesome-cli-frameworks.
- seanw444 3y agohttps://github.com/charmbracelet/bubbletea https://github.com/charmbracelet/bubbletea is a nice TUI framework for Go.
- ChrisArchitect 3y agohttps://harlequin.sh/ https://harlequin.sh/ There was a Show HN: from the author and this thread and discussion last year: https://news.ycombinator.com/item?id=37588526 https://news.ycombinator.com/item?id=37588526
- dang 3y agoThanks! Macroexpanded: Harlequin: DuckDB IDE for the terminal - https://news.ycombinator.com/item?id=37588526 https://news.ycombinator.com/item?id=37588526 - Sept 2023 (58 comments)
- jasonjmcghee 3y agoThis is a beautiful homepage.
- tconbeer 3y agoAuthor here. Thanks for more love for Harlequin. I’ll be checking back and responding to feedback and questions for the next few hours.
- alberth 3y agoLooks super impression. Congrats. A few questions ... a. what caused you to start working this? b. any particular reason why you chose to implement it the way you did (e.g. I see you use Python + Textual as opposed to something like https://charm.sh/libs/ https://charm.sh/libs/) c. any major functionality you feel it's missing? d. any limitations (e.g. doesn't work with Oracle?) e. any reason why someone should not use it? Thanks in advance.
- tconbeer 3y agoA. I was using the DuckDB CLI and kept hitting walls on analyses. Had a shower thought of “I wonder if anyone has used Textual for a DuckDB client” and decided to build one myself. B. This uses Textual, a python framework for TUIs. Python is my language of choice. C. Hoping for more db adapters soon. Canceling queries is a missing piece I have yet to figure out E. Maybe if you don’t use Python apps and do have another sql client you really like.
- Fuzzwah 3y agoIs there a way to order the list of tables in the left hand pane?
- diazc 3y agoThere are also other interesting collections of TUI terminal tools like harlequin here as well: https://terminaltrove.com/ https://terminaltrove.com/ harlequin is also featured there as a tool of the week on that site.
- tconbeer 3y agoWow, I had no idea. Thanks!
- ComputerGuru 3y agoHuh, just found this db tui as well via that site: https://terminaltrove.com/gobang/ https://terminaltrove.com/gobang/
- hodgesrm 3y agoI would like to put in a vote for k9s, which is also on the list at Terminal Trove. [0] It's the most convenient tool I've ever found for Kubernetes management. Based on that experience I'll definitely be checking out Harlequin. [0] https://k9scli.io/ https://k9scli.io/
- xwowsersx 3y agoLooks great. Is it just DuckDB and SQLite for now? No Postgres?
- zozbot234 3y agoLooks nice already, but a true "SQL IDE" should also strive for feature parity with existing database frontends like LibreOffice Base, or with old-style MS-DOS/TUI applications for database access which had a similar featureset. Meaning an integrated view of database design, data entry/inspection (with full-screen, form-like views for individual records where appropriate!), custom querying (including a more-or-less seamless integration of QBE and raw SQL) and report generation. Hopefully we're going to see some of this in future releases!
- ComputerGuru 3y agoI did not get a chance to give this a whirl yet but I am excited to do so. I mainly used pgcli but it’s pretty buggy and certainly doesn’t approach IDE status.
- burgerrito 3y agoWow, this is really good. I can't believe how good terminal app is now.