Skip to main content

list

List available components from the registry. Filter by type, JSON output for scripts.

Usage


npx @gentleduck/cli list

npx @gentleduck/cli list

Prints every component the registry exposes with its type and short description.


Options

FlagDescription
-t, --type <type>Filter by type — ui, hook, lib, block, example, internal, page
-j, --jsonOutput as JSON for scripting

Examples

# List everything
npx @gentleduck/cli list
 
# Only UI components
npx @gentleduck/cli list --type ui
 
# Only blocks (composed page sections)
npx @gentleduck/cli list --type block
 
# Machine-readable output
npx @gentleduck/cli list --json
# List everything
npx @gentleduck/cli list
 
# Only UI components
npx @gentleduck/cli list --type ui
 
# Only blocks (composed page sections)
npx @gentleduck/cli list --type block
 
# Machine-readable output
npx @gentleduck/cli list --json

Output format

Human (default)

Available components (62):

  button [ui] - Button component with size and variant props
  dialog [ui] - Modal dialog with overlay and focus trap
  use-debounce [hook] - Debounce a value over time
  ...

JSON (--json)

[
  {
    "name": "button",
    "type": "registry:ui",
    "description": "Button component with size and variant props",
    "dependencies": ["@gentleduck/variants", "@gentleduck/libs"],
    "registryDependencies": []
  },
  ...
]
[
  {
    "name": "button",
    "type": "registry:ui",
    "description": "Button component with size and variant props",
    "dependencies": ["@gentleduck/variants", "@gentleduck/libs"],
    "registryDependencies": []
  },
  ...
]

Pair with add

# Pick from filtered list
npx @gentleduck/cli list --type ui
 
# Install matched ones
npx @gentleduck/cli add button dialog
# Pick from filtered list
npx @gentleduck/cli list --type ui
 
# Install matched ones
npx @gentleduck/cli add button dialog