Install CLI

Install Command Line Interface (CLI)

Zet is a command line interface that helps developers build and package widgets in Zoho Creator. The Command Line Interface, or CLI, is used to send commands to a software program as lines of texts in order to interact with it. This interaction includes typing commands into the interface and receiving responses to them. This text-based interface has its basis in the Graphical User Interface (GUI) but provides a mechanism that is easier to use. Developers use CLIs to create applications, software, and operating systems.

Zoho Creator enables you to create and integrate a widget using CLI.

Prerequisites to install CLI

  • Download the nodejs source code from "https://nodejs.org/en/download/"
  • Use the following command to verify the installation:
    $ node -v
    $ npm -v

Install CLI

  1. Run the following command to install the zapps cli node package:
    $ npm install -g zoho-extension-toolkit
     
  2. Run the following command to ensure that the installation is successful:
    $ zet // Help information about 'zet' command will be shown.
     

Create a project

  1. Run the following command to create new project:
    $ zet init

    The list of Zoho Services you need to create a project template for will appear.

  2. Select Zoho Creator and create a Project Folder.
  3. Include resources: All the files that are required for rendering your widget will appear inside the "app" folder of your project.

Start server

  1. Run the following command to start a local HTTP server that allows you to run your app locally and to test it in your sandbox instance:
    $ zet run

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

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

Validate and package the application

  1. Run the following command to validate your application:
    $ zet validate

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

  2. Run the following command to generate a zip of your application that can be uploaded:
    $ zet pack

    This will create a zip file of the application in the "dist" folder of your project directory. This zip file needs to be uploaded to the Zoho Creator.

Related Topics

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com