wheels env list
List all available environments for your Wheels application.
Synopsis
wheels env list [options]
Description
The wheels env list
command displays all configured environments in your Wheels application. It shows environment details, current active environment, and configuration status.
Options
--format
Output format (table, json, yaml)
table
--verbose
Show detailed configuration
false
--check
Validate environment configurations
false
--filter
Filter by environment type
All
--sort
Sort by (name, type, modified)
name
--help
Show help information
Examples
List all environments
wheels env list
Show detailed information
wheels env list --verbose
Output as JSON
wheels env list --format=json
Check environment validity
wheels env list --check
Filter production environments
wheels env list --filter=production
Output Example
Basic Output
Available Environments
=====================
NAME TYPE DATABASE STATUS
development * Development wheels_dev ✓ Active
testing Testing wheels_test ✓ Valid
staging Staging wheels_staging ✓ Valid
production Production wheels_prod ✓ Valid
qa Custom wheels_qa ⚠ Issues
* = Current environment
Verbose Output
Available Environments
=====================
development * [Active]
Type: Development
Database: wheels_dev
Datasource: wheels_development
Debug: Enabled
Cache: Disabled
Config: /config/development/settings.cfm
Modified: 2024-01-10 14:23:45
testing
Type: Testing
Database: wheels_test
Datasource: wheels_testing
Debug: Enabled
Cache: Disabled
Config: /config/testing/settings.cfm
Modified: 2024-01-08 09:15:22
staging
Type: Staging
Database: wheels_staging
Datasource: wheels_staging
Debug: Partial
Cache: Enabled
Config: /config/staging/settings.cfm
Modified: 2024-01-12 16:45:00
JSON Output Format
{
"environments": [
{
"name": "development",
"type": "Development",
"active": true,
"database": "wheels_dev",
"datasource": "wheels_development",
"debug": true,
"cache": false,
"configPath": "/config/development/settings.cfm",
"lastModified": "2024-01-10T14:23:45Z",
"status": "valid"
},
{
"name": "production",
"type": "Production",
"active": false,
"database": "wheels_prod",
"datasource": "wheels_production",
"debug": false,
"cache": true,
"configPath": "/config/production/settings.cfm",
"lastModified": "2024-01-12T16:45:00Z",
"status": "valid"
}
],
"current": "development",
"total": 5
}
Environment Status
Status Indicators
✓ Valid
- Configuration is valid and working✓ Active
- Currently active environment⚠ Issues
- Configuration issues detected✗ Invalid
- Configuration errors
Validation Checks
When using --check
:
Configuration file exists
Syntax is valid
Database connection works
Required settings present
Environment Types
Standard Types
Development: Local development
Testing: Automated testing
Staging: Pre-production
Production: Live environment
Custom Types
User-defined environments
Special purpose configs
Client-specific setups
Filtering Options
By Type
# Production environments only
wheels env list --filter=production
# Development environments
wheels env list --filter=development
By Status
# Valid environments only
wheels env list --filter=valid
# Environments with issues
wheels env list --filter=issues
By Pattern
# Environments containing "prod"
wheels env list --filter="*prod*"
Sorting Options
By Name
wheels env list --sort=name
By Type
wheels env list --sort=type
By Last Modified
wheels env list --sort=modified
Integration
Script Usage
# Get current environment
current=$(wheels env list --format=json | jq -r '.current')
# List all environment names
wheels env list --format=json | jq -r '.environments[].name'
CI/CD Usage
# Verify environment exists
if wheels env list | grep -q "staging"; then
wheels env switch staging
fi
Environment Details
When using --verbose
, shows:
Configuration:
Config file path
Last modified date
File size
Database:
Database name
Datasource name
Connection status
Settings:
Debug mode
Cache settings
Custom configurations
Validation:
Syntax check
Connection test
Dependencies
Troubleshooting
No Environments Listed
Check
/config/
directoryVerify environment.cfm exists
Run
wheels env setup
to create
Invalid Environment
Check configuration syntax
Verify database credentials
Test database connection
Missing Current Environment
Check WHEELS_ENV variable
Verify environment.cfm logic
Set environment explicitly
Export Capabilities
Export Configuration
# Export all environments
wheels env list --format=json > environments.json
# Export for documentation
wheels env list --format=markdown > ENVIRONMENTS.md
Environment Comparison
# Compare environments
wheels env list --compare=development,production
Best Practices
Regular Checks: Validate environments periodically
Documentation: Keep environment purposes clear
Consistency: Use consistent naming
Cleanup: Remove unused environments
Security: Don't expose production details
Notes
Current environment marked with asterisk (*)
Invalid environments shown but marked
Verbose mode may expose sensitive data
JSON format useful for automation
See Also
wheels env - Environment management overview
wheels env setup - Setup new environment
wheels env switch - Switch environments
wheels config list - List configuration
Last updated
Was this helpful?