EzyPlatform CLI commands
Updated at 1784971136000Overview
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.
Update EzyPlatform
This command helps you download the latest version of EzyPlatform from the market, in preparation for the update.
Syntax:
bash cli.sh [update, u, -u]
You can use either
update, u, or -u for this command.Example:
bash cli.sh update
Note: This command only downloads the update; it does not apply it right away. You will need to run the
run-update command to stop, apply and restart admin/web/socket.Install Plugin
This command helps you download and install a plugin (or theme) from the EzyPlatform market, without having to manually download and copy the module's files.
Syntax:
bash cli.sh "[install|i|-i] <module name> [-v]"
Where:
-
install|i|-iyou can use either command. -
<module name>: The name of the module to be downloaded and installed from the market. -
-v: Display logs during the execution of the command.
Example:
bash cli.sh "install ezymail"
Note: You will need to activate the module after installing it, then restart the server to apply it. If the module is already installed, the command will notify you instead of downloading it again.
Update Modules
This command helps you download the latest version of an installed module (or all installed modules) from the market.
Syntax:
bash cli.sh "[update-modules|ums|-ums] [all|admin-plugin|socket-app|socket-plugin|web-plugin|theme] [module name] [-v]"
Where:
-
update-modules|ums|-umsyou can use either command. -
all|admin-plugin|socket-app|socket-plugin|web-plugin|themeis the type of module to update, default isall. -
[module name]: The name of a specific module to update. If you don't specify anything, it will update all modules of the selected type. -
-v: Display logs during the execution of the command.
Example:
bash cli.sh "update-modules all ezymail"
Note: This command only downloads the update(s); it does not apply them right away. You will need to run the
run-update command to stop, apply and restart admin/web/socket.Run Update
This command stops the server, applies the update(s) downloaded by the
update and/or update-modules commands, then restarts admin/web/socket.Syntax:
bash cli.sh [run-update, ru, -ru]
You can use either
run-update, ru, or -ru for this command.Example:
bash cli.sh run-update
Note: This command only has an effect if you have already run
update and/or update-modules beforehand to download the update(s). This command will stop and restart admin/web/socket.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|themeare types of modules, andallmeans 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|themeare types of modules, andallmeans 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|themeare types of modules, andallmeans 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,lsyou 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