CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
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 env (coming Soon)
This command may not work as expected. A complete and stable version is coming soon.
Base command for environment management in Wheels applications.
Usage
wheels env [subcommand]
Description
The wheels env
command provides environment management for Wheels applications. It handles environment configuration, switching between environments, and managing environment-specific settings.
Subcommands
| Command | Description |
|---------|-------------|
| list
| List all configured environments |
| setup
| Setup a new environment |
| switch
| Switch to a different environment |
Direct Usage
When called without subcommands, displays help information:
wheels env help
Example Output:
🌍 Wheels Environment Management
Available commands:
wheels env list
List all configured environments
wheels env setup <environment>
Setup a new environment (development, staging, production)
Options: --template=docker --database=postgres
wheels env switch <environment>
Switch to a different environment
Examples:
wheels env setup development
wheels env setup production --template=docker --database=postgres
wheels env switch staging
Examples
List all environments
wheels env list
Setup new environment
wheels env setup development
wheels env setup production --template=docker --database=postgres
Switch environment
wheels env switch production
Environment Configuration
Each environment has its own configuration:
/config/
├── development/
│ └── settings.cfm
├── testing/
│ └── settings.cfm
├── production/
│ └── settings.cfm
└── environment.cfm
Environment Variables
The command respects these environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| WHEELS_ENV
| Current environment | development
|
| WHEELS_DATASOURCE
| Database name | Per environment |
| WHEELS_DEBUG
| Debug mode | Per environment |
Environment Detection
Order of precedence:
- Command line argument
WHEELS_ENV
environment variable.wheels-env
file- Default (
development
)
Common Environments
Development
- Debug enabled
- Detailed error messages
- Hot reload active
- Development database
Testing
- Test database
- Fixtures loaded
- Debug enabled
- Isolated from production
Production
- Debug disabled
- Optimized performance
- Production database
- Error handling active
Staging
- Production-like
- Separate database
- Debug configurable
- Pre-production testing
Environment Files
.env
Local environment override:
production
.env.[environment]
Environment-specific variables:
# .env.production
DATABASE_URL=mysql://prod@host/db
CACHE_ENABLED=true
DEBUG_MODE=false
Integration
With Other Commands
Many commands respect current environment:
# Uses current environment's database
wheels dbmigrate latest
# Reloads in current environment
wheels reload
# Tests run in test environment
wheels test run
In Application Code
Access current environment:
<cfset currentEnv = get("environment")>
<cfif currentEnv eq "production">
<!--- Production-specific code --->
</cfif>
Best Practices
- Never commit
.env
file - Use testing environment for tests
- Match staging to production closely
- Separate databases per environment
- Environment-specific configuration files
Use Cases
- Local Development: Switch between feature environments
- Testing: Isolated test environment
- Deployment: Environment-specific configurations
- Debugging: Quick environment switching
- Team Development: Consistent environments
Notes
- Environment changes may require application restart
- Database connections are environment-specific
- Some settings only take effect after reload
- Use version control for environment configs
See Also
- wheels env setup - Setup new environment
- wheels env list - List environments
- wheels env switch - Switch environments
- wheels config - Configuration management
- Usage
- Subcommands
- Direct Usage
- Examples
- List all environments
- Setup new environment
- Switch environment
- Environment Configuration
- Environment Variables
- Environment Detection
- Common Environments
- Development
- Testing
- Production
- Staging
- Environment Files
- .env
- .env.[environment]
- Integration
- With Other Commands
- In Application Code
- Best Practices
- Use Cases
- Notes
- See Also