Salable CLI: Your Gateway to Getting Started

There are many varied ways to interact with the Salable platform, each with their own sets of functionality and recommended uses. In this guide, we’re going to be looking at the Salable Command Line Interface (CLI) and exploring how it can help you.


What is it?


As mentioned above, the CLI is a way of interfacing with Salable and performing actions via a terminal (command line) interface. So, rather than using the web interface to, for example, create an API key - you can run the following command:


salable create api-key


Because the CLI gives you programmatic access to the Salable platform, it can also be utilised in a number of more “automated” usages - such as being a step in a CI/CD pipeline or being utilised as part of a Bash shell script.


How can I access it?


In order to get started with the Salable CLI, you need to install it:


npm install -g @salable/cli


Once that has finished installing, we now need to authenticate with the CLI so it knows which account/organisation it is acting on behalf of.


To start the process of authenticating run:


salable auth


Next, you will be prompted for your email and password. Once you enter these, you will be successfully authenticated and any future CLI commands  you run will be run against this account.


What next?


Now we’ve covered what the CLI is for, how you might want to use it, how to install it, and how to authenticate - you may be wondering what next? The best reading you can undertake to harness the full power of the CLI is our dedicated CLI documentation.


If you’re not ready for that quite yet, let’s first take a look at some common CLI commands to get your feet wet.


If your account has multiple organisations associated with it, you can change which organisation you’re acting on behalf of through the CLI by running the following command and then choosing an org from the list:


salable switch organisation


Similarly, you can also switch which “mode” your account is currently in - “test” mode or “live” mode. This can be done with the following command:


salable switch mode


This, as with the organisation switching, means that any commands you execute via the CLI in the future will have the context of which “mode” you have selected. And don’t worry, you can run the same command again to change back at any time.


Now we have our account set up the way we want, let’s start taking a look at how we can interact with our products, plans, and licenses.


When it comes to products, we can create new ones, deprecate them, or list the existing ones associated with our accounts. Let’s take a look at listing!


salable list products


And, as you’d expect - you can do the same with plans:


salable list plans


And licenses:


salable list licenses


In Conclusion


You now know all you need to know in order to get started with the Salable CLI. As mentioned before, the best place to read further is our comprehensive CLI documentation.


Remember, the CLI is just one of many ways to interact with the Salable platform. We also have a dedicated Node SDK and REST API, which may be better suited to usages in your own application code.


Good luck and go build something awesome!

Related blogs

Tweet from Neal Riley saying "Commercial freedom and flexibility is a must for any digitally enabled business. @SalableApp gives you the tools to build your SaaS business."

Tweet from Neal Riley saying "Commercial freedom and flexibility is a must for any digitally enabled business. @SalableApp gives you the tools to build your SaaS business."

Salable Configure: Configuring Salable Made Easy

Up until now when getting started with Salable, you had two choices for configuring your account, products, plans, etc.

Coner Murphy
24 Nov 2023

Creating and Cancelling Licenses in Test Mode Using the Salable API

Recently, we added the new test mode feature to Salable which gives you a perfect place to experiment with Salable

Coner Murphy
19 Oct 2023

Sign up to
our mailing list

Stay up to date with what we are currently building, plus new features, and chances to enter competitions.