From dc9128d712db16b5178656851cf84a71730666a5 Mon Sep 17 00:00:00 2001
From: synt-xerror <169557594+synt-xerror@users.noreply.github.com>
Date: Tue, 21 Apr 2026 11:48:41 -0300
Subject: [PATCH] add manyplug documentation and installation
---
README.md | 28 +++++++++++++++++-----------
README_EN.md | 28 +++++++++++++++++-----------
docs/PLUGINS.md | 43 +++++++++++++++++++++++++++++++++++++++++++
man/man1/manybot.1 | 22 ++++++++++++++++++++++
setup | 13 +++++++++++++
5 files changed, 112 insertions(+), 22 deletions(-)
diff --git a/README.md b/README.md
index 0db2bc6..16eaf00 100644
--- a/README.md
+++ b/README.md
@@ -114,17 +114,24 @@ node src/utils/get_id.js
O ManyBot é construído em torno de um sistema de plugins. O kernel apenas conecta ao WhatsApp e distribui as mensagens — os plugins decidem o que fazer.
-### Plugins Incluídos
+### Gerenciando Plugins com ManyPlug
-| Plugin | Comando | Descrição |
-|--------|---------|-----------|
-| **figurinha** | `!figurinha` | Converte imagens, GIFs e vídeos em figurinhas |
-| **video** | `!video ` | Baixa vídeos da internet |
-| **audio** | `!audio ` | Baixa áudio de vídeos como mensagem de voz |
-| **adivinhacao** | `!adivinhacao comecar` | Jogo de adivinhação (1-100) |
-| **forca** | `!forca comecar` | Jogo da forca clássico |
-| **many** | `!many` | Lista todos os comandos disponíveis |
-| **obrigado** | `!obrigado` | Responde agradecimentos |
+Instale e gerencie plugins usando o **ManyPlug CLI**:
+
+```bash
+# Instalar o gerenciador
+npm install -g @freakk.dev/manyplug
+
+# Criar um novo plugin
+cd src/plugins
+manyplug init meu-plugin --category utility
+
+# Instalar de outro diretório
+manyplug install --local ../outro-plugin
+
+# Listar plugins instalados
+manyplug list
+```
### Criar um Plugin
@@ -147,7 +154,6 @@ Veja mais na [documentação de plugins](docs/PLUGINS.md).
- [📥 Instalação Completa](docs/INSTALACAO.md) — Linux, Windows, Termux
- [⚙️ Configuração](docs/CONFIGURACAO.md) — Todas as opções do `manybot.conf`
- [🔌 Criando Plugins](docs/PLUGINS.md) — Guia completo de desenvolvimento
-- [🖥️ Serviço Systemd](docs/SYSTEMD.md) — Rodar como serviço Linux
- [🛠️ API de Plugins](docs/API.md) — Referência de objetos `msg` e `api`
## 🌍 Internacionalização
diff --git a/README_EN.md b/README_EN.md
index e3b0677..c779686 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -114,17 +114,24 @@ node src/utils/get_id.js
ManyBot is built around a plugin system. The kernel only connects to WhatsApp and distributes messages — plugins decide what to do.
-### Included Plugins
+### Managing Plugins with ManyPlug
-| Plugin | Command | Description |
-|--------|---------|-------------|
-| **sticker** | `!sticker` | Converts images, GIFs, and videos into stickers |
-| **video** | `!video ` | Downloads videos from the internet |
-| **audio** | `!audio ` | Downloads audio from videos as voice messages |
-| **guess** | `!guess start` | Guessing game (1-100) |
-| **hangman** | `!hangman start` | Classic hangman game |
-| **many** | `!many` | Lists all available commands |
-| **thanks** | `!thanks` | Responds to thanks |
+Install and manage plugins using the **ManyPlug CLI**:
+
+```bash
+# Install the plugin manager
+npm install -g @freakk.dev/manyplug
+
+# Create a new plugin
+cd src/plugins
+manyplug init my-plugin --category utility
+
+# Install from another directory
+manyplug install --local ../another-plugin
+
+# List installed plugins
+manyplug list
+```
### Create a Plugin
@@ -147,7 +154,6 @@ See more in the [plugin documentation](docs/PLUGINS_EN.md).
- [📥 Full Installation](docs/INSTALLATION.md) — Linux, Windows, Termux
- [⚙️ Configuration](docs/CONFIGURATION.md) — All `manybot.conf` options
- [🔌 Creating Plugins](docs/PLUGINS.md) — Complete development guide
-- [🖥️ Systemd Service](docs/SYSTEMD.md) — Run as a Linux service
- [🛠️ Plugin API](docs/API.md) — Reference for `msg` and `api` objects
## 🌍 Internationalization
diff --git a/docs/PLUGINS.md b/docs/PLUGINS.md
index 9275ebd..e369ea7 100644
--- a/docs/PLUGINS.md
+++ b/docs/PLUGINS.md
@@ -4,8 +4,51 @@ Guia completo para criar plugins no ManyBot.
---
+## ManyPlug CLI
+
+**ManyPlug** é a ferramenta oficial para gerenciar plugins do ManyBot. Com ela você pode criar, instalar e validar plugins facilmente.
+
+### Instalação
+
+```bash
+npm install -g @freakk.dev/manyplug
+```
+
+Ou para desenvolvimento:
+```bash
+git clone https://git.maneos.net/synt-xerror/manyplug
+cd manyplug
+npm link
+```
+
+### Comandos
+
+| Comando | Descrição |
+|---------|-----------|
+| `manyplug init ` | Cria estrutura de um novo plugin |
+| `manyplug install [nome]` | Instala do registro ou `--local ` |
+| `manyplug list` | Lista plugins instalados |
+| `manyplug validate [caminho]` | Valida o manyplug.json |
+
+### Exemplos
+
+```bash
+# Criar novo plugin
+cd src/plugins
+manyplug init meu-plugin --category utility
+
+# Instalar de outro diretório
+manyplug install --local ../outro-plugin
+
+# Validar manifesto
+manyplug validate ./meu-plugin
+```
+
+---
+
## 📑 Índice
+- [ManyPlug CLI](#manyplug-cli)
- [Estrutura Básica](#estrutura-básica)
- [Manifesto do Plugin](#manifesto-do-plugin-manyplugjson)
- [Criando Seu Primeiro Plugin](#criando-seu-primeiro-plugin)
diff --git a/man/man1/manybot.1 b/man/man1/manybot.1
index dfbb7f2..fdf5813 100644
--- a/man/man1/manybot.1
+++ b/man/man1/manybot.1
@@ -100,6 +100,28 @@ Message information including \fBbody\fR, \fBargs\fR, \fBtype\fR, \fBsender\fR,
.B api
Interaction methods including \fBsend()\fR, \fBsendVideo()\fR, \fBsendAudio()\fR,
\fBsendImage()\fR, \fBsendSticker()\fR, \fBgetPlugin()\fR, and \fBlog\fR methods.
+.SH MANYPLUG
+ManyPlug is the official CLI for managing ManyBot plugins. Install it with:
+.PP
+.nf
+$ npm install -g @freakk.dev/manyplug
+.fi
+.PP
+Common commands:
+.TP
+.B manyplug init \fIname\fR
+Create a new plugin boilerplate in the current directory.
+.TP
+.B manyplug install [\fIname\fR]
+Install a plugin from the registry or use \fB--local \fIpath\fR to install from a local directory.
+.TP
+.B manyplug list
+List all installed plugins in \fIsrc/plugins/\fR.
+.TP
+.B manyplug validate [\fIpath\fR]
+Validate the \fImanyplug.json\fR manifest file.
+.PP
+See \fBmanyplug(1)\fR for complete documentation.
.SH FILES
.TP
.I manybot.conf
diff --git a/setup b/setup
index 49bbe85..af2994a 100755
--- a/setup
+++ b/setup
@@ -170,6 +170,19 @@ log_info "Instalando Chrome"
npx puppeteer browsers install chrome
+# ------------------------
+# ManyPlug CLI
+# ------------------------
+log_info "Instalando ManyPlug CLI"
+
+if ! command -v manyplug &>/dev/null; then
+ log_info "ManyPlug não encontrado, instalando globalmente..."
+ npm install -g @freakk.dev/manyplug
+ log_ok "ManyPlug instalado com sucesso"
+else
+ log_ok "ManyPlug já está instalado"
+fi
+
# ------------------------
# Configuração de exemplo
# ------------------------