CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
Object Relational Mapping
Creating Records
Reading Records
Updating Records
Deleting Records
Column Statistics
Dynamic Finders
Getting Paginated Data
Associations
Nested Properties
Object Validation
Object Callbacks
Calculated Properties
Transactions
Dirty Records
Soft Delete
Automatic Time Stamps
Using Multiple Data Sources
wheels init
Bootstrap an existing Wheels application for CLI usage.
Synopsis
wheels init
Description
The wheels init
command initializes an existing Wheels application to work with the Wheels CLI. It's an interactive command that helps set up necessary configuration files (box.json and server.json) for an existing Wheels installation.
Arguments
This command has no arguments - it runs interactively and prompts for required information.
Options
| Option | Description |
|--------|-------------|
| --help
| Show help information |
Interactive Prompts
When you run wheels init
, you'll be prompted for:
- Confirmation - Confirm you want to proceed with initialization
- Application Name - Used to make server.json server name unique (if box.json doesn't exist)
- CF Engine - Default CFML engine (e.g.,
lucee5
,adobe2021
) (if server.json doesn't exist)
Examples
Initialize current directory
wheels init
Example interaction:
==================================== Wheels init ===================================
This function will attempt to add a few things
to an EXISTING Wheels installation to help
the CLI interact.
We're going to assume the following:
- you've already setup a local datasource/database
- you've already set a reload password
We're going to try and do the following:
- create a box.json to help keep track of the wheels version
- create a server.json
====================================================================================
Sound ok? [y/n] y
Please enter an application name: myapp
Please enter a default cfengine: lucee5
What It Does
- Creates
vendor/wheels/box.json
- Tracks the Wheels framework version - Creates
server.json
- Configures CommandBox server settings with:- Unique server name based on application name
- Selected CF engine
- Default port and settings
- Creates
box.json
- Main project configuration file with:- Application name
- Wheels version dependency
- Project metadata
Generated Files
server.json
{
"name": "myapp",
"web": {
"http": {
"port": 60000
}
},
"app": {
"cfengine": "lucee5"
}
}
box.json
{
"name": "myapp",
"version": "1.0.0",
"dependencies": {
"wheels": "^2.5.0"
}
}
Prerequisites
Before running wheels init
:
- Have an existing Wheels application
- Database/datasource already configured
- Reload password already set in your application settings
Notes
- Run this command in the root directory of your Wheels application
- Files are only created if they don't already exist
- The command detects your current Wheels version automatically
- Special characters are stripped from application names
See Also
- wheels generate app - Create a new Wheels application
- wheels reload - Reload the application
- wheels info - Display version information