• Docs
  • Components
  • Blocks
  • Admin
CtrlK
Get Started
  • Introduction
  • Setup
  • CLI
  • VS Code Extension
  • Figma Code Connect
  • MCP Server
  • llms.txt
  • Changelog
Foundations
  • Design Tokens
  • Theming & Modes
  • Semantic Colors
  • Spacing
  • Typography
Testing
  • Test Guide
  • Performance Tests
  • Visual Regression
Components
  • Accordion
  • Activity Feed
  • Alert
  • Avatar
  • Badge
  • Breadcrumbs
  • Button
  • Card
  • Carousel
  • Checkbox
  • Collapsible
  • Combobox
  • Command Palette
  • Context Menu
  • Date Picker
  • Dialog
  • Dropdown Menu
  • File Upload
  • Hover Card
  • Input
  • Kbd
  • Label
  • Menubar
  • Metric Card
  • Multi Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Quick Actions
  • Radio
  • Rating
  • Resizable
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Skeleton
  • Slider
  • Spinner
  • Split Button
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Textarea
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree View
Blocks
  • Activity Feed
  • App Shell
  • Authentication Block
  • Benefits Section
  • Cta Section
  • Data Table
  • Empty State
  • Faq Section
  • Feature Grid Section
  • Footer Section
  • Hero Section
  • Kpi Dashboard
  • Kpi Strip
  • Link Card
  • Metric Card
  • Navigation Header
  • Pagination Footer
  • Pricing Table
  • Quick Actions
  • Settings Screen
Resources
  • API Reference
SetupVS Code Extension

CLI

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).

Key Features

  • Install components/blocks from the registry into your codebase
  • Initialize a project (components/ui, components/blocks, components.json)
  • Check component installation status
  • List all available components
  • Remove installed components
  • Patch & plugin utilities (advanced)

Installation

Use without installing (recommended)

npx fragmentui@latest --help

Install globally (optional)

npm install -g fragmentui
# or: pnpm add -g fragmentui
fragmentui --help
# alias:
ds --help

Develop locally (monorepo)

# Build the CLI
pnpm --filter fragmentui build
# Use directly
node packages/cli/dist/index.js <command>

Commands

The primary entrypoint is fragmentui, and ds is an alias.

fragmentui add <name> [path] [--overwrite]

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-app

fragmentui list

List all available components.

npx fragmentui@latest list

fragmentui check [path]

Check which components are installed in your project.

npx fragmentui@latest check
npx fragmentui@latest check ./my-app

fragmentui init [path]

Initialize Fragment UI in a project (creates components/ui, components/blocks, and components.json).

npx fragmentui@latest init
npx fragmentui@latest init ./my-app

fragmentui update <name> [path]

Update is currently instructional: it tells you how to reinstall the component (full smart updates are coming).

npx fragmentui@latest update button

fragmentui remove <name> [path]

Remove a component from your project.

npx fragmentui@latest remove button

fragmentui plugin list / fragmentui plugin run

Plugin management (advanced).

npx fragmentui@latest plugin list
npx fragmentui@latest plugin run theme-preset default

fragmentui patch list / patch apply / patch check

Overlay patch utilities (advanced).

npx fragmentui@latest patch list
npx fragmentui@latest patch check <patch-id>
npx fragmentui@latest patch apply <patch-id>

Examples

# 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

Learn More

  • CLI Documentation
  • Available Components
SetupVS Code Extension