> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Check and update components

These [CLI](/dolan/cli/index.md) commands compare your copies with the source bundled in `@blotch/dolan`, and merge its changes in. See [Where updates come from](/dolan/cli/index.md#where-updates-come-from).

## list

Shows each installed component with its status and file count.

```bash
npx @blotch/dolan list
```

| Argument or option | Description                                                                                                                                           |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--json`           | Print `{ "components": [{ "name", "status", "fileCount" }] }` instead. A component lists files the bundled source no longer has as `removedUpstream`. |

Alias: `ls`. Only folders named after a known component count, so your own folders are ignored.

| Status     | JSON value      | Meaning                                                                     |
| ---------- | --------------- | --------------------------------------------------------------------------- |
| up to date | `up-to-date`    | Your copy matches the bundled source.                                       |
| outdated   | `auto-update`   | You haven't edited it. The bundled source changed, added or dropped a file. |
| modified   | `user-modified` | You edited it, and the bundled source hasn't changed.                       |
| conflict   | `conflict`      | Both changed. See below for two more cases.                                 |

A component is also a **conflict** when:

- you edited a file the bundled source no longer has, or
- dolan has no hash for a file that differs.

**A file the bundled source no longer has counts as a change.** It's still in your app until [`update`](#update) deletes it. `list` names it under its component:

```text
│    ↑ card  outdated  (3 files)
│
│      − card/card-render.test.ts — upstream no longer ships it → delete
```

## diff

Prints how your copy of a component differs from the bundled source.

```bash
npx @blotch/dolan diff [component]
```

| Argument or option | Description                         |
| ------------------ | ----------------------------------- |
| `[component]`      | Show this installed component only. |

- **With a name**, it prints every file that differs from the bundled source.
  - Lines starting with `-` are yours, and lines starting with `+` are upstream.
  - A file the bundled source no longer has shows every line with `-`, since [`update`](#update) deletes it.
- **Without a name**, it lists the changed components and asks which to show. Without a terminal, it shows them all.

## outdated

Lists the installed components that aren't up to date. It exits 1 if there are any, so a CI job can fail on it.

```bash
npx @blotch/dolan outdated
```

| Argument or option | Description                                                                            |
| ------------------ | -------------------------------------------------------------------------------------- |
| `--json`           | Print `{ "components": [...] }` as [`list`](#list) does, still exiting 1 if not empty. |

- **It uses the [statuses](#list) above.**
- **Components you edited count as well.**
- **So do components with a file the bundled source no longer has.** It names the file as [`list`](#list) does.

## update

Merges the bundled source into every installed component, file by file.

```bash
npx @blotch/dolan update
```

| Argument or option | Description                                                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `-f, --force`      | Overwrite every file with upstream, discarding your changes. Wins over `--selective`.                                    |
| `-s, --selective`  | Review every changed file one at a time, including your own edits. "Skip for now" asks again next run. Needs a terminal. |

| Your file | Bundled source       | What `update` does                                                                         |
| --------- | -------------------- | ------------------------------------------------------------------------------------------ |
| Unchanged | Changed, or new file | Asks once whether to apply all of these (default Yes), then overwrites.                    |
| Unchanged | No longer has it     | Deletes it, with the changes above.                                                        |
| Edited    | Unchanged            | Keeps yours.                                                                               |
| Edited    | Changed              | Conflict. Asks per file: show the diff, keep yours, take upstream, or review hunk by hunk. |
| Edited    | No longer has it     | Conflict. Asks: show the diff, keep yours, or delete it.                                   |

### Conflicts

- **No hash means conflict.** A file with no recorded hash that differs from upstream is a conflict.
  - Theme files are the exception. `init` in 22.2.3 and earlier didn't record their hashes.
  - So a theme file that's still exactly as one of those releases shipped it counts as unchanged.
- **You're asked about a conflict once.** After you choose, the lockfile records the new upstream hash. If you kept your version, the file shows as modified until upstream changes again.
- **Without a terminal, conflicts wait for you.** `update` applies the auto-updates and exits with code 1.
  - It leaves each conflict's file and lockfile hash as they were, so the next `update` in a terminal asks about them.
  - Keeping your version instead would record the upstream hash, and you'd never be offered that change again.
  - `--force` takes upstream's version of every conflict.

### What else it does

- **Files the bundled source no longer has are deleted**, along with their lockfile entries. For example, 22.2.3 stopped copying the `*-render.test.ts` files.
  - If you keep one you edited, it's yours: dolan stops tracking it.
  - Until then, `list`, `diff` and `outdated` report the component as changed.
- **Ejected components are left alone.** `update`, `list`, `diff` and `outdated` only look at the components in `dolan.lock.json`. See [`eject`](/dolan/cli/components.md#eject).
- **New dependencies are added.** If a component's new version needs another component, `update` copies it in.
- **npm packages are installed** the same way [`add`](/dolan/cli/components.md#add) does.

### Theme files

- **They're merged the same way.** That's `default.css`, `dark.css`, and `tailwind.css` or `tailwind-plugin.ts`, with `tailwind-plugin.test.ts` when you have the testing library.
- **Themes you made with [`theme`](/dolan/cli/index.md#theme) aren't merged.**
- **The theme follows a move between Tailwind versions.** After a [move to Tailwind 4](/guide/tailwindcss.md#move-to-tailwind-4), `update` copies `tailwind.css`. It deletes `tailwind-plugin.ts` and its test by the rules above:
  - Unchanged, they go with the other changes.
  - Edited, it asks.
  - A move back to Tailwind 3 swaps them the other way.

```text
│  Shared files:
│
│    ✓ theme/default.css — up to date
│
│    ✓ theme/dark.css — up to date
│
│    + theme/tailwind.css — new file from upstream
│
│    − theme/tailwind-plugin.ts — the app uses Tailwind 4 → delete
│
│    − theme/tailwind-plugin.test.ts — the app uses Tailwind 4 → delete
```

**A plugin from an older `init` counts as unchanged** while it's exactly as that release shipped it. That's an `init` from 22.2.3 or earlier. If you edited one of those, `update` can't tell it was dolan's and leaves it, and [`doctor`](/dolan/cli/index.md#doctor) warns about it.

## Related

- [CLI](/dolan/cli/index.md): `init`, `theme`, `doctor`, and how dolan works without a terminal
- [Add and remove components](/dolan/cli/components.md): `add`, `info`, `remove` and `eject`
- [UI Components](/dolan/index.md): install dolan and add your first component
- [Theming](/dolan/theming.md): the theme files `init` copies
- [Tailwind CSS](/guide/tailwindcss.md): required by every component
