add manyplug documentation and installation

This commit is contained in:
synt-xerror
2026-04-21 11:48:41 -03:00
parent 89b477888a
commit dc9128d712
5 changed files with 112 additions and 22 deletions

View File

@@ -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 <link>` | Baixa vídeos da internet |
| **audio** | `!audio <link>` | 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

View File

@@ -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 <link>` | Downloads videos from the internet |
| **audio** | `!audio <link>` | 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

View File

@@ -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 <nome>` | Cria estrutura de um novo plugin |
| `manyplug install [nome]` | Instala do registro ou `--local <caminho>` |
| `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)

View File

@@ -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

13
setup
View File

@@ -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
# ------------------------