# Init

> CLI to scaffold DOT-driven TypeScript monorepos.

Source: https://npm-factory.n.yatsyk.com/docs/init

# @npm-factory/init

CLI that generates a complete TypeScript monorepo with ESM packages, Fumadocs site, build scripts, and Changesets — from a single command.

* **Stability:** beta
* **Platform:** Node.js

## Usage

```bash
npx @npm-factory/init
```

Or non-interactively:

```bash
npx @npm-factory/init \
  --project my-lib \
  --scope @my-org \
  --modules core,react \
  --playground single
```

## CLI flags

| Flag                  | Description                                    |
| --------------------- | ---------------------------------------------- |
| `--project <id>`      | Project id in kebab-case                       |
| `--scope <scope>`     | npm scope (e.g. `@my-org`)                     |
| `--modules <ids>`     | Comma-separated module ids (e.g. `core,react`) |
| `--playground <mode>` | `none`, `single`, or `per-module`              |

All flags are required for non-interactive mode. Without them, the interactive wizard starts.

## Re-running

Safe to run multiple times in the same directory. Existing files are skipped. Root `package.json`, `turbo.json`, `tsconfig.base.json`, and `.changeset/config.json` are patched (merged, not overwritten).
