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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@elasticpath/epcc-inventory-loader

v1.0.1

Published

Inventory Loader - loads inventory into Elastic Path Composable Commerce.

Readme

epcc-inventory-loader

CLI tool to bulk-load inventory records into Elastic Path Composable Commerce.

Installation

npm install -g @elasticpath/epcc-inventory-loader

Prerequisites

Set the following environment variables before running any command. Use a .env file with --env-file or export them directly in your shell or CI environment.

Required

| Variable | Description | |----------|-------------| | EPCC_CLIENT_ID | Client ID from your EPCC store credentials | | EPCC_CLIENT_SECRET | Client secret from your EPCC store credentials | | EPCC_API_DOMAIN | EPCC API domain, e.g. useast.api.elasticpath.com |

Optional

| Variable | Default | Description | |----------|---------|-------------| | EPCC_CLIENT_RATE_LIMIT | 3 | Maximum API requests per throttle interval | | EPCC_CLIENT_THROTTLE_INTERVAL | 125 | Throttle window in milliseconds | | EPCC_CLIENT_CON_KEEP_ALIVE | true | Enable HTTP keep-alive | | EPCC_CLIENT_CON_KEEP_ALIVE_INTERVAL | 1000 | Keep-alive interval in milliseconds |

Global Options

epcc-inventory-loader [options] <command>

Options:
  --env-file <path>   Path to a .env file to load (default: .env in cwd if present)
  -V, --version       Print version number
  -h, --help          Show help

Commands

load

Load inventory records from a JSONL file into EPCC.

epcc-inventory-loader load [options]

Options:
  -f, --file <path>                Path to the input JSONL file (required)
  --batch-size <number>            Records per processing batch (default: 500)
  --product-batch-size <number>    Products per API filter call, max 100 (default: 100)
  -l, --log-level <level>          Log level: debug|info|warn|error|off (default: info)
  -h, --help                       Show help for this command

Examples

Load inventory from a JSONL file:

epcc-inventory-loader load --file ./inventory.jsonl

Load using a .env file for credentials:

epcc-inventory-loader --env-file ./.env.production load --file ./inventory.jsonl

Load with smaller batches and debug logging:

epcc-inventory-loader load --file ./inventory.jsonl --batch-size 100 --log-level debug

Input Format

The input file must be JSONL (one JSON object per line) following the canonical inventory schema. Each record represents a single inventory entry.

| Field | Type | Description | |-------|------|-------------| | action | string | Operation: increment, decrement, or matchAvailable | | sku | string | Product SKU (mutually exclusive with external_ref) | | external_ref | string | Product external reference (mutually exclusive with sku) | | quantity | number | Quantity to apply |

Example record using SKU:

{"action": "increment", "sku": "SHIRT-BLU-M", "quantity": 50}

Example record using external reference:

{"action": "matchAvailable", "external_ref": "prod-abc123", "quantity": 100}

Actions

  • increment — increases existing stock or creates a new inventory record
  • decrement — decreases existing stock, capped at 0; cannot create new records
  • matchAvailable — sets available stock to an exact value; creates if not found

CI/CD Usage

Export credentials as environment variables and pass the input file:

# GitLab CI example
load-inventory:
  image: node:20
  script:
    - npm install -g @elasticpath/epcc-inventory-loader
    - epcc-inventory-loader load --file ./export/inventory.jsonl
  variables:
    EPCC_CLIENT_ID: $EPCC_CLIENT_ID
    EPCC_CLIENT_SECRET: $EPCC_CLIENT_SECRET
    EPCC_API_DOMAIN: $EPCC_API_DOMAIN

Exit Codes

| Code | Meaning | |------|---------| | 0 | All inventory records loaded successfully | | 1 | Error — see stderr output for details |