The CLI is available as a package in the Fragment UI monorepo.
The Fragment UI CLI (fragmentui, alias ds) helps you install and manage Fragment UI
components and blocks in your project. It installs files from the registry into your repo
(code-first distribution, similar to shadcn).
components/ui, components/blocks, components.json)npx fragmentui@latest --helpnpm install -g fragmentui
# or: pnpm add -g fragmentui
fragmentui --help
# alias:
ds --help# Build the CLI
pnpm --filter fragmentui build
# Use directly
node packages/cli/dist/index.js <command>The primary entrypoint is fragmentui, and ds is an alias.
Install a component (or block) from the registry into your project.
Registry URL pattern: https://fragmentui.com/r/[name].json
npx fragmentui@latest add button
npx fragmentui@latest add dashboard-layout
# Overwrite existing files
npx fragmentui@latest add button --overwrite
# Target a specific project directory
npx fragmentui@latest add button ./my-appList all available components.
npx fragmentui@latest listCheck which components are installed in your project.
npx fragmentui@latest check
npx fragmentui@latest check ./my-appInitialize Fragment UI in a project (creates components/ui, components/blocks, and components.json).
npx fragmentui@latest init
npx fragmentui@latest init ./my-appUpdate is currently instructional: it tells you how to reinstall the component (full smart updates are coming).
npx fragmentui@latest update buttonRemove a component from your project.
npx fragmentui@latest remove buttonPlugin management (advanced).
npx fragmentui@latest plugin list
npx fragmentui@latest plugin run theme-preset defaultOverlay patch utilities (advanced).
npx fragmentui@latest patch list
npx fragmentui@latest patch check <patch-id>
npx fragmentui@latest patch apply <patch-id># Initialize Fragment UI in the current project
npx fragmentui@latest init
# Install a component
npx fragmentui@latest add button
# Check what's installed
npx fragmentui@latest check
# Remove a component
npx fragmentui@latest remove button