@commercelayer/commercelayer-seeder-cli
v1.0.1
Published
Commerce Layer Seeder CLI
Downloads
3
Readme
Commerce Layer Seeder CLI
A CLI that lets you import predefined seed data into a Commerce Layer organization.
What is Commerce Layer?
Commerce Layer is a headless commerce platform and order management system that lets you add global shopping capabilities to any website, mobile app, chatbot, or IoT device, with ease. Perfect fit for the best-of-breed CMSs, static site generators, and any other tools you already master and love, our blazing-fast and secure API will help you make your content shoppable on a global scale.
Table of contents
How it works
This seeder is the easiest way to bulk import a set of products, the related prices, and inventory — based on one of the available business models — into your organization and start using Commerce Layer right away.
Getting started
To be ready to use the Commerce Layer Seeder CLI, you need to install it and then get the credentials that will allow you to manage your organization in Commerce Layer.
Installation
Commerce Layer Seeder is available as an npm package:
// npm
npm install -g @commercelayer/commercelayer-seeder-cli
// yarn
yarn global add @commercelayer/commercelayer-seeder-cli
Import
Run the command below to import a set of products, related prices, and inventory into your organization.
commercelayer-seeder -i your-client-id -s your-client-secret -e https://<yourdomain>.commercelayer.io
Usage
The seeder options
-i, --clientId <your-client-id>
— your Commerce Layer application client ID (required)-s, --clientSecret <your-client-secret>
— your Commerce Layer application client secret (required)-e, --endpoint <https://yourdomain.commercelayer.io>
— your Commerce Layer organization endpoint (required)-b, --businessModel <business-model>
— the kind of business model you want to import (optional / default:multi_market
choose among this list)-m, --maxItems <max-items>
— the maximum number of SKUs that will be imported (optional / default: all)-u, --resourcesUrl <resources-url>
— the resources URL or local path (optional / default: our seeds directory)
Available business models
Commerce Layer provides a set of predefined business models so that you can choose and import your stater one based on your needs and business requirements. These are the business models available at the moment (more to come):
- Multi-market —
businessModel: 'multi_market'
- Custom —
businessModel: 'custom'
Contributors guide
Fork this repository (learn how to do it).
Clone the forked repository like so:
git clone https://github.com/<your username>/commercelayer-seeder-cli.git && cd commercelayer-seeder-cli
Make your changes and create a pull request (learn how to do it).
Someone will attend to your pull request and provide some feedback.
Need help?
Request an invite to join Commerce Layer's Slack community.
Create an issue in this repository.
Ping us on Twitter.
License
This repository is published under the MIT license.