JSPM

  • Created
  • Published
  • Downloads 48
  • Score
    100M100P100Q63363F
  • License MIT

CLI tool for Harukit UI components

Package Exports

  • harukit
  • harukit/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (harukit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CLI Commands

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

Main Commands

init - Initialize Harukit

Set up Harukit in your project with automatic dependency installation.

# Interactive setup
npx harukit@latest init

# Skip prompts and use defaults
npx harukit@latest init --yes

What it does:

  • Creates harukit.json configuration file
  • Sets up components/ and lib/ directories
  • Generates utility functions in lib/utils.ts
  • Updates global CSS with Tailwind variables
  • Automatically installs all required dependencies using your package manager

Package Manager Support:

npx harukit@latest init      # npm
pnpm dlx harukit@latest init # pnpm  
yarn dlx harukit@latest init # yarn
bunx --bun harukit@latest init # bun

add - Add Components

Add one or more components to your project with automatic dependency resolution.

# Add single component
npx harukit@latest add button

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

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

Options:

  • --yes - Skip prompts and use defaults
  • --overwrite - Replace existing component files

What it does:

  • Downloads component files to your components/ directory
  • Automatically installs component-specific dependencies
  • Resolves and installs peer dependencies
  • Shows installation progress

remove - Remove Components

Clean up components and unused dependencies from your project.

# Remove single component
npx harukit@latest remove button

# Remove multiple components  
npx harukit@latest remove button card input

What it does:

  • Removes component files from components/ directory
  • Identifies unused dependencies
  • Prompts to clean up orphaned packages
  • Updates project configuration

list - Show Available Components

Display all components you can add to your project.

npx harukit@latest list

Output includes:

  • Component names
  • Brief descriptions
  • Categories (Form, Layout, Feedback, etc.)

info - Get Component Information

Show detailed information about Harukit or specific components.

# General Harukit information
npx harukit@latest info

# Specific component details
npx harukit@latest info button

# Multiple component info
npx harukit@latest info button card

update - Check for Updates

Check for newer versions and get update instructions.

npx harukit@latest update

Quick Examples

Complete Setup Flow:

# 1. Initialize in existing project
npx harukit@latest init

# 2. See what's available
npx harukit@latest list

# 3. Add the components you need
npx harukit@latest add button card input tooltip

# 4. Start building!

Package Manager Detection: Harukit automatically detects and uses your preferred package manager:

  1. CLI Detection: Uses the package manager from your command (npx → npm, pnpm dlx → pnpm)
  2. Lock File Detection: Falls back to package manager indicated by lock files
  3. System Default: Uses bun if available, otherwise npm

No Manual Dependency Management: All init and add commands automatically handle:

  • Installing required peer dependencies
  • Resolving version conflicts
  • Using your project's package manager
  • Showing installation progress

Global Options

All commands support:

  • --help - Show command help
  • --version - Show Harukit version

Need Help?