moro init

Project builder

Pick your stack and watch the command and the resulting file tree update as you go. This is the same output --dry-run prints in your terminal — you can check what you're getting before a single file is written.

Start from

Project

Name

Directory and package name.

Template

Sets the starting dependency set.

REST and GraphQL services. The default.

Runtime

Where it runs in production.

Long-running server. Ships with a Dockerfile.

Data

Database

Optional. Adds an adapter and connection setup.

No database wiring — routes and handlers only.

Validation

Schema library for request and response validation.

TypeScript-first, no dependencies. The default.

Features

Include

Wired into the generated app on creation.

Nothing selected — the generated app stays bare.

WebSocket adapter

Turn on the WebSockets feature to choose an adapter.

Use Socket.IO if present, otherwise native ws.

Setup

Package manager

Used for the install step.

Whichever package manager ran the CLI.

Flags

How init behaves when it runs.

Preview without writing · overwrite an existing directory · skip git init · skip dependency install.

Your command
$ npx @morojs/cli init my-api \  --fast
Files created15
my-api/
├─ src/
├─ middleware/
│ │ └─ .gitkeep
├─ modules/
│ │ └─ .gitkeep
├─ routes/
│ │ ├─ health/
│ │ │ └─ index.ts
│ │ └─ index.ts
├─ types/
│ │ └─ index.ts
├─ validation/
│ │ └─ examples.tszod
└─ index.ts
├─ .env
├─ .env.example
├─ .gitignore
├─ Dockerfilenode
├─ moro.config.ts
├─ package.json
├─ README.md
└─ tsconfig.json

Tagged files come from a choice you made above. The rest ship with every project.

How init decides

The builder above always produces the non-interactive form. Run init yourself and you get one of three behaviors, depending on what you pass.

No flags

Guided prompts, one question at a time. Enter accepts the recommended default. When it finishes, the CLI prints the equivalent one-line command so you can repeat the setup.

npx @morojs/cli init my-api

Any flag

Prompts are skipped entirely. Whatever you passed wins; everything else falls back to template=api, runtime=node, database=none, validation=zod.

npx @morojs/cli init my-api --database=postgresql

--fast

Every default, no questions. The quickest path to a running project, and what the builder emits when your choices match the defaults exactly.

npx @morojs/cli init my-api --fast

All options

Complete syntax
1npx @morojs/cli init <project-name> [options]
2
3Options:
4  -t, --template <type>        Template (api|microservice|fullstack) [default: api]
5  -r, --runtime <type>         Runtime (node|vercel-edge|aws-lambda|cloudflare-workers) [default: node]
6  -d, --database <type>        Database (mysql|postgresql|sqlite|mongodb|redis|drizzle|none) [default: none]
7  -v, --validation <lib>       Validation (zod|joi|yup|class-validator|multiple) [default: zod]
8  -w, --websocket <adapter>    WebSocket (auto-detect|socket.io|ws|none) [default: auto-detect]
9  -f, --features <list>        Features (auth,cors,helmet,compression,websocket,docs,
10                               rate-limit,cache,circuit-breaker,monitoring,testing)
11  -p, --package-manager <pm>   Package manager (npm|yarn|pnpm) [auto-detected]
12  --fast                       Skip all prompts and use defaults
13  --force                      Overwrite an existing directory without asking
14  --dry-run                    Print the config, file tree and command without writing
15  --skip-git                   Skip git initialization
16  --skip-install               Skip dependency installation
17
18Flag values are checked before anything is written. A typo like --runtime=nod
19or --features=corss gets a "did you mean ...?" hint instead of a half-built
20project, and the project name is checked against npm's package-name rules.

Once it's created