H
Harukit UIDocumentation

CLI Commands

Complete reference for all Harukit CLI commands and options

Harukit provides a powerful command-line interface for managing your UI components. All commands support automatic package manager detection and dependency installation.

Command Overview

CommandDescription
initInitialize Harukit in your project
addAdd components to your project
removeRemove components from your project
listList all available components
updateCheck for updates and show update instructions
infoShow information about Harukit or specific components

init

Initialize Harukit in your project.

bunx --bun harukit@latest init [options]
npx harukit@latest init [options]
pnpm dlx harukit@latest init [options]
yarn dlx harukit@latest init [options]

Options

  • -y, --yes - Skip prompts and use defaults

Examples

# Interactive setup
npx harukit@latest init

# Skip prompts with defaults
npx harukit@latest init --yes

# Custom configuration
npx harukit@latest init --typescript --tailwind --src-dir

# Set custom import alias
npx harukit@latest init --import-alias "~/components"

What the init command does

  1. Creates configuration file: Generates harukit.json with your project settings
  2. Sets up directories: Creates components/ and lib/ directories
  3. Creates utility files: Generates lib/utils.ts with the cn function
  4. Adds global CSS: Updates your global CSS with Tailwind variables
  5. Installs dependencies: Automatically installs all required dependencies using your detected package manager
  6. Shows progress: Displays installation progress for each dependency

add

Add components to your project.

bunx --bun harukit@latest add <components...> [options]
npx harukit@latest add <components...> [options]
pnpm dlx harukit@latest add <components...> [options]
yarn dlx harukit@latest add <components...> [options]

Arguments

  • components... - One or more component names to add

Options

  • -y, --yes - Skip prompts and use defaults
  • --overwrite - Overwrite existing components

Examples

# Add single component
npx harukit@latest add button

# Add multiple components
npx harukit@latest add button card input

# Add all available components
npx harukit@latest add accordion button card input label tooltip

# Overwrite existing components
npx harukit@latest add button --overwrite

# Skip prompts
npx harukit@latest add button card --yes

Check Available Components

bunx --bun harukit@latest list
npx harukit@latest list
pnpm dlx harukit@latest list
yarn dlx harukit@latest list

remove

Remove components from your project.

bunx --bun harukit@latest remove <components...>
npx harukit@latest remove <components...>
pnpm dlx harukit@latest remove <components...>
yarn dlx harukit@latest remove <components...>

Arguments

  • components... - One or more component names to remove

Examples

# Remove single component
npx harukit@latest remove button

# Remove multiple components
npx harukit@latest remove button card

# Remove all components
npx harukit@latest remove accordion button card input label tooltip

What the remove command does

  1. Removes component files: Deletes the component files from your components/ directory
  2. Checks for unused dependencies: Identifies dependencies that are no longer needed
  3. Prompts for cleanup: Asks if you want to remove unused dependencies
  4. Updates configuration: Removes component references from harukit.json if present

list

List all available components.

bunx --bun harukit@latest list
npx harukit@latest list
pnpm dlx harukit@latest list
yarn dlx harukit@latest list

update

Check for updates and show update instructions.

bunx --bun harukit@latest update [options]
npx harukit@latest update [options]
pnpm dlx harukit@latest update [options]
yarn dlx harukit@latest update [options]

info

Show information about Harukit or specific components.

bunx --bun harukit@latest info [component]
npx harukit@latest info [component]
pnpm dlx harukit@latest info [component]
yarn dlx harukit@latest info [component]

Arguments

  • component - Optional component name to get specific information

Examples

# Show general information
npx harukit@latest info

# Show specific component information
npx harukit@latest info button

# Show information about multiple components
npx harukit@latest info button card

Support