open-index/open-npm huggingface dataset:
npm package: @reviewlico/cli
Description: Add reviewlico components to your project
Latest version: 0.1.2

# `@reviewlico/cli`

Add Reviewlico review components directly into your app as editable source files.

Reviewlico website and dashboard: [https://reviewlico.online](https://reviewlico.online)

## Quick Start

Use the CLI without installing it globally:

```bash
npx @reviewlico/cli add ReviewForm
```

This copies the selected component into your project and creates `reviewlico.config.json` on first run if needed.

## Commands

```bash
# Configure output dir + preferred style
npx @reviewlico/cli init

# Add a single component
npx @reviewlico/cli add ReviewForm

# Use the Tailwind variant
npx @reviewlico/cli add ReviewList --styles tailwind

# Prompt before overwriting files
npx @reviewlico/cli add ReviewForm --confirm

# Leave existing files untouched
npx @reviewlico/cli add ReviewForm --skip-existing

# See all available components
npx @reviewlico/cli list
```

## Available Components

- `ReviewForm`
- `ReviewList`

The CLI copies source files into your app so you can edit them freely. It does not add a runtime UI dependency.

## Supported Frameworks

- Next.js
- Vite

The CLI detects your framework and whether Tailwind is configured to preselect a sensible default style on first run.

## Configuration and Env Vars

After generation, import the copied files directly from your own codebase:

```tsx
import { ReviewForm } from './components/reviews/ReviewForm';

<ReviewForm config={{ externalProductId: 'prod-001' }} />
```

Set your API URL and embed key in your app's env file so you do not hardcode them in JSX:

```bash
# .env (Vite)
VITE_REVIEWLICO_API_URL=https://api.example.com
VITE_REVIEWLICO_API_KEY=rk_live_...

# .env.local (Next.js)
NEXT_PUBLIC_REVIEWLICO_API_URL=https://api.example.com
NEXT_PUBLIC_REVIEWLICO_API_KEY=rk_live_...
```

The API key is a client-side embed key, so it will be visible in the browser bundle. Keep any secret keys server-side.

## Overwrite Behavior

`reviewlico add` overwrites existing files by default.

- Use `--confirm` to approve each overwrite interactively
- Use `--skip-existing` to keep existing files unchanged

## Dashboard

Manage your Reviewlico setup in the dashboard:

- Website and dashboard: [https://reviewlico.online](https://reviewlico.online)