EzyPlatform CLI commands
Updated at 1694749597000Overview
The EzyPlatform CLI provides commands to interact with EzyPlatform more conveniently through the terminal interface. You can install EzyPlatform following the instructions here. For Linux, you can use the bash cli.sh
command, and for Windows, you can use the cli.bat
command.
List of Commands
EzyPlatform CLI provides the following commands.
Help
Displays basic usage instructions for other commands.
Syntax:
cli.sh [help, -h]
You can choose either help
or -h
for this command.
Example:
bash cli.sh help
Check Database Connection
Example:
bash cli.sh test
If the database connection is successful, you will receive the output:
Test database connection: OK
Start Server in Console Mode
EzyPlatform CLI allows you to start the server for admin
, socket
, web
in console mode to view the logs on the screen.
Syntax:
bash cli.sh console <admin|socket|web>
Where admin
|socket
|web
is the type of server.
Example:
bash cli.sh "console admin"
Note: For Windows, you can only use this command to start the server, and to stop the server, you can use ctrl + C
.
Start Server in Background Mode
EzyPlatform CLI allows you to start the server for admin
, socket
, web
in background mode.
Syntax:
bash cli.sh start [admin|socket|web]
Where admin
|socket
|web
is the type of server. Typically, you only need to start admin
, and from admin
, you can start socket
and web
. If you don't specify anything, it will start all of them.
Example:
bash cli.sh "start admin"
Note: This command is not available for Windows.
Stop Server
EzyPlatform CLI allows you to stop the server for admin
, socket
, web
in the background.
Syntax:
bash cli.sh stop [admin|socket|web]
Where admin
|socket
|web
is the type of server. If you don't specify anything, it will stop all of them. You can also stop the servers through the admin interface.
Example:
bash cli.sh "stop admin"
Note: This command is not available for Windows.
Restart Server
EzyPlatform CLI allows you to restart the server for admin
, socket
, web
in the background.
Syntax:
bash cli.sh restart [admin|socket|web]
Where admin
|socket
|web
is the type of server. If you don't specify anything, it will restart all of them. You can also restart the servers through the admin interface.
Example:
bash cli.sh "restart admin"
Note: This command is not available for Windows.
Activate Plugin
This command helps you activate a plugin.
Syntax:
bash cli.sh "activate [all|admin-plugin|socket-app|socket-plugin|web-plugin|theme] <module name>"
Where
all
|admin-plugin
|socket-app
|socket-plugin
|web-plugin
|theme
are types of modules, andall
means activating all types of modules in the plugin.<module name>
: The name of the plugin to be activated.
Example:
bash cli.sh "activate all ezymail"
Note: You will need to restart the server to apply the newly activated plugin. You can also activate plugins from the admin interface.
Deactivate Plugin
This command helps you deactivate a plugin or all plugins.
Syntax:
bash cli.sh "deactivate [all|admin-plugin|socket-app|socket-plugin|web-plugin|theme] [module name]"
Where:
all
|admin-plugin
|socket-app
|socket-plugin
|web-plugin
|theme
are types of modules, andall
means deactivating all types of modules in the plugin.[module name]
: The name of the plugin to be deactivated. If you don't specify anything, it will deactivate all plugins in the selected module type.
Example:
bash cli.sh "deactivate all ezymail"
Note: You will need to restart the server to apply the changes from the deactivated plugin. You can also deactivate plugins from the admin interface.
Remove Plugin
This command helps you remove a plugin or all plugins.
Syntax:
bash cli.sh "remove [all|admin-plugin|socket-app|socket-plugin|web-plugin|theme] [module name] [-v]"
Where:
all
|admin-plugin
|socket-app
|socket-plugin
|web-plugin
|theme
are types of modules, andall
means removing all types of modules in the plugin.[module name]
: The name of the plugin to be removed. If you don't specify anything, it will remove all plugins in the selected module type.-v
: Display logs during the execution of the command.
Example:
bash cli.sh "remove all ezymail"
Note: You will need to restart the server to apply the changes from the removed plugin. You can also remove plugins from the admin interface.
List Modules
Displays a list of modules that have been installed in EzyPlatform.
Syntax:
bash cli.sh list, ls [-a]
Where:
list
,ls
you can use either command.-a
: If you pass this parameter, the list of files in the module will be displayed.
Example:
bash cli.sh list -a
List the tables in the database
Example:
bash cli.sh tables
Exit CLI Interface
If you are in the CLI interface, you can use the exit
or quit
command to exit.
Example:
exit