# Quickstart

> Run DSUI with npx, connect an in-memory DuckDB service, and run your first query.

<Callout type="warning" title="Developer preview">
Expect breaking changes between releases.
</Callout>

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.

<Steps>
<Step>

### Create a project directory

```bash
mkdir dsui-quickstart
cd dsui-quickstart
```

</Step>
<Step>

### Add a configuration file

Create `dsui.yaml` in the directory:

```yaml {2,9}
adapters:
  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: memory
```

The `adapters` block tells DSUI where to get the adapter. The key, `duckdb`, must match the ID the adapter declares. The `services` block creates one service that uses it, with an in-memory DuckDB database.

</Step>
<Step>

### Start DSUI

```bash
npx @northgraindata/dsui
```

DSUI reads `dsui.yaml` from the current directory. The first start takes longer because DSUI downloads and builds the adapter. When the server is ready, the terminal prints `ready` and the address `http://localhost:4192`.

</Step>
<Step>

### Run a query

Open `http://localhost:4192` in your browser, select **Local DuckDB**, and open **Query**. Run this statement:

```sql
select 42 as answer;
```

The result is one row with the value `42`.

</Step>
</Steps>

![The DSUI workspace with a connected service](/docs/assets/dsui-workspace-overview.png)

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](/docs/getting-started/docker) walks through the same setup with a file-backed database.

## Next steps

<Cards>
<Card title="Learn how DSUI works" href="/docs/getting-started/concepts">
Services, adapters, plugins, and where your credentials stay.
</Card>
<Card title="Connect your own services" href="/docs/reference/configuration">
Every `dsui.yaml` option, with examples.
</Card>
<Card title="Browse integrations" href="/docs/integrations">
Airflow, ClickHouse, dbt, DuckDB, PostgreSQL, and S3.
</Card>
</Cards>
