Commands Reference
Complete reference for all MoroJS CLI commands. From project initialization to deployment, find the exact syntax and options for every CLI operation.
Quick Access
Global Options
Help & Information
--help, -hShow help information--version, -vShow version numberOutput & Logging
--verboseVerbose output--quiet, -qMinimal outputCommands by Category
Project Management
1 commandinit
Initialize new MoroJS project with intelligent defaults
Syntax
bash
Options
-t, --template <type>Project template (api|microservice|fullstack)-r, --runtime <type>Runtime adapter (node|vercel-edge|aws-lambda|cloudflare-workers)-d, --database <type>Database adapter (mysql|postgresql|sqlite|mongodb|redis|drizzle)-v, --validation <lib>Validation library (zod|joi|yup|class-validator|multiple)-w, --websocket <adapter>WebSocket adapter (auto-detect|socket.io|ws|none)-f, --features <list>Features (auth,cors,helmet,compression,websocket,validation,docs)--skip-gitSkip Git initialization--skip-installSkip npm installExamples
Example 1
bash
Example 2
bash
Example 3
bash
Example 4
bash
Module System
2 commandsmodule create
Create advanced modules with built-in features and middleware
Syntax
bash
Options
-f, --features <list>Features (websocket,database,auth,cache,validation,docs)-d, --database <type>Database adapter type-v, --validation <lib>Validation library (zod|joi|yup|class-validator)-w, --websocket <adapter>WebSocket adapter (socket.io|ws|none)-m, --middleware <list>Built-in middleware (auth,cors,rate-limit,cache,validation)-r, --routes <pattern>Route patterns (crud,rest,graphql)--auth-roles <roles>Authentication roles--with-testsGenerate test files--with-docsGenerate API documentationExamples
Example 1
bash
Example 2
bash
Example 3
bash
Example 4
bash
module list
List all modules in the current project
Syntax
bash
Examples
Example 1
bash
Database Management
3 commandsdb setup
Setup database adapter with configuration
Syntax
bash
Options
-h, --host <host>Database host-p, --port <port>Database port-u, --username <user>Database username-d, --database <db>Database name--with-migrationsGenerate migration system--with-seedsGenerate seed systemExamples
Example 1
bash
Example 2
bash
Example 3
bash
db migrate
Run database migrations
Syntax
bash
Options
--upRun pending migrations--downRollback last migration--resetReset all migrationsExamples
Example 1
bash
Example 2
bash
Example 3
bash
db seed
Seed database with sample data
Syntax
bash
Options
--environment <env>Environment (development|staging|production)Examples
Example 1
bash
Example 2
bash
Configuration
3 commandsconfig init
Generate configuration files
Syntax
bash
Options
-e, --environment <env>Environment (development|staging|production)-d, --database <type>Primary database type-r, --runtime <type>Runtime adapter typeExamples
Example 1
bash
Example 2
bash
config validate
Validate configuration files
Syntax
bash
Examples
Example 1
bash
config env
Generate .env template
Syntax
bash
Options
--environment <env>Environment typeExamples
Example 1
bash
Example 2
bash
Middleware Management
2 commandsmiddleware add
Add middleware to your application
Syntax
bash
Options
-c, --config <json>Middleware configurationExamples
Example 1
bash
Example 2
bash
Example 3
bash
middleware list
List available middleware
Syntax
bash
Examples
Example 1
bash
Deployment
3 commandsdeploy vercel
Deploy to Vercel Edge Runtime
Syntax
bash
Options
--domain <domain>Custom domainExamples
Example 1
bash
Example 2
bash
deploy lambda
Deploy to AWS Lambda
Syntax
bash
Options
--region <region>AWS region--memory <mb>Memory allocationExamples
Example 1
bash
Example 2
bash
deploy workers
Deploy to Cloudflare Workers
Syntax
bash
Options
--name <name>Worker nameExamples
Example 1
bash
Example 2
bash
Development Tools
4 commandsdev
Development server with hot reload
Syntax
bash
Options
--port <port>Port number--watch <path>Watch directoryExamples
Example 1
bash
Example 2
bash
build
Build for production
Syntax
bash
Options
--target <target>Build target (lambda|vercel|workers)--minifyMinify outputExamples
Example 1
bash
Example 2
bash
test
Run tests
Syntax
bash
Options
--watchWatch mode--coverageGenerate coverage reportExamples
Example 1
bash
Example 2
bash
lint
Lint and format code
Syntax
bash
Options
--fixAuto-fix issuesExamples
Example 1
bash
Example 2
bash
Security & Analysis
1 commandsecurity:scan
Security analysis and vulnerability scanning
Syntax
bash
Examples
Example 1
bash