Quickstart
Run DSUI with npx, connect an in-memory DuckDB service, and run your first query.
On this page
In this tutorial, you start DSUI on your machine, load the DuckDB adapter, and run a SQL query in the workspace. You need Node.js 18 or later and network access to GitHub, because DSUI builds the adapter from source the first time it starts.
Create a project directory#
bashmkdir dsui-quickstart cd dsui-quickstartAdd a configuration file#
Create
dsui.yamlin the directory:yamladapters: duckdb: source: git repository: "git+https://github.com/northgraindata/dsui" path: packages/adapter-duckdb services: - id: local-duckdb adapter: duckdb name: Local DuckDB connection: method: memoryThe
adaptersblock tells DSUI where to get the adapter. The key,duckdb, must match the ID the adapter declares. Theservicesblock creates one service that uses it, with an in-memory DuckDB database.Start DSUI#
bashnpx @northgraindata/dsuiDSUI reads
dsui.yamlfrom the current directory. The first start takes longer because DSUI downloads and builds the adapter. When the server is ready, the terminal printsreadyand the addresshttp://localhost:4192.Run a query#
Open
http://localhost:4192in your browser, select Local DuckDB, and open Query. Run this statement:sqlselect 42 as answer;The result is one row with the value
42.

Stop DSUI with Ctrl+C. An in-memory database is created again on every connection, so it doesn’t keep data between runs. DSUI keeps its own state, such as saved connections, in ~/.local/share/dsui. Set DSUI_DATA_DIR to store it somewhere else.
Docker alternative#
Use Docker when you want an isolated, repeatable deployment or already run the rest of your stack in Compose. The Docker tutorial walks through the same setup with a file-backed database.