npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@commercelayer/commercelayer-seeder-cli

v1.0.1

Published

Commerce Layer Seeder CLI

Downloads

5

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)

Product import into Commerce Layer

Prices import into Commerce Layer

Inventory import into Commerce Layer

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-marketbusinessModel: 'multi_market'
  • Custom — businessModel: 'custom'

Contributors guide

  1. Fork this repository (learn how to do it).

  2. Clone the forked repository like so:

git clone https://github.com/<your username>/commercelayer-seeder-cli.git && cd commercelayer-seeder-cli
  1. Make your changes and create a pull request (learn how to do it).

  2. Someone will attend to your pull request and provide some feedback.

Need help?

  1. Request an invite to join Commerce Layer's Slack community.

  2. Create an issue in this repository.

  3. Ping us on Twitter.

License

This repository is published under the MIT license.