642
Sponsor

Registry

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

The termcn registry ships Ink and OpenTUI terminal UI components and themes in the shadcn registry format. 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 for all components.json fields and behaviors.

{
  "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

Items are namespaced by base: ink/ for Ink and opentui/ for OpenTUI.

Install an Ink component:

$ pnpm dlx shadcn@latest add @termcn/ink/spinner

Install an OpenTUI component:

$ pnpm dlx shadcn@latest add @termcn/opentui/spinner

Install a theme for the matching base:

$ pnpm dlx shadcn@latest add @termcn/ink/theme-dracula
$ pnpm dlx shadcn@latest add @termcn/opentui/theme-dracula

Install the theme provider for each base:

$ pnpm dlx shadcn@latest add @termcn/ink/theme-provider
$ pnpm dlx shadcn@latest add @termcn/opentui/theme-provider

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

$ pnpm dlx shadcn@latest add https://termcn.dev/r/ink/spinner.json
$ pnpm dlx shadcn@latest add https://termcn.dev/r/opentui/spinner.json