# Registry

Learn how to use the termcn registry with the shadcn CLI.

The **termcn** registry ships Ink-based terminal UI components and themes in the [shadcn registry format](https://ui.shadcn.com/docs/registry). Register the namespace once in `components.json`, then pull items by name with the CLI.

## Setup

Add a **registries** entry for this site. See the [shadcn registry documentation](https://ui.shadcn.com/docs/registry) for all `components.json` fields and behaviors.

```json
{
  "registries": {
    "@termcn": "https://termcn.dev/r/{name}.json"
  }
}
```

You can replace `@termcn` with another namespace; it only needs to match what you pass to `shadcn add`.

## Usage

Install a UI component using the namespace and the item `name` (same as the JSON file under `/r/` without `.json`):

```bash
npx dlx shadcn@latest add @termcn/spinner
```

```bash
npx dlx shadcn@latest add @termcn/data-grid
```

Install a theme (files are named `theme-<id>.json`):

```bash
npx dlx shadcn@latest add @termcn/theme-dracula
```

Without a registry alias, use the full URL (as on each docs page):

```bash
npx dlx shadcn@latest add https://termcn.dev/r/badge.json
```