Install Catalyst CLI

Introduction

Catalyst CLI contains a set of tools that enable you to initialize projects, and develop, test, and deploy the components of your applications and microservices from your local machine. The CLI includes commands and operations applicable to most Catalyst services, such as Cloud Scale, Serverless, or SmartBrowz. You can learn about the CLI commands available and access detailed help with the CLI from the CLI Documentation.

Note: The CLI works with the development environment of your Catalyst project. Therefore, the activities that you perform using the CLI, such as creating a function or deploying a client to the remote console, are not reflected in the live production environment of the project. To enable them in the production environment of your application, you must deploy your project to the production environment.

Supported OS:

  • Windows
  • macOS
  • Linux

You can install Catalyst CLI in any of the supported operating systems in the same way as discussed in this help page. Catalyst CLI offers the same CLI functionalities across all platforms. After you have installed Catalyst CLI, you can work with your Catalyst projects and build applications directly from your system’s terminal.

Pre-requisities

Before you install Catalyst CLI, you must have the following prerequisites installed in your system.

Node.js and Node Package Manager (NPM):

Catalyst CLI can be installed through NPM or the Yarn package manager.

You can therefore install NPM on your system to install the CLI directly, or install the Yarn package manager using NPM and then install the CLI with it.

To check if you already have Node.js and NPM installed, execute the following commands in your terminal which display their installed versions, if present:

copy
$
node -v

copy
$
npm -v


If you don’t have them installed, you can download Node.js for your platform from their official website, or use a Node version manager like NVM to install Node.js and NPM. NPM comes bundled with Node.js when you install it.

Refer to the Node.js help documentation or NPM documentation for further help.

Note: Catalyst CLI will only run on Node.js v14 or later. Ensure that you install an appropriate version.

Programming Language Support:

You can develop server-side functions in the following language environments in Catalyst:

  1. Node.js
  2. Java
  3. Python

Before you do so, you must ensure that you have installed all the required components of these language environments in your local system.

Note: You can install these programming language prerequisites only if you plan on intializing Catalyst functions from the CLI, and for the stacks you require.

Because you have installed Node.js in the previous step, the components required to develop Node.js functions will already be available in your system.

You can also manually install a supported runtime of Node.js and the corresponding supported SDK package to develop functions in that runtime.


Java: To develop Java functions, install the relevant Java Development Kit (JDK) in your system for your platform. You must install:

Refer to the JDK documentation for further help.

Note: Catalyst currently only offers support for version 8, 11, and 17 of the Java SE Development Kit. If you do not have the exact version installed in your machine, we recommend that you install the exact JDK for optimum performance.

Python: To develop Python functions, install Python version 3.9 from their official website for your platform and the Python Package Manager, Pip. The Pip package manager will be auto-installed in your local system if you install Python from their official source.


Install the CLI

You must install Catalyst CLI in your system using the terminal in the administrator mode, as this command execution requires admin privileges. You can run the terminal as administrator in your Windows environment, or execute the installation command using sudo in a UNIX command like, such as in macOS or Linux systems.

You must execute the following command in your terminal to install Catalyst CLI:

copy
$
npm install -g zcatalyst-cli

If you are installing it through the Yarn package manager, execute the following command in your terminal:

copy
$
yarn add zcatalyst-cli

This will initiate the installation process and your terminal will display the progress.

After the installation is complete, the CLI will display these details.

You can verify if the CLI was properly installed by executing the following command:

copy
$
catalyst --version

If there were no issues with the installation, the command will return the version of the CLI installed in your system.

You will now be able to access the catalyst command from your terminal.

You can refer to the CLI documentation from the Catalyst resources page for help with the CLI commands.


Update Catalyst CLI to the Latest Version

When a newer version of the Catalyst CLI is available, your terminal will display a message alerting you of it, after you execute a CLI command successfully.


To update your CLI, execute the following command in your terminal:

copy
$
npm install -g zcatalyst-cli

This will initiate the installation process for the latest version.

Note:
  • In some cases, your system’s registry values might not reflect the latest version of Catalyst CLI. This might cause your system to retain the older version of the CLI. To avoid this, mention the version number while executing the command. For example, to update to the version 1.9.0, run $ npm install -g zcatalyst-cli@1.9.0

  • If you are unable to update Catalyst CLI, execute the command using sudo.


Last Updated 2024-04-19 12:56:16 +0530 +0530