Skip to main content
The search command (also available as list) searches for items across one or more registries. Use it to discover available components, themes, and other registry items.

Usage

Arguments

string[]
required
The registry names or URLs to search. Registry names must be prefixed with @.

Options

string
The working directory. Defaults to the current directory.
string
Query string to filter results.
number
default:"100"
Maximum number of items to display per registry.
number
default:"0"
Number of items to skip.

Examples

Search the default shadcn registry

Search with a query

Output:

Search multiple registries

Limit results

Paginate results

Search by URL

What it does

  1. Reads your components.json (if it exists) or uses default configuration
  2. Resolves registry URLs
  3. Fetches the registry index
  4. Filters results by query (if provided)
  5. Applies limit and offset
  6. Outputs results as JSON

Output structure

Each search result includes:
  • name - Item name
  • type - Registry type
  • description - Item description (if available)
  • registry - Registry identifier
  • meta - Additional metadata (if available)

Registry types

Search results can include:
  • registry:ui - UI components
  • registry:block - UI blocks and sections
  • registry:hook - React hooks
  • registry:lib - Library utilities
  • registry:theme - Themes
  • registry:style - Style systems
  • registry:base - Base configurations
  • registry:example - Example implementations

Working with custom registries

To search a custom registry, add it to your components.json:
Then search it:
Or search directly by URL without configuration:

Use cases

Browse available components

Count available items

Filter by type

Get component descriptions

Working with output

The JSON output can be processed with jq:

Notes

  • Registry names must be prefixed with @
  • Supports partial components.json files
  • Works without a components.json file (uses defaults)
  • Automatically configures registries if needed
  • Search queries are case-insensitive
  • Results are always returned as JSON