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 diamant2. Initialize in your project
Terminal
diamant initThis will set up the required dependencies and configuration files.
3. Add components
Terminal
diamant add button card dialogAdd 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 alertInitialize with custom paths
diamant init --path components/ui --lib-path libOverwrite existing component
diamant add button --overwriteCheck for component updates
diamant diff buttonAvailable 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