Freshworks CLI Setup

Install prerequisites

The FDK is built as a Node.js application and it requires installation of the following components in your system.

  • Node Version Manager/NVM (Optional)
  • Node.js v18.13.0 or later

Note:If Node.js v18.13.0 or later is installed already on the system, skip this section and proceed with the FDK installation via NPM step.

There are following two methods to install the prerequisites.

Use this method to install Node.js v18.18.2 and the FDK together on your system via Homebrew (on MacOS and Linux) or Chocolatey (on Windows).

Note:If you already have Homebrew or Chocolatey installed on your system, skip this section and proceed with the FDK installation step. Otherwise, refer to the following information on installing Homebrew or Chocolatey.

  • For MacOS or Linux: Install the latest version of HomeBrew.

  • For Windows: Install the latest version of Chocolatey.

    Note:If Chocolatey is already installed on your system, run the following command to run PowerShell scripts in the current session, bypassing any execution policy restrictions: Set-ExecutionPolicy Bypass -Scope Process -Force;

Install the FDK + CLI

Based on the installation information provided in the prerequisites section, refer to the steps in the following tabs to install FDK.

Notes:
  • If you already have the FDK v9.0.0 or later, and Node.js v18.13.0 or later installed on your system, you can skip this step and proceed to create an app.
  • If you already have Node.js v18.13.0 or later installed on your system, refer to the information available in the via NPM tab to install FDK.
  1. Run the following command to enable Homebrew to access the Freshworks CLI repository and auto-configure the CLI.

    brew tap freshworks-developers/homebrew-tap
  2. Run the following command to install the latest CLI version.

    brew install fdk

    This command performs the following tasks:

    • Creates the custom_node_location folder in your system.

      Note:The terminal displays the location where the custom_node_location folder is created.

    • Installs Node.js version 18.18.2, compatible with the CLI, into the custom_node_location folder.

    • Installs the Freshworks CLI in the same custom_node_location folder.

  3. Add the following command to the appropriate environment file (.bash_profile, .bashrc, or .zshrc) on your system. This command loads the necessary settings required for using the CLI commands.

    source "$(brew --repository freshworks-developers/homebrew-tap)/path.bash.inc"
  4. Apply the changes made to the environment file in the current terminal by either closing and reopening the terminal or by running the source ~/.{file_name} command. For example, source ~/.bashrc.

  5. Run the following command to verify the CLI installation.

    fdk version

    Ensure that the installed CLI version is 9.1.1 or later.

Notes:
  • To uninstall the currently installed CLI version, use the brew uninstall fdk command.
  • After uninstalling the CLI, to remove the CLI repository from the list of tapped repositories in your Homebrew configuration, use the brew untap freshworks-developers/homebrew-tap command.
  • The Developer portal and SDK Terms of use apply to the use of the CLI.