Npm Factory

Getting Started

1. Create a new directory

mkdir my-sdk && cd my-sdk && git init

2. Run the scaffolder

npx @npm-factory/init

The wizard asks for:

  • Project id — e.g. my-sdk (used in folder names, site title)
  • Scope — e.g. @my-org (npm package scope)
  • Modules — at least one (e.g. core). Each module becomes a publishable package.
  • Playground — optional Next.js app for testing

3. Install and build

pnpm install
pnpm build

4. Start development

pnpm dev

This starts the docs site and playground (if configured) in parallel via Turbo.

5. Run checks

pnpm check

This runs npm-factory-scripts check, which validates DOT config, syncs docs, checks for orphan docs, builds + lints modules, runs pack-smoke tests, and verifies changesets.

6. Customize

Edit your DOT config at packages/<project>-config/src/dot.ts:

  • Add or remove modules
  • Set GitHub URL (project.links.github)
  • Toggle API docs (docs.apiDocs: "enabled" | "disabled")
  • Change orphan mode for docs validation

Then rebuild: pnpm build

On this page