> For the complete documentation index, see [llms.txt](https://docs.cuxial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cuxial.com/scripts/es/interfaz/cuxial-chat/installation.md).

# Instalación

Instala Cuxial Chat paso a paso: dependencias, convars y orden de arranque.

Cuxial Chat no necesita importar SQL ni añadir items al inventario. Crea sus propias tablas en el primer arranque.

{% stepper %}
{% step %}

## Comprueba las dependencias

Estos recursos tienen que estar instalados y funcionando antes de añadir el chat:

* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, con uno de los frameworks compatibles: QBox, QBCore o ESX
* OneSync activado en el servidor

`cuxial_gang` es opcional. Si está en marcha, cada organización usa su propio color en `/gchat`. Sin él, todas usan `gchat.fallbackColor`.
{% endstep %}

{% step %}

## Copia el recurso

Coloca la carpeta `cuxial_chat` dentro de tu directorio `resources`. No le cambies el nombre.
{% endstep %}

{% step %}

## Quita el chat por defecto

Cuxial Chat ocupa el lugar del recurso `chat`. Borra o comenta cualquier línea que arranque otro chat:

{% code title="server.cfg" %}

```cfg
# ensure chat
```

{% endcode %}

{% hint style="danger" %}
Dos chats a la vez se pelean por la misma tecla y los mismos eventos. Deja solo Cuxial Chat.
{% endhint %}
{% endstep %}

{% step %}

## Define las convars

Todas son opcionales.

{% code title="server.cfg" %}

```cfg
# Idioma del chat (incluye es y en)
setr ox:locale "es"

# Webhook de Discord para el registro de mensajes
set cuxial_chat_webhook "https://discord.com/api/webhooks/..."

# Trazas de depuración en consola
setr cuxial_chat_debug "0"
```

{% endcode %}

{% hint style="info" %}
El webhook va en `server.cfg`, nunca en `shared/config.lua`. El nombre de la convar se puede cambiar en `logs.discord.convar`.
{% endhint %}
{% endstep %}

{% step %}

## Arranca el recurso

Inicia el chat después de sus dependencias y de tu framework:

{% code title="server.cfg" %}

```cfg
ensure ox_lib
ensure oxmysql
# aquí tu framework (qbx_core, qb-core o es_extended)
ensure cuxial_bridge
# opcional
ensure cuxial_gang
ensure cuxial_chat
```

{% endcode %}

No hay SQL que ejecutar. El recurso crea `cuxial_chat_settings` (con `persistSettings = true`) y `cuxial_chat_logs` (con `logs.database = true`) al arrancar.
{% endstep %}

{% step %}

## Comprueba que funciona

1. Entra al servidor y pulsa <kbd>T</kbd>. Se abre el chat.
2. Escribe `/me saluda`. La acción aparece sobre tu cabeza.
3. Escribe `/` y comprueba que sale la lista de comandos.
4. Abre el panel de ajustes del chat, muévelo a otra esquina y reconecta. La posición se conserva.
   {% endstep %}
   {% endstepper %}

Siguiente paso: adapta el chat a tu servidor en [Configuración](/scripts/es/interfaz/cuxial-chat/configuration.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/es/interfaz/cuxial-chat/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
