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 CLI 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.
-
wheels init
- Bootstrap existing app for CLI Documentation -
wheels info
- Display version information Documentation -
wheels reload
- Reload application Documentation -
wheels deps
- Manage dependencies Documentation -
wheels destroy [type] [name]
- Remove generated code Documentation
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
-
wheels db create
- Create database Documentation -
wheels db drop
- Drop database Documentation
Migration Management
-
wheels dbmigrate info
- Show migration status Documentation -
wheels dbmigrate latest
- Run all pending migrations Documentation -
wheels dbmigrate up
- Run next migration Documentation -
wheels dbmigrate down
- Rollback last migration Documentation -
wheels dbmigrate reset
- Reset all migrations Documentation -
wheels dbmigrate exec [version]
- Run specific migration Documentation
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.
-
wheels test run
- Run tests Documentation -
wheels test all
- Run all tests Documentation -
wheels test coverage
- Run coverage tests Documentation -
wheels test integration
- Run integration tests Documentation -
wheels test unit
- Run unit tests Documentation -
wheels test watch
- Rerun tests on any change Documentation
Environment Management
Commands for managing development environments and application context.
-
wheels env setup [name]
- Setup environment Documentation -
wheels env list
- List environments Documentation -
wheels env merge
- Merge env files Documentation -
wheels env set
- Set env variable Documentation -
wheels env show
- Show env variables Documentation
Code Analysis
Commands for analyzing code quality and patterns.
-
wheels analyze code
- Analyze code quality Documentation -
wheels analyze performance
- Performance analysis Documentation -
wheels analyze security
- Security analysis Documentation
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
- Quick Reference
- Most Common Commands
- Core Commands
- Code Generation
- Generator Options
- Database Commands
- Database Operations
- Migration Management
- Migration Creation
- Testing Commands
- Environment Management
- Code Analysis
- Docker Commands
- Command Patterns
- Command Aliases
- Common Workflows
- Environment Variables
- Exit Codes
- See Also