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 generate scaffold [name]

Generate complete CRUD

wheels dbmigrate latest

Run database migrations

wheels test

Run application tests

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

Reload application

wheels deps

Manage dependencies

wheels destroy [type] [name]

Remove generated code

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 test

Generate tests

wheels generate snippets

Code snippets

wheels generate 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.

Database Operations

Command
Description
Documentation

wheels db create

Create database

wheels db drop

Drop database

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

Testing Commands

Commands for running and managing tests.

Command
Description
Documentation

wheels test

Run framework tests

Details

Environment Management

Commands for managing development environments and application context.

Command
Description
Documentation

wheels env

Environment base command

wheels env setup [name]

Setup environment

wheels env list

List environments

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

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

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 generate scaffold name=product properties=name:string,price:decimal
wheels dbmigrate latest
wheels test

Starting development:

wheels reload            # Reload the application
wheels test             # Run tests

Deployment preparation:

wheels test
wheels analyze security
wheels analyze performance
wheels dbmigrate info

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

See Also

Last updated

Was this helpful?