> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raigal.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Instalación

> Cómo instalar la CLI de Raigal mediante npm, npx, pnpm, yarn o bun en macOS, Linux y Windows.

Puedes ejecutar Raigal al instante sin instalar nada usando `npx`, instalarlo de forma global en tu máquina o añadirlo a las dependencias de tu proyecto.

## Requisitos del sistema

* **Node.js**: versión 20.12 o superior (recomendado Node 22 LTS)
* **Gestor de paquetes**: `npm`, `pnpm`, `yarn` o `bun`
* **Sistemas operativos**: macOS, Linux o Windows (PowerShell y cmd.exe)

## Ejecutar directamente con `npx`

Lanza un análisis rápido sin instalar nada de forma permanente:

```bash theme={null}
npx --yes @methiu/raigal@latest scan .
```

Inicia el asistente interactivo de configuración:

```bash theme={null}
npx --yes @methiu/raigal@latest init
```

## Instalación global

Instala Raigal de forma global para tener el comando `raigal` siempre disponible en cualquier terminal:

**npm**

```bash theme={null}
npm install -g @methiu/raigal
```

**pnpm**

```bash theme={null}
pnpm add -g @methiu/raigal
```

**yarn**

```bash theme={null}
yarn global add @methiu/raigal
```

**bun**

```bash theme={null}
bun add -g @methiu/raigal
```

Comprueba que la CLI responde correctamente:

```bash theme={null}
raigal --version
```

## Como dependencia del proyecto

Añade Raigal como dependencia de desarrollo en tu repositorio:

**npm**

```bash theme={null}
npm install -D @methiu/raigal
```

**pnpm**

```bash theme={null}
pnpm add -D @methiu/raigal
```

**yarn**

```bash theme={null}
yarn add -D @methiu/raigal
```

**bun**

```bash theme={null}
bun add -d @methiu/raigal
```

Añade estos atajos a tu `package.json`:

```json theme={null}
{
  "scripts": {
    "scan": "raigal scan .",
    "gate": "raigal ci .",
    "fix": "raigal fix ."
  }
}
```

Así cualquier miembro del equipo puede ejecutar `pnpm scan` o `npm run gate` con las mismas reglas de forma consistente.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.