add
Install components from the registry. Source files copied directly into your project — no runtime dependency.
Usage
npx @gentleduck/cli add [components...]
npx @gentleduck/cli add [components...]
Components are copied as source files into your project. You own the code afterward — patch, restyle, extend without forking.
Options
| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompts |
-f, --force | Overwrite existing files |
-c, --cwd <cwd> | Working directory |
-w, --workspace <path> | Target workspace |
-a, --all | Install all components |
Examples
# Add specific components
npx @gentleduck/cli add button dialog calendar
# Add all components
npx @gentleduck/cli add --all
# Add to a specific workspace
npx @gentleduck/cli add sidebar --workspace apps/dashboard
# Force overwrite of an existing copy
npx @gentleduck/cli add button --force# Add specific components
npx @gentleduck/cli add button dialog calendar
# Add all components
npx @gentleduck/cli add --all
# Add to a specific workspace
npx @gentleduck/cli add sidebar --workspace apps/dashboard
# Force overwrite of an existing copy
npx @gentleduck/cli add button --forceHow it works
- Resolves the component from the configured registry (
https://gentleduck.org/rby default; override withCOMPONENTS_REGISTRY_URL). - Walks dependency graph — installs registry-level dependencies (e.g.
dialogpulls inbutton). - Installs npm dependencies — runs
bun add/npm installfor any external packages declared by the component. - Writes files to the configured aliases (
@/components,@/hooks,@/lib).
If a target file already exists, the CLI asks before overwriting unless --force or --yes is set.