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

create-commercengine

v0.1.0

Published

Scaffold a Commerce Engine storefront — from a production starter or from scratch.

Readme

create-commercengine

Scaffold a Commerce Engine storefront — from a production starter, or by adding Commerce Engine to a project you already have.

npm  create commercengine@latest
pnpm create commercengine@latest
bun  create commercengine@latest
yarn create commercengine

What it does

Clone a starter. Downloads one of the production storefronts and turns it into a standalone project you can install and run.

Start from scratch. Writes the Commerce Engine integration layer — client, config, capability wiring, .env — into a project you already scaffolded with your framework's own tool.

Options

Every prompt has a flag, so CI and coding agents never hit an interactive question.

| Flag | | |---|---| | --mode <starter\|existing> | what to start from | | --template <slug> | linea · little-things · soja | | --framework <id> | react · next · tanstack · astro · sveltekit · node | | --no-checkout | omit Hosted Checkout | | --no-seo | omit SEO & AEO | | --no-agent-tools | omit agent tools | | --store-id <id> | Commerce Engine store ID | | --api-key <key> | Storefront API key | | --env <sandbox\|live> | defaults to sandbox | | --tooling <id> | biome · oxlint · eslint · none — defaults to biome | | --workspace | keep the monorepo shape instead of flattening | | -y, --yes | accept defaults, skip prompts | | -h, --help | |

Capabilities are opt-out rather than a list, so --yes and the default answer cannot disagree. They apply to --mode existing only: a starter arrives with all four wired into its pages, and there is no honest way to subtract one at download time. Passing them with a starter prints a warning saying so.

# a full storefront
npm create commercengine@latest my-store -- \
  --template soja --framework next --tooling biome --yes

# add Commerce Engine to a project you already have
npm create commercengine@latest . -- \
  --mode existing --framework next --no-agent-tools --yes

Why starters need more than a subdirectory download

The starters live in a monorepo, and each app depends on sibling workspace packages:

// apps/soja-next/package.json
"@ce/soja-shared": "workspace:*",
"@ce/soja-ui":     "workspace:*"

Extracting the app on its own produces a directory that cannot install — workspace: only resolves inside the workspace that declares it, so npm install fails on EUNSUPPORTEDPROTOCOL before downloading anything.

So the CLI walks that dependency closure, downloads every package the app needs, and flattens the result into a single package:

my-store/
├── package.json          no workspaces, no workspace: ranges
├── biome.json
└── src/
    ├── app/ …            the app
    ├── ui/               was packages/soja-ui
    └── shared/           was packages/soja-shared

Import specifiers are rewritten onto the app's existing @/* alias, the vendored packages' own dependencies are merged into the manifest, and stylesheet @imports become relative paths — PostCSS resolves those itself and does not understand the tsconfig alias.

The result installs with npm, pnpm, yarn or bun alike, because nothing workspace-shaped survives. Pass --workspace to keep the monorepo layout instead; it is useful mainly for tracking upstream changes to the starter.

The catalog lives in the starter repo

Templates and frameworks are read from starters.json at the root of tark-ai/ce-starter-projects at runtime, with a bundled fallback for offline use.

Adding a template or a framework is therefore a one-file change in the starter repo and needs no release of this CLI.

Capabilities

| | | |---|---| | Storefront SDK | @commercengine/storefront — always installed | | Hosted Checkout | @commercengine/checkout | | SEO & AEO | @commercengine/seo | | Agent tools | @commercengine/ai |

All optional capabilities are selected by default. An SEO-first, AI-first storefront is the intended shape; opting out should be deliberate.

Credentials

Store ID and Storefront API key come from the Admin Portal at https://<your-subdomain>.commercengine.io/organisation/apikeys.

The API key is scoped to a single channel. Products assigned to a different channel will not appear, and the API returns an empty list rather than an error — so an empty catalog usually means channel scoping, not a broken integration. See Credentials & channels.

Development

pnpm build
node dist/index.js my-store --template soja --framework nextjs --yes

Testing locally

Everything below runs your local build rather than the published package.

The non-interactive path. Fastest loop — every prompt is supplied by a flag, so it runs to completion without a TTY:

pnpm build
cd /tmp && rm -rf smoke && mkdir smoke && cd smoke
node ~/ce-ts-sdk/packages/create-commercengine/dist/index.js my-store \
  --template soja --framework next --tooling biome --yes

The interactive TUI. Just drop the flags and run it from a real terminal:

node ~/ce-ts-sdk/packages/create-commercengine/dist/index.js

Piping its output (| tee, | head) hides the prompts, because clack needs a TTY. To capture a transcript, give it a pseudo-terminal:

script -q /dev/null node ~/ce-ts-sdk/.../dist/index.js

As the real command. pnpm link puts create-commercengine on PATH, so npm create commercengine resolves to the local build — this is the only way to test the npm create entry point itself:

cd ~/ce-ts-sdk/packages/create-commercengine && pnpm link --global
cd /tmp && npm create commercengine my-store
pnpm unlink --global create-commercengine   # when finished

Verifying the output actually works. Scaffolding succeeding is not the same as the project building — the interesting bugs live past that line:

cd my-store
npm install          # proves nothing workspace-shaped leaked into the manifest
npm run check        # proves the tooling preset is installed and configured
npm run build        # proves the flattened imports and CSS paths resolve

Worth running across the matrix rather than one combination: the templates differ in which shared packages they pull in, and the frameworks differ in how they resolve them.