Live data from Hacker News

Harlequin: DuckDB IDE for the terminal

harlequin.sh

51–60 of 61 posts

Re: Harlequin: DuckDB IDE for the terminal

#52

Hi everyone! I made this. Tried posting it to Show yesterday, glad this thread is getting more momentum! For the past four months I've been working (part-time, this is OSS after all) on Harlequin, a SQL IDE for DuckDB that runs in your terminal. I built this because I work in Data, and I found myself often reaching for the DuckDB CLI to quickly query CSV or Parquet data, but then hitting a wall when using the DuckDB…

This looks very cool! how is autocomplete feature implemented?

Re: Harlequin: DuckDB IDE for the terminal

#53

Kinda off topic but how do I install these pip sourced command line applications such that they are available regardless of which virtual environment I am using?

As mentioned in Getting Started, with `pipx`:

`pipx install harlequin`

From the pipx documentation:

> This automatically creates a virtual environment, installs the package, and adds the package's associated applications (entry points) to a location on your PATH.

It makes the command available globally, but sandboxes the package in its own virtual environment.

https://github.com/pypa/pipx

Re: Harlequin: DuckDB IDE for the terminal

#54

I love this and will definitely try it out! Although I admit I'm a little puzzled when people simultaneously want to do a TUI but also design things so there is generous (excessive, actually) whitespace around everything to create the illusion of "minimalism" or "comfort". It's a TUI! It should be buzzing with numbers, packed with information, sparing with space and using every pixel possible. btop[1] is a great exam…

> It should be buzzing with numbers, packed with information, sparing with space and using every pixel possible.

No. It should be useful, and if it’s not “buzzing with numbers” and causing me a seizure, well, thank fucking God.

If you want something like that, go write it yourself. I, for one, find the folks writing quiet terminal interfaces to be a massive relief and a tremendous respite from the madness of our seemingly increasingly incoherent, incompetent, and distracting world.

Re: Harlequin: DuckDB IDE for the terminal

#55

Hi everyone! I made this. Tried posting it to Show yesterday, glad this thread is getting more momentum! For the past four months I've been working (part-time, this is OSS after all) on Harlequin, a SQL IDE for DuckDB that runs in your terminal. I built this because I work in Data, and I found myself often reaching for the DuckDB CLI to quickly query CSV or Parquet data, but then hitting a wall when using the DuckDB…

This looks very cool! how is autocomplete feature implemented?

Right now there is no autocomplete inside the text editor, but that will be added soon. DuckDB itself provides an extension that adds a table function that can be queried for completions like so:

select * from sql_auto_complete( 'select ra' )

Re: Harlequin: DuckDB IDE for the terminal

#56

I love this and will definitely try it out! Although I admit I'm a little puzzled when people simultaneously want to do a TUI but also design things so there is generous (excessive, actually) whitespace around everything to create the illusion of "minimalism" or "comfort". It's a TUI! It should be buzzing with numbers, packed with information, sparing with space and using every pixel possible. btop[1] is a great exam…

Thanks for the feedback; gotten some of the same here.

I've tried to be really thoughtful about using space and getting value out of every pixel. There are some features in Harlequin that make it nice on small screens, even with the padding:

1. Scrolling is supported in every widget 2. You can show or hide the left side bar with ctrl+b or F9 3. You can enter "full screen mode" in the query editor or results viewer with F10

Beyond the main screen, the interface could be more compact. Especially the export and help modals. I'm considering tweaks to the design.

Re: Harlequin: DuckDB IDE for the terminal

#57

I don't mean to minimize the effort and contribution of this project in any way, and I understand the author is scratching their own itch, but I'm curious why this is specific to DuckDB? From skimming the homepage, it has generic querying capabilities. Isn't there a generic DB driver that can be swapped out and the TUI used on top of another DBMS?

DuckDB provides some really nice python APIs that other databases don't have, so it was a very easy way for me to get started. I'm considering/planning extending to other DBs using plugins. More info here: https://github.com/tconbeer/harlequin/issues/230

Re: Harlequin: DuckDB IDE for the terminal

#60
post #39

Love the SVG's for showing of themes. How are those generated?

Textual provides a utility for screenshotting apps. I loop over a list of themes and take the screenshots. You can see the code for that here: https://github.com/tconbeer/harlequin/blob/e666319b7a964f026...
Post reply on HN