Install CLI - Widgets

Install CLI - Widgets

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

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 CRM.

Install the necessary components

Pre-requisites

  1. $ node -v
  2. $ npm -v

Installing the CLI

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

  1. $ npm install -g zoho-extension-toolkit

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

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

Create a project

Run the following command to create new project.

  1. $ 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,

  1. $ 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,

  1. $ 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,

  1. $ zet pack

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

    • Related Articles

    • Install CLI - Web Apps

      ZET is a CLI tool to help developers build client-based apps(marketplace apps) and test it locally. Developer's can write code in local app and test it on the fly without uploading the App files to server. ZET will help the developers in the ...
    • Working with Widgets

      Widgets are components that bring additional functionality to your CRM. Set up widgets in your CRM to incorporate various external services and make them work in CRM. Currently Zoho CRM supports 4 types of Widgets. They are the ones which are added ...
    • Create extensions using Command Line Interface(CLI)

      Zoho Sigma helps you to build extensions for Zoho services in two ways:  Building apps using the command line interface (CLI). You can use this method if you want to build an extension offline with your own code editor. Use Zoho Sigma cloud editor ...
    • Widgets-Overview

      What is a widget? A widget is a simple application or extension that helps users easily access specific links or features. For example, links that members access often can be added as a Quick link widget, Upcoming events or Pending tasks can be ...
    • Widgets-Overview

      What is a widget? A widget is a simple application or extension that helps users easily access specific links or features. For example, links that members access often can be added as a Quick link widget, Upcoming events or Pending tasks can be ...