Saleor provides a convenient command-line tool to speed the development around Saleor. Using our CLI you can interact with the Saleor platform using a terminal or through an automated system to quickly create and manage Saleor environments, test storefront installation and deploy to cloud providers such as Vercel or Netlify, and more.
Installing the CLI
$ pnpm i @saleor/cli -g
$ npm i @saleor/cli -g
From now on, you can interact with the Saleor CLI using the
saleor name. If run with no parameters, it will show all available commands
Login with you Saleor Could account:
saleor login command allows you to establish the current user session in CLI. This will initiate an OAuth process. A browser window will open with the Saleor Cloud login page. Once authenticated, the CLI will receive an authentication token that will be stored locally for the CLI to access.
If your environment doesn't support browser use the
--headless flag. The CLI will prompt for an Access Token skipping the need of browser operations. Create the Access Token at https://cloud.saleor.io/tokens.
Video introduction to Saleor CLI
The following options can be used with all available commands
saleor environment --help
Output the data as JSON
saleor environment list --json
Output data as text
saleor environment --short
Saleor instance to work with
saleor app install --instance="https://vercel.saleor.cloud"
Show version number