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

# Bienvenidos al CLI

> Gestiona tus agentes de IA directamente desde la terminal

## Alcance del CLI

**Plazbot CLI** es la herramienta oficial de linea de comandos para interactuar con la plataforma Plazbot. Permite gestionar todo tu ecosistema de IA sin salir de la terminal.

### Que puedes hacer

* **Agentes de IA** - Crear agentes con wizard interactivo, templates predefinidos, chatear en tiempo real, gestionar archivos y configurar Tool Calling.
* **Portales** - Crear portales de busqueda IA, asociar agentes, gestionar enlaces.
* **WhatsApp** - Enviar mensajes, plantillas con variables y gestionar webhooks.
* **Configuracion rapida** - Inicializar credenciales una sola vez y trabajar con multiples workspaces.

### Instalacion

```bash theme={null}
npm install -g plazbot-cli
```

### Inicio Rapido

```bash theme={null}
# 1. Inicializar con tus credenciales
plazbot init -e tu@email.com -k eyJhbG... -w wok_Zo5T... -z LA

# 2. Crear un agente con el wizard interactivo
plazbot agent create

# 3. Chatear con tu agente
plazbot agent chat -a [agentId]

# 4. Ver todos tus agentes
plazbot agent list
```

<Tip>
  El CLI soporta el flag `--dev` en todos los comandos para apuntar al backend local (`localhost:5090`) durante el desarrollo.
</Tip>

***

### Comandos Disponibles

<CardGroup cols={2}>
  <Card title="Inicializar CLI" icon="lock-open" href="/cli/init">
    Configura tus credenciales de Plazbot una sola vez para comenzar a trabajar.
  </Card>

  <Card title="Agentes de IA" icon="message-bot" href="/cli/agent/create">
    Crear agentes con wizard o templates, actualizar, listar, chatear y gestionar widgets.
  </Card>

  <Card title="Portal de IA" icon="window-flip" href="/cli/portal/create">
    Crear y gestionar portales de busqueda con agentes y enlaces personalizados.
  </Card>

  <Card title="WhatsApp" icon="whatsapp" href="/cli/whatsapp/send-message">
    Enviar mensajes y plantillas de WhatsApp directamente desde la terminal.
  </Card>
</CardGroup>

***

### Referencia Rapida

| Comando                                                      | Descripcion                       |
| ------------------------------------------------------------ | --------------------------------- |
| `plazbot init`                                               | Inicializar credenciales          |
| `plazbot agent create`                                       | Crear agente (wizard interactivo) |
| `plazbot agent create ./config.json`                         | Crear agente desde archivo JSON   |
| `plazbot agent list`                                         | Listar todos los agentes          |
| `plazbot agent get [id]`                                     | Ver detalle de un agente          |
| `plazbot agent chat -a [id]`                                 | Chat interactivo con un agente    |
| `plazbot agent message -a [id] -q "pregunta"`                | Enviar un mensaje puntual         |
| `plazbot agent update [id] ./config.json`                    | Actualizar agente                 |
| `plazbot agent enable-widget [id]`                           | Activar widget web                |
| `plazbot agent delete [id]`                                  | Eliminar agente                   |
| `plazbot portal create -n "nombre"`                          | Crear portal                      |
| `plazbot portal add-agent-portal -p [portalId] -a [agentId]` | Asociar agente a portal           |
| `plazbot whatsapp send-message -t [telefono] -m "mensaje"`   | Enviar mensaje WhatsApp           |
| `plazbot whatsapp send-template -p [telefono] -t "template"` | Enviar plantilla WhatsApp         |
| `plazbot finish`                                             | Cerrar sesion del CLI             |
