Installation

CLI Available

Get started with Diamant using our CLI tool to add components to your project.

Quick Start

Install the Diamant CLI globally and initialize your project.

1. Install the CLI

Terminal
npm install -g diamant

2. Initialize in your project

Terminal
diamant init

This will set up the required dependencies and configuration files.

3. Add components

Terminal
diamant add button card dialog

Add one or more components to your project at once.

CLI Commands

All available commands in the Diamant CLI.

init

Initialize Diamant in your project

diamant init

Options:

  • -p, --path - Components directory (default: src/components/ui)
  • -l, --lib-path - Lib directory (default: src/lib)
  • -t, --typescript - Use TypeScript (default: true)

add

Add components to your project

diamant add <components...>

Options:

  • -p, --path - Components directory
  • -o, --overwrite - Overwrite existing components

list

List all available components

diamant list

Alias: diamant ls

diff

Compare local component with package version

diamant diff <component>

Useful for checking if there are updates available for a component.

Examples

Common usage patterns for the CLI.

Add multiple components at once

diamant add button input card dialog alert

Initialize with custom paths

diamant init --path components/ui --lib-path lib

Overwrite existing component

diamant add button --overwrite

Check for component updates

diamant diff button

Available Components

All components that can be installed via the CLI.

accordion
alert
alertdialog
avatar
badge
button
card
carousel
checkbox
dialog
dropdown
input
label
notification
progress
radio
select
separator
sheet
skeleton
slider
switch
tabs
textarea
toggle
tooltip