Interactive Project Builder

Configure your MoroJS project step-by-step. Select your options below and copy the generated command to get started — it runs straight from npx, no install required.

Interactive mode: Runnpx @morojs/cli init my-apiwith no flags and the CLI walks you through each option step-by-step. Hit Enter on any prompt to accept the recommended default (runtime=node,validation=zod, etc.). When it's done, the CLI prints the equivalent--fast-style command so you can repeat the setup elsewhere with one line.

Non-interactive mode: Pass any flag (e.g. --runtime or--validation) and the CLI skips all prompts, applying sensible defaults for anything you didn't specify (runtime defaults tonode unless overridden). Use--fast to accept every default with zero prompts.

Quality-of-life: typos like--runtime=nod or--features=corss surface a "did you mean…?" hint instead of silently producing a broken project. Use --dry-run to preview the file tree without writing anything, and--package-manager (or auto-detection) for npm / yarn / pnpm.

1

Choose Template

Select the type of project you want to build

2

Choose Runtime

Select where your application will run

3

Choose Database

Optional

Select your database adapter or choose none for API-only projects

4

Choose Validation Library

Optional

Select your preferred validation library for request/response validation

5

Choose WebSocket Adapter

Optional

Select WebSocket adapter for real-time features

6

Select Features

Optional

Choose additional features to include in your project

7

Package Manager

Optional

Pick a package manager — or leave on auto-detect (the CLI uses whichever PM ran it).

8

Dry Run

Optional

Your Command

Copy and run this command in your terminal to create your project:

Ready to Copy
npx @morojs/cli init my-project \
  --database=postgresql \
  --features=auth,cors,docs
Replace "my-project" with your project name

API Server

Perfect for REST APIs, GraphQL servers, and backend services

Includes:

TypeScript setup
Validation middleware
API documentation
Testing framework

Quick Examples

Fastest Start

Skip every prompt

bash

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

--fast accepts every default (runtime=node, validation=zod, no database) and creates the project in seconds.

Interactive Mode

No flags = guided prompts

bash

1npx @morojs/cli init my-api

Running with no flags walks you through each option step-by-step. Hit Enter on any prompt to accept the recommended default.

Pick Your Stack

Any flag = non-interactive

bash

1npx @morojs/cli init my-api \
2  --validation=zod \
3  --database=postgresql

Passing any flag puts the CLI into non-interactive mode and auto-fills everything else with sensible defaults — no follow-up questions. runtimedefaults to node unless you override it.

Production Setup

Enterprise configuration

bash

1npx @morojs/cli init my-enterprise-api \
2  --template=api \
3  --runtime=vercel-edge \
4  --database=postgresql \
5  --features=auth,cors,docs

Enterprise-ready project with all features configured. Ideal for production deployments.

All Command Options

Complete syntax

bash

1npx @morojs/cli init <project-name> [options]
2
3Options:
4  -t, --template <type>        Template (api|microservice|fullstack)
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)
7  -v, --validation <lib>       Validation (zod|joi|yup|class-validator|multiple)
8  -w, --websocket <adapter>    WebSocket (auto-detect|socket.io|ws|none)
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 sensible defaults
13  --force                      Overwrite existing directory without prompting
14  --dry-run                    Print what would be created without writing any files
15  --skip-git                   Skip Git initialization
16  --skip-install               Skip dependency installation
17
18Validation:
19  All flag values are validated up-front. Typos like --runtime=nod or
20  --features=corss surface a friendly "did you mean ...?" hint instead of
21  silently producing a broken project. Project names are checked against
22  npm package-name rules.
23
24Behavior:
25  Interactive mode (no flags):
26    Runs guided prompts. Hit Enter on any prompt to take the recommended default.
27    Runtime always defaults to node — pass --runtime to override.
28    After completion, the CLI prints the equivalent non-interactive command
29    so you can repeat the setup elsewhere with one line.
30
31  Non-interactive mode (any flag, or --fast):
32    Skips all prompts. Anything you didn't pass falls back to:
33      runtime=node, database=none, template=api, validation=zod
34
35Examples:
36  # Interactive — guided prompts
37  npx @morojs/cli init my-api
38
39  # Non-interactive — every default, zero prompts
40  npx @morojs/cli init my-api --fast
41
42  # Non-interactive — pick a couple of options, defaults fill the rest
43  npx @morojs/cli init my-api --validation=zod --database=postgresql
44
45  # Override the runtime default
46  npx @morojs/cli init my-app --runtime=vercel-edge --websocket=socket.io
47
48  # Use pnpm instead of npm for the install step
49  npx @morojs/cli init my-api --fast --package-manager=pnpm
50
51  # Preview without writing any files
52  npx @morojs/cli init my-api --fast --dry-run
53
54  # Full enterprise stack
55  npx @morojs/cli init enterprise --features=auth,cors,websocket,docs --validation=zod

After Initialization