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

wc-now

v0.2.1

Published

A playground for WordPress and WooCommerce - extends wp-now with WooCommerce defaults and product cloning

Readme

WordPress WooCommerce Playground

A powerful development tool that extends wp-now with WooCommerce-specific defaults and features. This package provides a streamlined way to spin up WordPress environments with WooCommerce pre-configured, including sample products, development tools, and the ability to clone products from existing stores.

Features

  • 🚀 Quick Start: Get a WooCommerce development environment running in seconds
  • 🛍️ Pre-configured WooCommerce: Includes sensible defaults for WooCommerce settings
  • 📦 Product Import: Clone products from any existing WooCommerce store
  • 🔧 Developer Tools: Includes Query Monitor for debugging
  • 🎨 Blueprint Support: Merge custom blueprints with our defaults
  • 🐛 Debug Mode: WordPress debug constants pre-configured for development

Installation

You don't need to install this package globally. Use it directly with npx:

npx wc-now start

Or install globally:

npm install -g wc-now

Usage

Basic Usage

Start a WooCommerce playground with default settings:

npx wc-now start

This will:

  • Install WordPress (latest version) with PHP 8.0
  • Install and activate WooCommerce
  • Configure WooCommerce with sensible defaults
  • Import sample products
  • Set up pretty permalinks
  • Enable debug mode

Clone Products from an Existing Store

Import products from any WooCommerce store that has the REST API enabled:

npx wc-now start --source-url=https://example-store.com

This will fetch up to 10 products from the source store and import them with their:

  • Names and descriptions
  • Prices (regular and sale)
  • Categories
  • Images
  • Stock status
  • SKUs

Custom Blueprint

Merge your own blueprint with our defaults:

npx wc-now start --blueprint=my-custom-blueprint.json

Your custom blueprint will be merged with our defaults, allowing you to:

  • Add additional plugins or themes
  • Override settings
  • Add custom steps
  • Change PHP/WordPress versions

Example custom blueprint:

{
  "preferredVersions": {
    "php": "7.4",
    "wp": "6.3"
  },
  "plugins": [
    "woocommerce-subscriptions",
    "woocommerce-memberships"
  ],
  "steps": [
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "wordpress-seo"
      }
    }
  ]
}

All Options

npx wc-now start [options]

Additional Options:
  --blueprint=<path>     Path to a custom blueprint.json to merge with defaults
  --source-url=<url>     URL of a WooCommerce store to clone products from
  --site-name=<name>     Name for the WooCommerce store (default: "My WooCommerce Store")

All wp-now options are also supported:
  --path=<path>          Path to the WordPress project
  --php=<version>        PHP version (default: 8.0)
  --wp=<version>         WordPress version (default: latest)
  --port=<port>          Port number (default: 8881)
  --reset                Reset the WordPress installation
  --skip-browser         Skip opening the browser

Default Configuration

Included Plugins

  • WooCommerce - The core e-commerce plugin

WooCommerce Settings

  • Currency: USD
  • Country: United States (New York)
  • Tax calculations enabled
  • Coupons enabled
  • Guest checkout enabled
  • Account registration enabled
  • Stock management enabled
  • All payment methods enabled (Check, COD, Bank Transfer)

Development Settings

  • WP_DEBUG: true
  • WP_DEBUG_LOG: true
  • WP_DEBUG_DISPLAY: false
  • SCRIPT_DEBUG: true
  • WP_ENVIRONMENT_TYPE: 'development'

Programmatic Usage

You can also use this package programmatically:

import { generateWooCommerceBlueprint, transformWooCommerceProducts } from 'wc-now';
import { WCStoreApiClient } from 'wc-now/wc-public-api';

// Generate a blueprint
const blueprint = generateWooCommerceBlueprint({
  siteName: 'My Store',
  php: '8.2',
  wp: '6.4',
  additionalPlugins: ['wordpress-seo'],
  products: [] // Your product data
});

// Fetch products from a store
const client = new WCStoreApiClient('https://example-store.com');
const response = await client.getProducts({ per_page: 20 });
const products = transformWooCommerceProducts(response.data);

Blueprint Structure

The generated blueprint includes:

  1. Plugin Installation: WooCommerce and development tools
  2. Plugin Activation: All plugins are automatically activated
  3. Permalinks: Pretty permalinks are configured
  4. Site Options: All WooCommerce settings are configured
  5. Debug Constants: Development constants are defined
  6. Product Import: Either from source URL or default sample data
  7. Helper Scripts: MU-plugins for development assistance

Testing

This package includes comprehensive tests:

# Run unit tests
npm test

# Run integration tests (requires building first)
npm run build
npm run test:integration

# Run all tests
npm run test:all

# Run tests in watch mode
npm run test:watch

Test Structure

  • Unit Tests: Test blueprint generation and product transformation
  • Smoke Tests: Verify CLI functionality without starting a server
  • Integration Tests: Test the full CLI by starting an actual wp-now instance

Requirements

  • Node.js 20 or higher
  • npm or pnpm

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

ISC