wheels generate app
Create a new Wheels application from templates.
Synopsis
Description
The wheels generate app
command creates a new Wheels application with a complete directory structure, configuration files, and optionally sample code. It supports multiple templates for different starting points.
Arguments
name
Application name
MyApp
template
Template to use
wheels-base-template@BE
directory
Target directory
./{name}
Options
reloadPassword
Set reload password
''
(empty)
datasourceName
Database datasource name
App name
cfmlEngine
CFML engine (lucee/adobe)
lucee
--useBootstrap
Include Bootstrap CSS
false
--setupH2
Setup H2 embedded database
true
--init
Initialize as CommandBox package
false
--force
Overwrite existing directory
false
--help
Show help information
Available Templates
wheels-base-template@BE (Default)
Backend Edition template
Complete MVC structure
Sample code and configuration
H2 database setup by default
HelloWorld
Simple "Hello World" example
One controller and view
Great for learning
HelloDynamic
Dynamic content example
Database interaction
Form handling
HelloPages
Static pages example
Layout system
Navigation structure
Examples
Create basic application
Create with custom template
Create in specific directory
Create with Bootstrap
Create with H2 database (default is true)
Create with all options
Generated Structure
Configuration Files
box.json
server.json
.wheels-cli.json
Database Setup
With H2 (Embedded)
H2 is setup by default (--setupH2=true)
No external database needed
Perfect for development
Auto-configured datasource
To disable:
--setupH2=false
With External Database
Create application:
Configure in CommandBox:
Post-Generation Steps
Navigate to directory
Install dependencies
Start server
Open browser
Template Development
Create custom templates in ~/.commandbox/cfml/modules/wheels-cli/templates/apps/
:
Best Practices
Use descriptive application names
Choose appropriate template for project type
Set secure reload password for production
Configure datasource before starting
Run tests after generation
Common Issues
Directory exists: Use
--force
or choose different nameTemplate not found: Check available templates with
wheels info
Datasource errors: Configure database connection
Port conflicts: Change port in
server.json
See Also
wheels init - Initialize existing application
wheels generate app-wizard - Interactive app creation
wheels scaffold - Generate CRUD scaffolding
Last updated
Was this helpful?