SelfSync

Explore your database with DuckDB UI

The DuckDB UI is a notebook that runs in your browser, served by DuckDB itself. A catalog on the left lists every table with column-level statistics, and each notebook cell runs a SQL query with autocomplete.

It is built by MotherDuck together with DuckDB Labs and runs your queries locally: nothing leaves your computer unless you explicitly sign in to MotherDuck.

Runs on
macOS, Windows, Linux (in your browser)
Price
Free
Website
duckdb.org

Get started

  1. Install the DuckDB CLI

    The UI ships as an extension of the DuckDB CLI, version 1.2.1 or later.

    # macOS
    brew install duckdb
    
    # Windows
    winget install DuckDB.cli
    
    # Linux
    curl https://install.duckdb.org | sh
  2. Start the UI

    From the folder holding your database. DuckDB installs the ui extension if needed and opens the notebook in your browser, at http://localhost:4213.

    duckdb -ui selfsync-db.duckdb
  3. Browse the tables

    Click a table in the left panel to see its columns, their types and how their values are distributed. Start with z_fit_session_mesgs: one row per activity.

  4. Run a first query

    Type your query in a cell and run it with Cmd + Enter (Ctrl + Enter on Windows and Linux).

    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

  • The UI stops as soon as you close the terminal that started it.
  • It cannot open a database in read-only mode. Work on a copy of selfsync-db.duckdb if you want to keep the original untouched.

Other tools

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