FreeClimb CLI

Install FreeClimb's CLI to start managing apps, buying numbers, and testing applications from your command line.

👍

You're ready for this Quickstart if you've got the following:

A free trial account
One of the following installed:


Install

MacOS and Windows

MacOS & Windows users can install the FreeClimb CLI with npm (Node Package Manager). Run the following command:

npm install -g freeclimb-cli

Linux

Linux requires further prerequisites before you can install the CLI. Run one of the following commands based on your distribution:

sudo apt-get update
sudo apt-get install libsecret-1-dev
yum install libsecret-devel

You can install the FreeClimb CLI with npm (Node Package Manager), which comes with Node.js. Based on your environment, run one of the following commands to install.
Either:

npm install -g freeclimb-cli # non-root version

or:

npm install -g freeclimb-cli --unsafe-perm # must be used when running as root

Install troubleshooting

Some users may encounter a 'missing write access' error while installing via npm. To resolve this issue, please enter the following directory:

cd /usr/local/lib

Run:

chmod u+w node_modules

If write access still has not been updated, try adding sudo to the beginning of the command:

sudo chmod u+w node_modules

Once doing this, return to you home directory and try install again.


Log in to the CLI

To login and start using the FreeClimb CLI, you will need your account ID and API key, both which can be found on your dashboard.

896

Your API credentials can be copied from your dashboard homepage.

Use the following command and follow the instructions to get started:

freeclimb login

Running the login command automatically overrides any saved FreeClimb API credentials and prompts you to enter new ones. Please note that you will see a message about this upon first login. Respond Y to enter your credentials for the first time. Once logged in, your account ID and API key will be saved for future CLI use unless you re-run freeclimb login. If you would like to use the FreeClimb CLI with a different account, run this command and enter the credentials associated with the other account.

Login troubleshooting

If your operating system is Ubuntu or CentOS, running freeclimb login may result in an error referencing org.freedesktop.DBus or a similar path. If this happens to you, try the following commands:

yum install libsecret-devel gnome-keyring xorg-x11-server-Xvfb dbus dbus-x11 -y
"dbus-uuidgen > /var/lib/dbus/machine-id"
mkdir -p ~/.local/share/keyrings
mkdir -p ~/.cache
echo 'export $(dbus-launch); echo "" | gnome-keyring-daemon --unlock; /usr/bin/gnome-keyring-daemon --components=secrets,pkcs11,ssh --start --daemonize; export $(echo "" | /usr/bin/gnome-keyring-daemon -r -d --unlock)' >> ~/.bashrc
source ~/.bashrc
sudo apt-get -y update
sudo apt-get install -y libsecret-1-dev gnome-keyring xvfb xorg dbus dbus-x11
mkdir -p ~/.local/share/keyrings
echo 'export $(dbus-launch); echo "" | gnome-keyring-daemon --unlock; /usr/bin/gnome-keyring-daemon --components=secrets,pkcs11,ssh --start --daemonize; export $(echo "" | /usr/bin/gnome-keyring-daemon -r -d --unlock)' >> ~/.bashrc
source ~/.bashrc

Install CLI autocomplete

The CLI autocomplete allows you to tab through commands and speed up your work flow. To install autocomplete, run one of the two commands below depending on your shell:

freeclimb autocomplete bash
freeclimb autocomplete

After entering one of the above commands, make sure to copy and paste the outputted print command to complete install of the autocomplete on your shell.


Explore FreeClimb's CLI

What is FreeClimb's CLI?

Developers use FreeClimb in a variety of ways. Some complex, information-heavy tasks are better suited to our dashboard portal, like exploring logs or usage. But for less complex tasks, FreeClimb's CLI helps developers build and test their FreeClimb applications in faster, scalable, less memory-exhaustive ways, right from their command line. Want to quickly send an SMS? Find a specific log? Test an application? Update application endpoints? Automate repetitive tasks? With the CLI, you can do each of these and more by running a single command in your terminal. Follow the instructions below to start integrating the FreeClimb CLI into your workflow.

