★ GitHub

CLI Usage

Add StarKit components to your project via command line.

StarKit provides a built-in CLI to easily add individual components directly into your project. This is especially useful if you want full control over the component source code.

Initialization

To install all components and styles in one go:

npx starkit-ui init

Add Specific Component

Use the following command to run the interactive prompt or pass a component name:

npx starkit-ui add [component-name]

For example, to add the Button component:

npx starkit-ui add Button

How it works

When you run the command, StarKit CLI will:

  • Detect your project structure (looks for a src directory).
  • Copy the component's .tsx and .css files into components/starkit/[ComponentName].
  • Automatically copy tokens.css and shared.css if they don't already exist.

Next Steps

After adding your first component, make sure you import the CSS files in your main layout or entry file:

import "@/styles/tokens.css"; import "@/styles/shared.css";