You're ready for this Quickstart if you've got the following:
A free trial account
One of the following installed:
MacOS users can install the FreeClimb CLI with Homebrew or npm (Node Package Manager). Windows users can install using npm. Depending on your operating system and preferred package manager, run one of the following commands:
brew tap freeclimbapi/brew && brew install freeclimb
npm install -g freeclimb-cli
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.
npm install -g freeclimb-cli # non-root version
npm install -g freeclimb-cli --unsafe-perm # must be used when running as root
Some users may encounter a 'missing write access' error while installing via npm. To resolve this issue, please enter the following directory:
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.
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 portal.
Use the following command and follow the instructions to get started:
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.
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
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
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.
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.
To test out the CLI, try entering the following command:
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-v12.9.0 USAGE $ freeclimb [COMMAND] TOPICS accounts applications available-numbers call-queues calls ... COMMANDS autocomplete data help login logout
For more details
You can access a complete list of commands, arguments, option flags, and descriptions all in one place on the FreeClimb CLI's GitHub repo.
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:
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
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:
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
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
-T option to this command:
freeclimb calls:make \ +15555550000 \ +17777770000 \ APidexamplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ -T=25
freeclimb applications:create \ --smsUrl=http://myfreeclimbapp.com/sms \ --voiceUrl=http://myfreeclimbapp.com/voice \ --'alias=My FreeClimb App'
freeclimb logs:filter \ 'level="error"' \ --maxItem=5
freeclimb sms:send \ +15555550000 \ +17777770000 \ "Hello from my sample app!"
freeclimb incoming-numbers:buy \ +15555550000 \ -A=APidexamplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ '-a=My New Number'
Install the CLI to explore even more use cases!
Updated about a month ago