Skip to content

Docs

CLI

DavinciUI has no installer of its own — it uses the shadcn CLI. Three commands cover the whole workflow: init sets up your project, add installs components, and view / search let you inspect the registry first.

init#

Initializes config and dependencies in the current project. Run once per project:

pnpm dlx shadcn@latest init

What changes: writes components.json at the project root, adds the cn() utility, and wires the CSS variables setup. Then add the @davinciui registry block as described in Installation.

add#

Copies a registry component into your project:

pnpm dlx shadcn@latest add @davinciui/text-morph

What changes: the component file lands under your aliases.ui directory (default @/components/ui), and its npm dependencies are installed. Re-running with --overwrite replaces local files with the current registry version:

pnpm dlx shadcn@latest add @davinciui/scroll-media-expand --overwrite

Package-manager equivalents#

The same commands through npm, yarn, or bun:

# init
npx shadcn@latest init
yarn dlx shadcn@latest init
bunx --bun shadcn@latest init

# add
npx shadcn@latest add @davinciui/text-morph
yarn dlx shadcn@latest add @davinciui/text-morph
bunx --bun shadcn@latest add @davinciui/text-morph

Common command workflows#

  • First install: init → add the registry block → add @davinciui/… → render and verify (full path in Installation).
  • Evaluate before committing: search for candidates → view the shortlist → add the winner.
  • Pick up registry updates: re-run add with --overwrite. Installed files never update on their own.

Options#

-o, --overwriteOverwrite existing files
-y, --yesSkip confirmation
-p, --pathCustom install path

Failure recovery and troubleshooting#

  • Unknown registry or 404: the @davinciui entry in components.json is missing or wrong — compare with Configuration.
  • Files land in the wrong folder: aliases in components.json disagree with tsconfig.json paths. Fix both, or pass -p for a one-off override.
  • Half-installed component: delete the partially written files and re-run add — installs are file copies, so retrying is safe.
  • Local edits lost after --overwrite: expected — overwrite replaces files. Commit before updating, then re-apply customizations.

Full CLI reference: ui.shadcn.com/docs/cli. For the distribution model behind these commands, see Registry and to browse what to install, Components.