billing, catalog, order — that bundles its controllers, entities, services, and the rest of its artifacts behind one registration point. The module:create generator scaffolds that whole shell for you and wires it into the app, so you start writing domain logic instead of boilerplate.
For a tour of what a module is and how the pieces fit together, see the module overview.
Command
--name is normalized to PascalCase and a trailing Module suffix is stripped, so billing, Billing, and BillingModule all produce the same module.
| Option | Description | Default |
|---|---|---|
--name | Module name (normalized to PascalCase, the Module suffix is stripped). | Prompted if omitted |
--destination | Destination module to register the new module into. | Prompted if omitted |
What gets generated
The generator creates the module directory undermodules/<name>/ and registers it so it’s live the moment the command finishes:
src/<PascalName>Module.ts— the module class, with emptycontrollers,entities,middlewares,cronJobs, andeventsarrays ready to fill.package.jsonandtsconfig.json— the module’s own dependency and compiler config.<name>.yml— the module config file.tests/<PascalName>Module.spec.ts— a mirrored test file.
- Registers it into its destination. For the
appdestination it’s added to bothAppModuleandSharedModule; for any other destination it’s added to that destination module. - Adds the module’s path alias to the root
tsconfig.json. - Adds the module scope to
.commitlintrc.tswhen that file is present.
Filling the module
A fresh module is an empty shell — every array in<PascalName>Module.ts starts empty. The next step is to add the artifacts that make up a vertical slice of the domain: an entity, a repository, a service, and a controller, then any middleware, cron jobs, or events the domain needs.
You don’t add these by hand — each artifact has its own generator that scaffolds the file and registers it back into the module. Reach for:
- controller:create — HTTP and WebSocket route handlers.
- service:create — the domain logic the controllers call into.
module:create registered.
Use with Claude and Codex
The generator ships a matchingmodule:create skill. Unlike a single-artifact generator, this skill scaffolds the whole module and then drives the per-artifact create skills — entity, repository, service, controller, and anything else the domain calls for — to fill in the first vertical slice. It’s what your AI agent reaches for when you ask it to stand up an entire domain rather than one file. Initialize the skills once for your agent:
- Claude
- Codex
module:create, scaffolds the module, and fills in the slice:Prompt
module:create --name=billing, then chains the entity, service, and controller generators to build out the new billing domain end to end.
For the full command reference, see module:create.