CLI

Command-line tool for managing Hareru UI components and CSS imports

@hareru/cli generates CSS imports, inspects component details, and auto-detects your project setup.

Installation

npm install -g @hareru/cli
# or use directly with npx
npx @hareru/cli

Commands

hareru list

List all components grouped by category.

hareru list
hareru list --group form
hareru list --json

hareru info <name>

Show details for a component or task bundle. Output includes variants, props, states, accessibility notes, and usage examples when available.

hareru info Button
hareru info agent-chat-shell

hareru add <name>

Generate CSS import statements for a component or bundle.

hareru add Dialog
hareru add Dialog --mode tailwind
hareru add agent-chat-shell --write

CSS Modes

ModeDescription
standaloneAll-in-one bundle (styles.css)
portableTokens + component bundle, no reset
tailwindCascade Layers for Tailwind v4 coexistence
per-componentIndividual CSS files for minimal bundle (default)

CSS mode defaults to per-component when --mode is not specified.

Options

FlagDescription
--mode <mode>CSS mode (standalone, portable, tailwind, per-component)
--writeAppend imports to your CSS entry file
--css-file <path>Target CSS file (auto-detected if omitted)
--layerUse @layer wrapped variants
--scopeInclude .hui-root scope helper
--baselineInclude minimal CSS reset
--forceSkip safety checks
--jsonJSON output

Auto-Detection

The CLI automatically detects:

  • CSS entry file — Searches common paths (globals.css, index.css, app.css, etc.)
  • Package manager — pnpm, npm, yarn, bun (monorepo-aware lockfile discovery)

On this page