Command Line Interface

A powerful CLI tool that copies component source code directly into your project, giving you full control and customization.

How it works

Unlike traditional component libraries, DinachiUI CLI copies the actual source code into your project. This gives you full ownership and control over your components.

Full ownership

Code is copied to your project

Zero runtime dependencies

Only peer dependencies for utilities

Complete customization

Modify variants, styles, and behavior

TypeScript support

Full type safety out of the box

Installation

Global Installation

Install once, use everywhere

bash
1npm install -g @dinachi/cli

Then use: dinachi add button

NPX Usage

No installation required

bash
1npx @dinachi/cli@latest init

Always uses the latest version

Commands

init

Initialize DinachiUI in your project. Creates configuration file and installs dependencies.

bash
1npx @dinachi/cli@latest init
add [component]

Add a specific component to your project. Copies source code and installs dependencies.

bash
1npx @dinachi/cli@latest add button
add --all

Install all available components at once.

bash
1npx @dinachi/cli@latest add --all
add --overwrite

Overwrite existing component files.

bash
1npx @dinachi/cli@latest add button --overwrite

Configuration

After running init, you'll have a components.json file:

json
1{
2  "style": "default",
3  "rsc": true,
4  "tsx": true,
5  "tailwind": {
6    "config": "tailwind.config.ts",
7    "css": "src/app/globals.css",
8    "baseColor": "slate",
9    "cssVariables": true
10  },
11  "aliases": {
12    "components": "@/components",
13    "utils": "@/lib/utils",
14    "ui": "@/components/ui",
15    "lib": "@/lib",
16    "hooks": "@/hooks"
17  },
18  "iconLibrary": "lucide"
19}

Examples

Setup new project

bash
1# Initialize DinachiUI
2npx @dinachi/cli@latest init
3
4# Add components you need
5npx @dinachi/cli@latest add button input card
6
7# Start using them
8import { Button } from '@/components/ui/button'

Add all components

bash
1# Install all components at once
2npx @dinachi/cli@latest add --all
3
4# Or install globally for shorter commands
5npm install -g @dinachi/cli
6dinachi add --all

Update existing component

bash
1# Overwrite existing component with latest version
2npx @dinachi/cli@latest add button --overwrite
3
4# This will replace your existing button component
5# Make sure to backup any customizations first!