Skip to main content

reading files in style with duckdb and harlequin

Earlier, I wrote a small utility to read files with duckdb ⁠[1] (Here is a shard for that) and I’m finding amazing mileage for this small utility. I recently found Harlequin ⁠[2] (Harlequin is “An easy, fast, and beautiful database client for the terminal.”. Github repository.) which natively works with duckdb on the terminal. Its even better than the CLI in some cases because it does SQL IDE stuff but in the terminal.

So, I extended earlier utility function ⁠[3] (Added a commit 48c9b44 to add an --ui [cli, harlequin] flag and added 2 more commands to justfile) to add a harlequin edit mode.

Now, when I do just npq DATASET I get the default duckdb CLI

duckdb cli

and when I do just hqp DATASET I get Harlequin TUI

harlequin tui

EOF


footnotes

  1. Here is a shard for that [return]

  2. Harlequin is “An easy, fast, and beautiful database client for the terminal.”. Github repository. [return]

  3. Added a commit 48c9b44 to add an --ui [cli, harlequin] flag and added 2 more commands to justfile [return]