Command Reference
Complete reference for all Wheels CLI commands organized by category.
Quick Reference
Most Common Commands
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 Documentationwheels info
- Display version information Documentationwheels reload
- Reload application Documentationwheels deps
- Manage dependencies Documentationwheels 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 Documentationwheels generate app-wizard
- Interactive app creation Documentationwheels generate controller
(alias:wheels g controller
) - Generate controller Documentationwheels generate model
(alias:wheels g model
) - Generate model Documentationwheels generate view
(alias:wheels g view
) - Generate view Documentationwheels generate property
- Add model property Documentationwheels generate route
- Generate route Documentationwheels generate test
- Generate tests Documentationwheels generate snippets
- Code snippets Documentationwheels 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 Documentationwheels db drop
- Drop database Documentation
Migration Management
wheels dbmigrate info
- Show migration status Documentationwheels dbmigrate latest
- Run all pending migrations Documentationwheels dbmigrate up
- Run next migration Documentationwheels dbmigrate down
- Rollback last migration Documentationwheels dbmigrate reset
- Reset all migrations Documentationwheels dbmigrate exec [version]
- Run specific migration Documentation
Migration Creation
wheels dbmigrate create blank [name]
- Create empty migration Documentationwheels dbmigrate create table [name]
- Create table migration Documentationwheels dbmigrate create column [table] [column]
- Add column migration Documentationwheels dbmigrate remove table [name]
- Drop table migration Documentation
Testing Commands
Commands for running and managing tests.
wheels test run
- Run tests Documentationwheels test all
- Run all tests Documentationwheels test coverage
- Run coverage tests Documentationwheels test integration
- Run integration tests Documentationwheels test unit
- Run unit tests Documentationwheels test watch
- Rerun tests on any change Documentation
Environment Management
Commands for managing development environments and application context.
wheels env setup [name]
- Setup environment Documentationwheels env list
- List environments Documentationwheels env merge
- Merge env files Documentationwheels env set
- Set env variable Documentationwheels env show
- Show env variables Documentation
Code Analysis
Commands for analyzing code quality and patterns.
wheels analyze code
- Analyze code quality Documentationwheels analyze performance
- Performance analysis Documentationwheels analyze security
- Security analysis Documentation
Docker Commands
Commands for Docker container management and deployment.
wheels docker init
- Initialize Docker configuration Documentationwheels 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
WHEELS_ENV
Environment mode
development
WHEELS_DATASOURCE
Database name
From config
WHEELS_RELOAD_PASSWORD
Reload password
From config
Exit Codes
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?