> ## Documentation Index
> Fetch the complete documentation index at: https://cli.soralabs.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# diff

> Compare locally installed components against upstream registry versions

Because components are copied directly into your codebase rather than installed as an immutable npm package, they can diverge as the upstream registry releases updates or fixes.

The `diff` command checks your local component files against the current version in the registry and displays line-by-line diffs.

## Usage

```bash theme={null}
npx @soralabs/cli diff <components...> [options]
```

## Examples

```bash theme={null}
# Compare a single component
npx @soralabs/cli diff text-effect

# Compare multiple components
npx @soralabs/cli diff text-effect draw-underline-link

# Compare within a monorepo workspace
npx @soralabs/cli diff card --cwd packages/ui
```

## Options

### `--cwd, -c <path>`

Specifies the workspace directory to locate installed components.

### `--registry <name|url>`

Specifies the registry URL or key to compare against (defaults to `ui`).

> [!TIP]
>
> If `diff` detects updates that you wish to accept, re-run `add` with `--force`:
>
> ```bash theme={null}
> npx @soralabs/cli add text-effect --force
> ```


## Related topics

- [Custom Registries](https://cli.soralabs.studio/guides/registries.md)
- [Introduction](https://cli.soralabs.studio/index.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.