Getting started with Flex CLI
This tutorial shows you how to get started with the Flex CLI. You will learn how to log in with your API key, how to use the help command and other basic commands.
- basic command line
- text editing
Table of Contents
Flex CLI (Command-line interface) is a tool for changing your marketplace's advanced configurations such as transaction processes and email templates.
For this tutorial you should have basic knowledge of command-line and how to run basic commands.
Now, let's get started!
Flex CLI is distributed via npmjs. To install packages from npmjs, you will need to download and install Node.js development environment:
When you have installed Node.js and Yarn, type the following command to install Flex CLI:
yarn global add flex-cli
To verify that Flex CLI was successfully installed, run:
This command should show you the CLI version and list available commands.
flex-cli help is the command to see the list of available commands:
In order to see subcommand help, pass the command as an argument for the
flex-cli help command. For example, let's see help for command
flex-cli help login
To log in you need to have a personal API key.
To get an API key, log in to Console go to Account > API keys.
After you've received your API key, you can log in
flex-cli login command. First, let's see help for the login
flex-cli help login
You can see that the command does not require any additional options. So let's run it:
The command will prompt you your API key.
After successful log in, you will be greeted by your admin email address.
Once logged in, you can work with any marketplace that you have been granted access to.
Now that you have successfully logged in and know how to use the
command, let's use CLI to list processes and process versions in your
The command to list processes is
process list. Let's see the help
flex-cli help process list
As you can see, the command requires
MARKETPLACE IDENT option. You can
use either the long form
--marketplace <marketplace ident here> or
-m <marketplace ident here>. Optionally the command takes
--process PROCESS NAME parameter to get detailed information about a
Let's list all the processes:
flex-cli process list -m my-test-marketplace
This command shows you a list of transaction processes in your marketplace.
In this tutorial, we installed Flex CLI, logged in using an API key and
tried some example commands. In addition, we familiarized ourselves with
help command that is the main source of documentation for the Flex
Now that we know how to list processes, the next this is to make a small change to the existing process.