Getting started with Sharetribe CLI
Sharetribe 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!
Install Sharetribe CLI
Sharetribe 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 Sharetribe CLI:
yarn global add @sharetribe/cliNOTE: If you are working with Yarn Modern, use this command instead:
yarn dlx add @sharetribe/cliTo verify that Sharetribe CLI was successfully installed, run:
sharetribeThis command should show you the CLI version and list available commands.
Didn’t work? Have a look at the Troubleshooting.
We republished the Sharetribe CLI NPM package under the name
@sharetribe/cli in November 2026 and deprecated the previous
flex-cli package.
You can still use any existing flex-cli
installation you have with the features it contains (up to version
1.17.0). New features will only be released to the @sharetribe/cli
package.
Help
sharetribe help is the command to see the list of available commands:
sharetribe helpIn order to see subcommand help, pass the command as an argument for the
sharetribe help command. For example, let’s see help for command
login.
sharetribe help loginGet an API key
To log in you need to have a personal API key.
To get an API key, log in to Console then click your email address in the bottom left of the sidebar and click Manage API keys .
Log in
After you’ve received your API key, you can log in
with sharetribe login command. First, let’s see help for the login
command:
sharetribe help loginYou can see that the command does not require any additional options. So let’s run it:
sharetribe loginThe 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.
List processes and process versions
Now that you have successfully logged in and know how to use the help
command, let’s use CLI to list processes and process versions in your
marketplace.
The command to list processes is process list. Let’s see the help
first:
sharetribe help process listAs you can see, the command requires MARKETPLACE_ID option. You can
use either the long form --marketplace <marketplace id here> or short
form -m <marketplace id here>. You can find the Marketplace ID from
Sharetribe Console on the
Build > General page.
Optionally the command takes --process PROCESS NAME parameter to get
detailed information about a single process.
Let’s list all the processes:
sharetribe process list -m demomarketplace-testThis command shows you a list of transaction processes in your marketplace.
Summary
In this tutorial, we installed Sharetribe CLI, logged in using an API
key and tried some example commands. In addition, we familiarized
ourselves with the help command that is the main source of
documentation for the Sharetribe CLI. We also learned how to disable and
enable the listing approval functionality for our marketplace.
Now that we know how to list processes, the next this is to make a small change to the existing process.
Troubleshooting
sharetribe: command not found
If you’re seeing sharetribe: command not found error and you installed
Sharetribe CLI with Yarn, you need to add
Yarn global bin path to the PATH environment variable .
On Windows
- Run
yarn global binto see the global bin path - Add it to PATH environment variable
- Restart command line
For a step-by-step guide with screenshots, have a look at this blog post: ‘yarn global add’ command does not work on Windows
On Mac
- Open your shell configuration file. If you are using zsh, it will
be
.zshrc. - Add
export PATH="$(yarn global bin):$PATH"to the config file. - Restart terminal