# Install and verify

## Before you start

- `node`: `>=20`.

Use a project with a `package.json`. Check the runtime and package manager:

```bash
node --version
npm --version
```

## Install the documented version

```bash
npm install @qentrah/dui@0.1.2
```

## Confirm the installation

```bash
npm ls @qentrah/dui
```

The output should show `@qentrah/dui@0.1.2`. Commit the lockfile so another developer installs the same dependency tree.

## Install

Initialize shadcn in an existing React project:

```bash
npx @qentrah/dui init
```

Add a DUI component using the npm shortcut:

```bash
npx @qentrah/dui add button
```

You can also use the shadcn CLI directly:

```bash
npx shadcn@latest add qentrah/DUI/button
```

You can install multiple items:

```bash
npx @qentrah/dui add button input card
```

Preview an installation without writing files:

```bash
npx @qentrah/dui add button --dry-run
```

Pin a release or commit for reproducible installations:

```bash
npx shadcn@latest add qentrah/DUI/button#5ea373366b411d52d0a5481b170e405c5bc5d3f7
```

## Expected result

The selected component source appears in the directory configured by `components.json`. Review the changes before committing them. The CLI passes shadcn options through; use `--dry-run` to preview the target files.