Reference

Package Manager Support

Use npm, yarn, pnpm, or bun — CEM auto-detects your package manager and adapts scaffolding, Docker, generated scripts, and CLI output.

Run without installing

bash
# npm
npx create-express-modular my-api

# yarn
yarn create express-modular my-api

# pnpm
pnpm dlx create-express-modular my-api

# bun
bunx create-express-modular my-api

Install globally

bash
npm install -g create-express-modular
yarn global add create-express-modular
pnpm add -g create-express-modular
bun add -g create-express-modular

How detection works

CEM picks your package manager from these signals (highest priority first):

  • Lock file in the project root — bun.lockb, pnpm-lock.yaml, yarn.lock, or package-lock.json.
  • npm_config_user_agent env var, automatically set when npm / yarn / pnpm / bun invokes a script.
  • Defaults to npm.

What changes per PM

  • Install commands used during scaffolding
  • Generated README.md snippets
  • Dockerfile lock file + install command (corepack enabled for pnpm)
  • Update notices and inline tips in CLI output
  • A single-pass ultra-fast installer with pre-populated version pins, so dependencies land in one shot

Generated scripts

bash
# npm
npm run start:dev      # cem dev
npm run build          # cem build
npm start              # cem start
npm run check          # cem check

# yarn / pnpm / bun
yarn start:dev   |  pnpm start:dev   |  bun start:dev
yarn build       |  pnpm build       |  bun run build
yarn start       |  pnpm start       |  bun start
yarn check       |  pnpm check       |  bun run check