/
1.1k
Sponsor

Registry

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

The termcn registry ships Ink and OpenTUI components, hooks, providers, 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.

Registry files follow these destinations:

  • Components install into components/ui/.
  • Hooks install into the configured hooks/ directory.
  • Theme, motion, and Unicode providers install into providers/.
  • Themes install into lib/terminal-themes/.

Components declare their hook dependencies, so installing a component does not install or require a provider.

Ink

Install a component:

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

Install a theme:

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

Install the theme provider:

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

Install the motion provider:

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

Install the unicode provider:

$ pnpm dlx shadcn@latest add @termcn/ink/unicode-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

OpenTUI

Install a component:

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

Install a theme:

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

Install the theme provider:

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

Install the motion provider:

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

Install the unicode provider:

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

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

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