mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2026-03-21 20:18:39 -06:00
doc and other commands
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Evolution-Manager CLI
|
||||
|
||||
## Description
|
||||
The Evolution-Manager CLI is a command-line tool designed to manage servers, PM2 processes, and interact with the "evolution-api" project.
|
||||
|
||||
## Installation
|
||||
To install the Evolution-Manager CLI, run the following command:
|
||||
```
|
||||
npm install -g evolution-manager
|
||||
```
|
||||
|
||||
## Available Commands
|
||||
|
||||
### General
|
||||
- `help`: Displays a list of available commands. Refer to this document for additional details on each command.
|
||||
|
||||
### Server
|
||||
- `server start [--port=9615]`: Starts a temporary server in the terminal, ideal for local use. The `--port` parameter allows specifying the port, with `9615` as the default.
|
||||
- `server build`: Executes the server build but does not start it. (Currently without specific use).
|
||||
|
||||
### PM2
|
||||
Interacts with PM2 to manage Evolution Manager processes:
|
||||
- `pm2 setup`: Configures PM2 to host the Evolution Manager. Automatically installs PM2 if not present.
|
||||
- `pm2 start`: Starts the Evolution Manager process in PM2.
|
||||
- `pm2 stop`: Stops the Evolution Manager process in PM2.
|
||||
- `pm2 restart`: Restarts the Evolution Manager process in PM2.
|
||||
- `pm2 delete`: Removes the Evolution Manager process from PM2.
|
||||
|
||||
### API
|
||||
|
||||
The API section of the Evolution-Manager CLI includes various functions for managing the installation and versions of the Evolution Manager within the API. The available commands are:
|
||||
|
||||
- `setup` or `install`: Installs the manager inside the Evolution API at the path `/manager`. This command can also be accessed using the shorthand `i`.
|
||||
- `uninstall`: Uninstalls the manager from the Evolution API.
|
||||
- `changeVersion` or `cv`: Switches to a specific version of the Evolution API, whether newer or older. Example usage: `changeVersion --v=1.5.0`.
|
||||
|
||||
These commands provide a flexible and powerful command-line interface for managing the versions and configuration of the manager in your Evolution API installation.
|
||||
|
||||
## Typical Usage Flow
|
||||
1. Install the CLI globally.
|
||||
2. Use `help` to view available commands.
|
||||
3. Use PM2 commands to host the Evolution Manager.
|
||||
4. Run `server start` for a local temporary server.
|
||||
5. Within the "evolution-api" installation, use `api setup` to update to the new manager.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Evolution-Manager CLI
|
||||
|
||||
## Instalação
|
||||
Para instalar o Evolution-Manager CLI, execute o seguinte comando:
|
||||
```
|
||||
npm install -g evolution-manager
|
||||
```
|
||||
|
||||
## Comandos Disponíveis
|
||||
|
||||
### Geral
|
||||
- `help`: Exibe uma lista de comandos disponíveis. Para mais detalhes sobre cada comando, consulte este documento.
|
||||
|
||||
### Server
|
||||
- `server start [--port=9615]`: Inicia um servidor temporário no terminal, ideal para execução local. O parâmetro `--port` define a porta do servidor, sendo `9615` o valor padrão.
|
||||
- `server build`: Realiza o build do servidor, mas não o executa. (Atualmente sem uso específico).
|
||||
|
||||
### PM2
|
||||
O CLI interage com o PM2 para gerenciar processos do Evolution Manager.
|
||||
- `pm2 setup`: Configura o PM2 para hospedar o Evolution Manager. Se o PM2 não estiver instalado, o CLI o instalará automaticamente.
|
||||
- `pm2 start`: Inicia o processo do Evolution Manager no PM2.
|
||||
- `pm2 stop`: Para o processo do Evolution Manager no PM2.
|
||||
- `pm2 restart`: Reinicia o processo do Evolution Manager no PM2.
|
||||
- `pm2 delete`: Remove o processo do Evolution Manager do PM2.
|
||||
|
||||
## API
|
||||
|
||||
A seção API do Evolution-Manager CLI inclui várias funções para gerenciar a instalação e as versões do Evolution Manager na API. Os comandos disponíveis são:
|
||||
|
||||
- `setup` ou `install`: Instala o manager dentro da Evolution API no caminho `/manager`. Este comando também pode ser acessado usando a abreviação `i`.
|
||||
- `uninstall`: Desinstala o manager da Evolution API.
|
||||
- `changeVersion` ou `cv`: Altera para uma versão específica da Evolution API, seja ela mais nova ou mais antiga. Exemplo de uso: `changeVersion --v=1.5.0`.
|
||||
|
||||
Esses comandos fornecem uma interface de linha de comando flexível e poderosa para gerenciar as versões e a configuração do manager na sua instalação da Evolution API.
|
||||
|
||||
|
||||
## Fluxo de Uso Típico
|
||||
1. Instale o CLI globalmente.
|
||||
2. Utilize o comando `help` para ver a lista de comandos disponíveis.
|
||||
3. Para hospedar o Evolution Manager, use os comandos sob `PM2`.
|
||||
4. Use o comando `server start` para rodar um servidor temporário localmente.
|
||||
5. Utilize `api setup` para interagir com o projeto "evolution-api" e configurar o manager.
|
||||
Reference in New Issue
Block a user