open-index/open-npm huggingface dataset:
npm package: @sonacode/sonaui-cli
Description: A CLI to download SonarUI components
Author: sonacode
Latest version: 1.3.0

# sonaui-cli

`sonaui-cli` is a command-line interface (CLI) tool designed to manage and download components from the Sona UI library. It provides commands to list available components, view details of a specific component, and download components along with their dependencies.

## Installation

To install the dependencies required for the CLI, run:

```bash
bun install
```

## Usage

To execute the CLI, use the following command:

```bash
bun run index.ts
```

Alternatively, if the CLI is installed globally, you can use:

```bash
sona-cli <command>
```

## Commands

### `list`

Lists all available components in the Sona UI library.

#### Usage

```bash
sona-cli list
```

#### Example Output

```
📦 Available Components:

- Accordion (general)
- AnimatedPlusMinusButton (general)
- ExpandableTabs (general)
- LinkPreview (general)
- MagneticButton (general)
- RippleButton (general)
- SpinningText (general)
- VerticalTab (general)
```

---

### `show`

Displays details of a specific component, including its description and dependencies.

#### Usage

```bash
sona-cli show <component>
```

#### Arguments

- `<component>`: The name of the component to display details for.

#### Example

```bash
sona-cli show Accordion
```

#### Example Output

```
🔍 Component: Accordion
📄 Description: [Component description here]
🔗 Depends on: AnimatedPlusMinusButton
```

---

### `download`

Downloads a specific component and its dependencies to the local `components/` directory.

#### Usage

```bash
sona-cli download <component>
```

#### Arguments

- `<component>`: The name of the component to download.

#### Example

```bash
sona-cli download Accordion
```

#### Example Output

```
✅ Accordion.tsx downloaded.
✅ AnimatedPlusMinusButton.tsx downloaded.
📥 All components downloaded to: components/Accordion/
```

## Project Structure

The project is organized as follows:

```
sonaui-cli/
├── src/
│   ├── index.ts          # Entry point of the CLI
│   ├── commands/
│   │   ├── list.ts       # Implementation of the `list` command
│   │   ├── show.ts       # Implementation of the `show` command
│   │   └── download.ts   # Implementation of the `download` command
├── components.json       # Metadata for available components
├── package.json          # Project configuration and dependencies
├── tsconfig.json         # TypeScript configuration
└── README.md             # Project documentation
```

## Development

### Build

To build the project, run:

```bash
bun run build
```

### Release

To release a new version, run:

```bash
bun run release
```

## Workflow

The project uses a GitHub Actions workflow for semantic release. The workflow is triggered on:

- Pushes to the `main` branch
- Pull requests to the `main` or `dev` branches
- Manual dispatch

## License

This project is licensed under the MIT License.