- Introduction
- Getting started
- Signing up a Freshworks developer
Introduction
Freshworks allows developers to build innovative applications on its SaaS platform using a best-in-class developer platform. It enables developers by providing high-quality developer resources to build and scale applications easily. Furthermore, it allows developers to monetize the applications built on the platform, thereby building a recurring stream of revenue. In this section, you will learn how to install the Freshworks Developer CLI utility aka FDK CLI, which allows a simplified application development experience.
Getting started
If you are new to the Freshworks Developer ecosystem, this segment will help you get started. There are three significant steps
- Sign up as a Freshworks developer
- From the developer account subscribing to a Freshworks product of your choice as shown here
- To perform Local CLI setup
Freshworks CLI (FDK) depends on Node.js and is required to develop an application in the Freshworks developer platform. Check the last section to uninstall the existing installed prerequisites or some of them.
To install FDK, you need to install:
- NVM
- Node
Signing up a Freshworks developer
- If you already have an account with us skip this step
- By clicking the link and providing the necessary details Developer Sign up
- Bookmark the developer account link for future reference
- Refer to detailed instructions from here
From the developer account subscribing to a Freshworks product
- If you already have an account with us skip this step
- When landed on App Management Portal (AMP) you will be asked to signup for at least one product to get started with
- Select the product of your choice and signup
- Refer to detailed instructions on Product Sign Up when in doubt
Local setup
Kindly ensure you have gone through the Introductory guide to Freshworks app development if haven’t done already
How to get the necessary setup done?
If you already have Node v18.13.0 or above in your workspace, skip this step and navigate to, else follow the instructions given below as per applicability.
1. Ensure you have NVM Setup locally
The NVM installation instructions defer based on the platforms. Choose the steps for the respective operating system and follow the instructions to install the CLI. Choose the steps as per your operating system and follow the instructions given below
MacOS
- Install
brew
using the command below. Skip this step if already havebrew
installed locally# run the below command via terminal /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Verify the installation brew version
- Install NVM via brew
# run the below command via terminal # install nvm brew install nvm
- Add nvm to your shell profile: To make nvm available every time you open a new terminal window, you will need to add the following line to your shell profile (e.g., ~/.bash_profile or ~/.zshrc):
source $(brew --prefix nvm)/nvm.sh
- Verify the NVM version
# verify version nvm --version # output should be v0.39.1 or higher
Ubuntu
- Patch your system with the latest software updates
# Update your system software # When prompted enter the admin user credentials to execute the command sudo apt update && sudo apt upgrade -y
- You must have cURL installed
# run the below command sudo apt install curl
- Download and execute the installer script using the following Command
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
- NVM keeps all files under the
$HOME/.nvm
directory. Then it sets the environment in the user’s.bashrc
file. You need to load this environment to set the required configuration by running the following command:source ~/.bashrc
- Verify the NVM version
# verify version nvm --version # output should be v0.39.1 or higher
Windows
This is an optional step for Windows users if you wish to use only a single version of Node
If you wish to download and install multiple versions of Node JS for development purposes then only follow these steps
For Windows users there are multiple node installation options, choose any one of them as listed below
Install via installers
Install via Chocolatey package manager
- Launch the PowerShell in Admin mode
- Run the following command
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- Verify Chocolatey installation using the command given below
choco -v
- Install NVM via Chocolatey package manager
# install nvm choco install nvm
- Verify NVM installation
nvm --version # output should be v0.39.1 or higher
Install inside Windows Subsystem for Linux
- Open WSL2 for Ubuntu from the start menu
- If you don’t already have it, install curl
sudo apt-get install curl
- Run the NVM installation script as shown below
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
- The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
CentOS/RHEL7
- Patch your system with latest software updates
# Update your system software sudo yum update
- You must have cURL installed
# run below command sudo yum install curl -y # when prompted enter the admin user credentials to execute the command
- Download and execute the installer script using the following Command
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
- NVM keeps all files under the
$HOME/.nvm
directory. Then it sets the environment in the user’s.bashrc
file. You need to load this environment to set the required configuration by running the following command:source ~/.bashrc
- Verify the NVM version
# verify version nvm --version # output should be v0.39.1 or higher
2. Install Node
If you already have Node version installed locally with v18.13.0 or higher, skip this step and navigate to 6.4
There are multiple options to install Node, choose any one of the following.
Installation Using NVM
- Check if you have an existing NVM installation and is pointing to the right version
nvm -v # output should be v0.39.1 or higher
- Use NVM to install Node 18
nvm install 18 # output should be similar to "Downloading and Installing node v18.13.0 or higher" # Towards completion you should see similar to "Now using node v18.13.0 (npm v9.5.0)"
- Verify the Node version
node -v # output should be higher than v18.13.0
- Set default alias for Node 18
nvm alias default 18 # default -> 18 (v18.13.0) or higher
Installation Using Installers
- Download the setup for Node from here as applicability
- Follow the installation steps in the installer when prompted
Installation using other package managers
-
For CentOS
dnf module install nodejs:18/common
-
For Windows
winget install OpenJS.NodeJS
3. Install build tools
```sh
# for first-time users, using Node JS on Mac
xcode-select --install
# verify you have xcode cli installed
xcode-select -p
```
4. Install the latest version of FDK
If you are already using FDK version 9.0.0 or higher, skip this step.
If you are installing FDK for the first time, follow the instructions under the “Fresh installation” section
If you are using an FDK version lower than 9.0.0, follow the instructions under the “Upgrade the existing version of FDK CLI” section
Fresh installation
- Use Node Package Manager (NPM) to install the latest Freshworks CLI
npm install https://cdn.freshdev.io/fdk/latest.tgz -g
- Verify the installation using the command below
fdk -v
Upgrade the existing version of FDK CLI
- For existing Users of FDK CLI with version <9.0.0, remove the existing version of FDK using the command given below
npm uninstall fdk -g
- Remove the
~./fdk
folder manually using the command given below# remove the ~/.fdk folder rm -r ~/.fdk
- Use Node Package Manager (NPM) to install the latest Freshworks CLI
npm install https://cdn.freshdev.io/fdk/latest.tgz -g
- Verify the installation using the command below
fdk -v
Installation summary
Towards the end of it, your output should be the same or higher than the listed versions
#for nvm -v
0.39.3
# for node -v
v18.16.0
# for npm -v
9.6.3
# for fdk -v
9.0.2
Once completed create your first Freshworks application using app development guide
Uninstall the dev environment
For removing the existing environment to start afresh, proceed with the following steps.
Uninstall FDK
- Run command,
npm uninstall fdk -g
- To remove FDK-related files, run the command,
rm -rf ~/.fdk
Uninstall Node
- If installed through NVM:
- Uninstalling NVM will remove all the Node versions installed with it. Check out the next section to uninstall NVM.
- If installed directly using the source or another tool, remove the Node manually from the installed folder where it is installed and remove the Node path variable.
- For Windows, it would be easy to uninstall Node on GUI provided by the OS.
Uninstall NVM
- Take a look at the official documentation.
Furthermore, we have a lot of developer resources, do check them out.