CLI Tool
orbitkit
Section titled “orbitkit”The OrbitUI Command Line Interface (CLI) is a tool designed to simplify the process of adding and managing OrbitUI components within your Astro project. It helps you quickly scaffold components and keep your project organized.
You can access the OrbitUI CLI using npx orbitkit
in your terminal.
Commands
Section titled “Commands”Prepares your Astro project for OrbitUI components by setting up the necessary configuration and directory structure.
npx orbitkit@latest init
Options:
Section titled “Options:”-f, --force
: Force overwrite existing Orbit config files if they exist. Use with caution, as this will erase previous customizations in those files.-w, --working-directory <path>
: Specify the working directory path. Defaults to the current working directory where the command is executed.
When you run npx orbitkit init
, the CLI will guide you through the initial setup steps, including asking where you’d like to place the OrbitUI components in your project (this affects the import paths like @/components/ui/)
Adds one or more specified OrbitUI components to your project. The components will be placed in the directory configured during the init process.
npx orbitkit@latest add [components...]
[components...]
: A space-separated list of the names of the components you want to add (e.g., button alert card).
Options:
Section titled “Options:”-a, --all
: Add all available OrbitUI components to your project.-o, --overwrite
: Overwrite existing components if they already exist in your project.-w, --working-directory <path>
: Specify the working directory path. Defaults to the current working directory where the command is executed.
If you try to add a component that already exists, the CLI will skip it by default and show a message. Use --overwrite
to overwrite existing components and update their configuration.
remove
Section titled “remove”Removes one or more OrbitUI components from your project and updates the configuration.
npx orbitkit@latest remove [components...]
[components...]
: A space-separated list of the names of the components you want to remove.
Options:
Section titled “Options:”-a, --all
: Remove all OrbitUI components from your project.-w, --working-directory <path>
: Specify the working directory path. Defaults to the current working directory where the command is executed.
The CLI will prompt you to select components to remove if you do not specify any.
Shows information about your OrbitUI project, including the components directory and a list of installed components.
npx orbitkit@latest info
Options:
Section titled “Options:”-w, --working-directory <path>
: Specify the working directory path. Defaults to the current working directory where the command is executed.