SelfSync

Explore your database with Harlequin

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.

Runs on
macOS, Windows, Linux (needs Python)
Price
Free, open source
Website
harlequin.sh

Get started

  1. Install Harlequin

    Install it as a standalone tool with uv or pipx.

    uv tool install harlequin
    
    # or
    pipx install harlequin
  2. Open the database

    -r opens the database in read-only mode.

    harlequin -r selfsync-db.duckdb
  3. Run a first query

    The 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;

Good to know

  • Press F1 to see every keyboard shortcut.
  • Queries can be saved to and opened from .sql files, handy to keep your favourite analyses.

Other tools

Wondering what a table or a column holds? Browse the FIT file reference.