Installing the CLI

Zet is a command line interface that helps developers build and package widgets in Zoho Recruit.

CLI is Command Line Interface, which is a text-based interface that is used to operate softwares by typing commands into the interface and receiving a reply from the software. It is the basic form of a GUI but it provides a much more easier working mechanism.

As such, CLIs are still in use by most developers to create applications, softwares and even operating systems. In this document, you would learn about how to build a widget using the CLI and integrating it with Zoho Recruit.

Install the necessary components

Pre-requisites:

  • Download the nodejs source code from "https://nodejs.org/en/download/".
  • Once Node is installed, verify it by running the following command.

    $ node -v
    $ npm -v

Installing the CLI

Run the following command to install the zapps cli node package.

$ npm install -g zoho-extension-toolkit

Run the following command to ensure that the installation is successful.

$ zet // Help information about 'zet' command will be shown.

Create a project

Run the following command to create new project.

$ zet init

This command will show the list of Zoho Services for which you wish to create project template.

To verify whether the server is started successfully, open the following URL in the browser http://localhost:5000/plugin-manifest.json or http://localhost:5000/app/widget.html

Include Resources

All the files that are required for rendering your widget appears inside the "app" folder of your project.

Starting the Server

To start a local HTTP server that allows to run your app locally and to test it in your sandbox instance, run the following command,

$ zet run

This will run the HTTP server in your local machine in the port number 5000. The port should not be occupied with any other process before starting the server.

To verify whether the server has started successfully, open the following URL in your web browser:
http://127.0.0.1:5000/app/widget.html

Validating and Packaging the Application

To validate your application, run the following command,

$ zet validate

This will validate your app package and identify violations, if any. They should be corrected before updating the zip in our developer console.

To generate an uploadable zip of your application, run the following command,

$ zet pack

This will create a zip file of the application under the "dist" folder of your project directory, which can be uploaded to any ATS.