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
The registry names or URLs to search. Registry names must be prefixed with
@.Options
The working directory. Defaults to the current directory.
Query string to filter results.
Maximum number of items to display per registry.
Number of items to skip.
Examples
Search the default shadcn registry
Search with a query
Search multiple registries
Limit results
Paginate results
Search by URL
What it does
- Reads your
components.json(if it exists) or uses default configuration - Resolves registry URLs
- Fetches the registry index
- Filters results by query (if provided)
- Applies limit and offset
- Outputs results as JSON
Output structure
Each search result includes:name- Item nametype- Registry typedescription- Item description (if available)registry- Registry identifiermeta- Additional metadata (if available)
Registry types
Search results can include:registry:ui- UI componentsregistry:block- UI blocks and sectionsregistry:hook- React hooksregistry:lib- Library utilitiesregistry:theme- Themesregistry:style- Style systemsregistry:base- Base configurationsregistry:example- Example implementations
Working with custom registries
To search a custom registry, add it to yourcomponents.json:
Use cases
Browse available components
Find form-related components
Count available items
Filter by type
Get component descriptions
Working with output
The JSON output can be processed withjq:
Notes
- Registry names must be prefixed with
@ - Supports partial
components.jsonfiles - Works without a
components.jsonfile (uses defaults) - Automatically configures registries if needed
- Search queries are case-insensitive
- Results are always returned as JSON