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

Run application tests

wheels reload

Reload application

Core Commands

Essential commands for managing your Wheels application.

Code Generation

Commands for generating application code and resources.

  • wheels generate app (alias: wheels new) - Create new application Documentation

  • wheels generate app-wizard - Interactive app creation Documentation

  • wheels generate controller (alias: wheels g controller) - Generate controller Documentation

  • wheels generate model (alias: wheels g model) - Generate model Documentation

  • wheels generate view (alias: wheels g view) - Generate view Documentation

  • wheels generate property - Add model property Documentation

  • wheels generate route - Generate route Documentation

  • wheels generate test - Generate tests Documentation

  • wheels generate snippets - Code snippets Documentation

  • wheels generate scaffold - Complete CRUD Documentation

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

Migration Management

Migration Creation

  • wheels dbmigrate create blank [name] - Create empty migration Documentation

  • wheels dbmigrate create table [name] - Create table migration Documentation

  • wheels dbmigrate create column [table] [column] - Add column migration Documentation

  • wheels dbmigrate remove table [name] - Drop table migration Documentation

Testing Commands

Commands for running and managing tests.

Environment Management

Commands for managing development environments and application context.

Code Analysis

Commands for analyzing code quality and patterns.

Docker Commands

Commands for Docker container management and deployment.

  • wheels docker init - Initialize Docker configuration Documentation

  • wheels docker deploy - Deploy using Docker Documentation

Command Patterns

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 run

Starting development:

wheels reload            # Reload the application
wheels test run          # Run tests

Deployment preparation:

wheels test run
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?