CLI
CLI
Official command-line interface for building and developing Dwex applications
Overview
The Dwex CLI (@dwex/cli) is a powerful command-line tool that streamlines your development workflow. It provides commands for running a development server, building for production, and scaffolding code with interactive prompts.
Features
- Development Server - Hot reload with automatic restart on file changes
- Production Build - Optimized bundling with Bun.build()
- Code Generation - Interactive scaffolding for modules, controllers, services, and more
- Configuration - Flexible configuration via
dwex.config.ts
Installation
The CLI is included automatically when you create a new Dwex project:
bun create dwex my-appOr add it to an existing project:
bun add -D @dwex/cliQuick Start
Run the development server:
bunx dwex devBuild for production:
bunx dwex buildGenerate a new module:
bunx dwex g module usersAvailable Commands
The CLI provides three main commands:
dev
Start development server with hot reload
build
Bundle application for production
generate
Scaffold modules, controllers, services, and more
Configuration
Configure CLI behavior with dwex.config.ts
Help
Get help for any command:
bunx dwex --help
bunx dwex dev --help
bunx dwex build --help
bunx dwex generate --helpNext Steps
Learn more about each command:
- Development Server - Run your app with hot reload
- Build - Create optimized production bundles
- Generate - Scaffold code interactively
- Configuration - Customize CLI behavior