Harlequin is a SQL IDE that runs in your terminal, built for DuckDB. It brings what the plain CLI lacks: a data catalog listing tables and columns, a full-featured query editor and a scrollable results grid.
Install it as a standalone tool with uv or pipx.
uv tool install harlequin
# or
pipx install harlequin-r opens the database in read-only mode.
harlequin -r selfsync-db.duckdbThe catalog on the left lists the tables and their columns. Write the query in the editor and run it with Ctrl + Enter: up to 50,000 rows load in the results pane.
SELECT z_sport AS sport,
count(*) AS sessions,
round(sum(z_total_distance) / 1000, 1) AS km
FROM z_fit_session_mesgs
GROUP BY ALL
ORDER BY km DESC;.sql files, handy to keep your favourite analyses.Wondering what a table or a column holds? Browse the FIT file reference.