Apps-Engine CLI

The Rocket.Chat Apps-Engine CLI is a command-line interface with which you can develop Rocket.Chat applications. Using the Apps-Engine CLI, you can create new applications, deploy them on your deployment environment, and package your application for shipping and future deployment on other installations.

It also provides a set of commands to compile and deploy a basic app structure to your Rocket.Chat Server, generate boilerplate code for various functions, display autocomplete installation instructions, submit an app for review in the marketplace, and more.

The CLI is hosted on GitHub and distributed via NPM. It provides an easy interface for developing extensions.

Installing Rocket.Chat Apps-Engine CLI

  1. Before installing the CLI, you must ensure that Node.js is installed on your system. Use the following command in your terminal to verify the installation of Node.js. This returns a valid version of Node.js, for example, v10.15.3:

    node -v
  2. After installing Node.js, run the following command in your terminal to deploy the CLI globally.

    npm install -g @rocket.chat/apps-cli

    Troubleshooting tip

    Error: While attempting to execute the preceding command, if your operating system rejects the operation, it is likely that you do not have permission to access the file as the current user. If you suspect a permissions issue, please double-check your NPM installation, or rerun the command as root/administrator.

    Resolution: Prefix the command with sudo and execute as follows:

    sudo npm install -g @rocket.chat/apps-cli

    After executing this command, enter the system user's password. This will grant the application all necessary permissions, as this command must be executed as an administrator.

  3. After installation, run the following command to verify the installation. Note that the response may differ depending on your system and environment, but it should have a similar appearance. For example, @rocket.chat/apps-cli/1.4.0 darwin-x64 node-v10.15.3

    rc-apps -v
  4. You are now all set to develop your first Rocket.Chat app. To do that, run the command below:

    rc-apps create

    This command will guide you through a brief setup process by asking for details about your app. On providing this information, a basic Rocket.Chat app structure will be created in the current working directory.

For more information on customization and packaging options, visit the official Rocket.Chat Apps-Engine GitHub repository.