For more detailed information about the FreeClimb CLI, including a full list of commands, arguments, and option flags, visit the CLI's GitHub repo.

Begin exploring

To test out the CLI, try entering the following command:

freeclimb

Once you enter this command, you should see a list of possible topics and commands and their associated descriptions provided by the CLI. It will look something like this:

VERSION
  freeclimb-cli/0.0.0 darwin-x64 node-v14.17.6
  
USAGE
  $ freeclimb [COMMAND]
  
TOPICS
  accounts
  applications
  available-numbers
  call-queues
  calls
  ...
  
COMMANDS
  autocomplete
  data
  help
  login
  logout

📘

You can access a complete list of commands, arguments, option flags, and descriptions all in one place on the FreeClimb CLI's GitHub repo.

Topics v. commands

Commands, when run, lead to some sort of action, such as making a call or outputting error logs. Topics are basically names of command groupings. To see commands included in each topic, simply run freeclimb and the topic of your choice. For example, if you wanted to see all available commands for calls, you would enter:

freeclimb calls

Doing this will then show a list of available commands contained within that topic:

USAGE
  $ freeclimb calls:[COMMAND]
  
COMMANDS
  freeclimb calls:get
  freeclimb calls:list
  freeclimb calls:list-call
  freeclimb calls:list-call-logs
  freeclimb calls:make
  freeclimb calls:update

Although most commands are organized by topic, there are some stand-alone commands, such as freeclimb help or freeclimb logout.

Arguments and options

Many commands require specific arguments and include options (sometimes referred to as flags) to help you filter or add details. To see these different options, simply add the --help option to the end of a command. For example, let's say you're curious about how to make a call using the CLI. You would enter:

freeclimb calls:make --help

This would ultimately output:

USAGE
  $ freeclimb calls:make FROM TO APPLICATIONID
  
ARGUMENTS
  FROM
  TO
  APPLICATIONID
  
OPTIONS
  -I, --ifMachineUrl=ifMachineUrl
  -P, --parentCallId=parentCallId
  -T, --timeout=timeout
  -W, --sendDigits=sendDigits
  -h, --help
  -i, --ifMachine=ifMachine

Actual output will also include descriptive information for each argument and option flag.

📘

Use Option Flags Faster

When you use option flags, you can run them two ways, using the full option name or a quick short-hand character:
1. --alias=aliasname
2. -a=aliasname

To see options and their short-hand versions, you can always add the --help or -h option flag to any command.

Arguments must be entered as part of the command in order to run. Not all commands require arguments but in the case of freeclimb calls:make, you would need to include phone numbers for FROM and TO as well as an Application ID. Options are available to add more details about the call but are not required.

For example, let's say you wanted to make a call right from your terminal. You would run something like this:

freeclimb calls:make \
  +15555550000 \
  +17777770000 \ 
  APidexamplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Let's say you wanted to add timeout information using the --timeout or -T option to this command:

freeclimb calls:make \
  +15555550000 \
  +17777770000 \ 
  APidexamplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ 
  -T=25

Other use cases

Create a new application with URLs

freeclimb applications:create \
  --smsUrl=http://myfreeclimbapp.com/sms \
  --voiceUrl=http://myfreeclimbapp.com/voice \ 
  --'alias=My FreeClimb App'

List logs

freeclimb logs:list

Filter logs for the last 5 error messages using PQL

freeclimb logs:filter \
  'level="error"' \
  --maxItem=5

Send an SMS

freeclimb sms:send \
  +15555550000 \
  +17777770000 \
  "Hello from my sample app!"

Buy a phone number

freeclimb incoming-numbers:buy \
  +15555550000 \ 
  -A=APidexamplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
  '-a=My New Number'

Install the CLI to explore even more use cases!


Related Content