Skip to main content
The registry command helps you manage custom registries and add registry items to your registry.

Usage

npx shadcn@latest registry <command> [options]

Subcommands

add

Add an item to your registry:
npx shadcn@latest registry add <name>

Options

name
string
required
The name of the registry item to add
-c, --cwd
string
The working directory. Defaults to the current directory.

Examples

Add item to registry

npx shadcn@latest registry add button
Adds the button component to your custom registry.

Add multiple items

npx shadcn@latest registry add button card dialog

What it does

When you run registry add:
  1. Validates item - Checks that the component exists in your project
  2. Generates schema - Creates registry item JSON with metadata
  3. Updates registry - Adds the item to your registry.json
  4. Includes dependencies - Automatically tracks component dependencies

Use cases

The registry command is useful when you’re:
  • Building a custom registry - Creating your own component library
  • Sharing components - Distributing components to other projects
  • Managing internal libraries - Maintaining company-wide design systems

Learn more

Build docs developers (and LLMs) love