saleor
saleor
npm i saleor
saleor

saleor

Command-line interface allowing interaction with Saleor Cloud environments.

by saleor

1.16.0 (see all)License:BSD 3-ClauseTypeScript:Not Found
npm i saleor
Readme

Saleor CLI is designed to boost your productivity and improve development experience with Saleor and Saleor Cloud. It will take the burden of spawning new storefronts and apps locally, managing and connecting them with Saleor instances, or establishing tunnels for local development in seconds.

To install the latest version of Saleor CLI, run the following command:

npm i -g @saleor/cli

You can also use npx to execute the Saleor CLI commands on the spot without installing the package.

npx saleor env list

If you're using nvm, make sure that the NVM_BIN path is added to PATH

Getting Started with CLI

A quick demo

If you're new to Saleor you might want to start by bootstrapping an end-to-end local storefront development environment (and Saleor Cloud sandbox API instance). Since it requires Cloud access, you will be asked to register to a free Saleor Cloud developer account or log in. Then the command will automatically create your new local storefront environment and connect it to a newly created Saleor API instance/sandbox:

saleor storefront create --demo

Register

If you don't have a (free developer) Saleor Cloud account yet, create one with the following command:

saleor register

Login

The saleor binary requires the Cloud API token that can be obtained via OAuth by running the login command:

saleor login

This command will open a browser and ask for your Saleor Cloud credentials. Once logged in, it will store your Cloud API token locally for the CLI to use.

You can now start executing any of the available commands.

Note: in order to log out you can use saleor logout.

Create a storefront

The following command will take you through the process of creating a new react-storefront and configuring it with a chosen Saleor Cloud API instance:

saleor store create my-new-storefront

Create an API sanbox

You can create new API endpoints by running:

saleor env create

Saleor Apps management 🦄

Please check out the Saleor App Template docs for the latest documentation.

Webhooks management

Coming soon 🔌

Usage

Usage: saleor <command> [options]

Commands:
  saleor info                    Hello from Saleor
  saleor login                   Log in to the Saleor Cloud
  saleor logout                  Log out from the Saleor Cloud
  saleor configure [token]       Configure Saleor CLI
  saleor register                Create Saleor account
  saleor trigger [event]         This triggers a Saleor event
  saleor organization [command]                                   [aliases: org]
  saleor environment [command]                                    [aliases: env]
  saleor backup [command]
  saleor job [command]
  saleor project [command]
  saleor storefront [command]                                   [aliases: store]
  saleor telemetry [command]                                     [aliases: tele]
  saleor webhook [command]                                       [aliases: hook]
  saleor app [command]
  saleor vercel [command]
  saleor github [command]
  saleor checkout [command]

Options:
      --json     Output the data as JSON                               [boolean]
  -V, --version  Show version number                                   [boolean]
  -h, --help     Show help                                             [boolean]

for more information, find the documentation at https://saleor.io

Development

Install dependencies

This project uses pnpm for managing dependencies

pnpm install

Run Watch Mode

pnpm watch

Run CLI

node build/cli.js ...

Downloads/wk

523

GitHub Stars

17

LAST COMMIT

4mos ago

MAINTAINERS

4

CONTRIBUTORS

6

OPEN ISSUES

41

OPEN PRs

1
VersionTagPublished
1.16.0
latest
13hrs ago
1.17.0-rc.2
next
11hrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate