Command Reference

Complete reference for all Wheels CLI commands organized by category.

Quick Reference

Most Common Commands

Command
Description

wheels generate app [name]

Create new application

wheels scaffold [name]

Generate complete CRUD

wheels dbmigrate latest

Run database migrations

wheels test run

Run application tests

wheels server start

Start development server

wheels server status

Check server status

wheels watch

Watch files for changes

wheels reload

Reload application

Core Commands

Essential commands for managing your Wheels application.

Command
Description
Documentation

wheels init

Bootstrap existing app for CLI

wheels info

Display version information

wheels reload [mode]

Reload application

wheels deps

Manage dependencies

wheels destroy [type] [name]

Remove generated code

wheels watch

Watch for file changes

Server Management

Enhanced server commands that wrap CommandBox's native functionality with Wheels-specific features.

Command
Description
Documentation

wheels server

Display server commands help

wheels server start

Start development server

wheels server stop

Stop development server

wheels server restart

Restart server and reload app

wheels server status

Show server status with Wheels info

wheels server log

Tail server logs

wheels server open

Open application in browser

Server Command Features

  • Validates Wheels application directory

  • Shows framework-specific information

  • Integrates with application reload

  • Provides helpful error messages

Code Generation

Commands for generating application code and resources.

Command
Alias
Description
Documentation

wheels generate app

wheels new

Create new application

wheels generate app-wizard

Interactive app creation

wheels generate controller

wheels g controller

Generate controller

wheels generate model

wheels g model

Generate model

wheels generate view

wheels g view

Generate view

wheels generate property

Add model property

wheels generate route

Generate route

wheels generate resource

REST resource

wheels generate api-resource

API resource (Currently broken)

wheels generate frontend

Frontend code

wheels generate test

Generate tests

wheels generate snippets

Code snippets

wheels scaffold

Complete CRUD

Generator Options

Common options across generators:

  • --force - Overwrite existing files

  • --help - Show command help

Database Commands

Commands for managing database schema and migrations.

Migration Management

Command
Description
Documentation

wheels dbmigrate info

Show migration status

wheels dbmigrate latest

Run all pending migrations

wheels dbmigrate up

Run next migration

wheels dbmigrate down

Rollback last migration

wheels dbmigrate reset

Reset all migrations

wheels dbmigrate exec [version]

Run specific migration

Migration Creation

Command
Description
Documentation

wheels dbmigrate create blank [name]

Create empty migration

wheels dbmigrate create table [name]

Create table migration

wheels dbmigrate create column [table] [column]

Add column migration

wheels dbmigrate remove table [name]

Drop table migration

Database Operations

Command
Description
Documentation

wheels db schema

Export/import schema

wheels db seed

Seed database

Testing Commands

Commands for running and managing tests.

Command
Description
Documentation

wheels test [type]

Run framework tests

wheels test run [spec]

Run TestBox tests

wheels test coverage

Generate coverage report

wheels test debug

Debug test execution

Test Options

  • --watch - Auto-run on changes

  • --reporter - Output format (simple, json, junit)

  • --bundles - Specific test bundles

  • --labels - Filter by labels

Configuration Commands

Commands for managing application configuration.

Command
Description
Documentation

wheels config list

List configuration

wheels config set [key] [value]

Set configuration

wheels config env

Environment config

Environment Management

Commands for managing development environments and application context.

Command
Description
Documentation

wheels environment

Display/switch environment

wheels environment set [env]

Set environment with reload

wheels environment list

List available environments

wheels console

Interactive REPL console

wheels runner [script]

Execute scripts with context

Legacy Environment Commands

Command
Description
Documentation

wheels env

Environment base command

wheels env setup [name]

Setup environment

wheels env list

List environments

wheels env switch [name]

Switch environment

Plugin Management

Commands for managing Wheels plugins.

Command
Description
Documentation

wheels plugins

Plugin management base command

wheels plugins list

List plugins

wheels plugins install [name]

Install plugin

wheels plugins remove [name]

Remove plugin

Plugin Options

  • --global - Install/list globally

  • --dev - Development dependency

Code Analysis

Commands for analyzing code quality and patterns.

Command
Description
Documentation

wheels analyze

Code analysis base command

wheels analyze code

Analyze code quality

wheels analyze performance

Performance analysis

wheels analyze security

Security analysis (deprecated)

Security Commands

Commands for security scanning and hardening.

Command
Description
Documentation

wheels security

Security management base command

wheels security scan

Scan for vulnerabilities

Security Options

  • --fix - Auto-fix issues

  • --path - Specific path to scan

Performance Commands

Commands for optimizing application performance.

Command
Description
Documentation

wheels optimize

Optimization base command

wheels optimize performance

Optimize application

Documentation Commands

Commands for generating and serving documentation.

Command
Description
Documentation

wheels docs

Documentation base command (Currently broken)

wheels docs generate

Generate documentation

wheels docs serve

Serve documentation

Documentation Options

  • --format - Output format (html, markdown)

  • --output - Output directory

  • --port - Server port

Maintenance Commands

Commands for managing application maintenance mode and cleanup tasks.

Command
Description
Documentation

wheels maintenance:on

Enable maintenance mode

wheels maintenance:off

Disable maintenance mode

wheels cleanup:logs

Remove old log files

wheels cleanup:tmp

Remove temporary files

wheels cleanup:sessions

Remove expired sessions

Maintenance Options

  • --force - Skip confirmation prompts

  • --dryRun - Preview changes without executing

CI/CD Commands

Commands for continuous integration and deployment workflows.

Command
Description
Documentation

wheels ci init

Initialize CI/CD configuration

Docker Commands

Commands for Docker container management and deployment.

Command
Description
Documentation

wheels docker init

Initialize Docker configuration

wheels docker deploy

Deploy using Docker

Deployment Commands

Commands for managing application deployments.

Command
Description
Documentation

wheels deploy

Deployment base command

wheels deploy audit

Audit deployment configuration

wheels deploy exec

Execute deployment

wheels deploy hooks

Manage deployment hooks

wheels deploy init

Initialize deployment

wheels deploy lock

Lock deployment state

wheels deploy logs

View deployment logs

wheels deploy proxy

Configure deployment proxy

wheels deploy push

Push deployment

wheels deploy rollback

Rollback deployment

wheels deploy secrets

Manage deployment secrets

wheels deploy setup

Setup deployment environment

wheels deploy status

Check deployment status

wheels deploy stop

Stop deployment

Deployment Options

  • --environment - Target environment

  • --force - Force deployment

  • --dry-run - Preview changes without deploying

Command Patterns

Getting Help

Every command supports --help:

wheels [command] --help
wheels generate controller --help
wheels dbmigrate create table --help

Command Aliases

Many commands have shorter aliases:

wheels g controller users  # Same as: wheels generate controller users
wheels g model user       # Same as: wheels generate model user
wheels new myapp         # Same as: wheels generate app myapp

Common Workflows

Creating a new feature:

wheels scaffold name=product properties=name:string,price:decimal
wheels dbmigrate latest
wheels test run

Starting development:

wheels server start      # Start the server
wheels watch            # Terminal 1: Watch for file changes
wheels server log       # Terminal 2: Monitor logs
wheels test run --watch # Terminal 3: Run tests in watch mode

Deployment preparation:

wheels test run
wheels security scan
wheels optimize performance
wheels dbmigrate info
wheels environment production

Interactive debugging:

wheels console                    # Start REPL
wheels console environment=testing # Test in specific env
wheels console execute="model('User').count()"  # Quick check

Running maintenance scripts:

wheels runner scripts/cleanup.cfm
wheels runner scripts/migrate.cfm environment=production
wheels runner scripts/report.cfm params='{"month":12}'

Environment Variables

Variable
Description
Default

WHEELS_ENV

Environment mode

development

WHEELS_DATASOURCE

Database name

From config

WHEELS_RELOAD_PASSWORD

Reload password

From config

Exit Codes

Code
Description

0

Success

1

General error

2

Invalid arguments

3

File not found

4

Permission denied

5

Database error

Command Status Notes

Some commands in the Wheels CLI are currently in various states of development or maintenance:

Broken Commands

  • wheels docs - Base documentation command is currently broken

  • wheels generate api-resource - API resource generation is currently broken

Disabled Commands

The following commands exist in the codebase but are currently disabled:

  • Some CI and Docker commands have disabled variants in the codebase

These commands may be re-enabled in future versions of Wheels.

See Also

Last updated

Was this helpful?