Skip to content

Command Line Tools

wheels env list

List all available environments for your Wheels application.

Terminal window
wheels env list [options]

The wheels env list command displays all configured environments in your Wheels application. It shows environment details, current active environment, and configuration status.

OptionDescriptionDefault
--formatOutput format (table, json, yaml)table
--verboseShow detailed configurationfalse
--checkValidate environment configurationsfalse
--filterFilter by environment typeAll
--sortSort by (name, type, modified)name
Terminal window
wheels env list
Terminal window
wheels env list --verbose
Terminal window
wheels env list --format=json
Terminal window
wheels env list --check
Terminal window
wheels env list --filter=production
==================================================
Available Environments
==================================================
╔═════════════╤═════════════╤══════════╤════════════╤════════╤═════════╗
║ Name │ Type │ Database │ Status │ Active │ DB Type ║
╠═════════════╪═════════════╪══════════╪════════════╪════════╪═════════╣
║ development │ Development │ mydb_app │ [OK] Valid │ NO │ mysql ║
╚═════════════╧═════════════╧══════════╧════════════╧════════╧═════════╝
Total Environments: 1
Current Environment:
[INFO]: * = Currently active environment
[INFO]: Use 'wheels env list --verbose' for detailed information
==================================================
Available Environments
==================================================
Total Environments: 1
Current Environment:
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
{
"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
}
  • OK Valid - Configuration is valid and working
  • Active - Currently active environment
  • WARN Invalid - Configuration errors

When using --check:

  1. Configuration file exists
  2. Syntax is valid
  3. Database connection works
  4. Required settings present
  • Development: Local development
  • Testing: Automated testing
  • Staging: Pre-production
  • Production: Live environment
  • User-defined environments
  • Special purpose configs
  • Client-specific setups
Terminal window
# Production environments only
wheels env list --filter=production
# Development environments
wheels env list --filter=development
Terminal window
# Valid environments only
wheels env list --filter=valid
# Environments with issues
wheels env list --filter=issues
Terminal window
# Environments containing "prod"
wheels env list --filter="*prod*"
# Can also be written as
wheels env list --filter=*prod*
Terminal window
wheels env list --sort=name
Terminal window
wheels env list --sort=type
Terminal window
wheels env list --sort=modified

When using --verbose, shows:

  1. Configuration:

    • Config file path
    • Last modified date
    • File size
  2. Database:

    • Database name
    • Datasource name
  3. Settings:

    • Debug mode
    • Cache settings
    • Custom configurations
  • Check /config/ directory
  • Verify environment.cfm exists
  • Run wheels env setup to create
  • Check configuration syntax
  • Verify database credentials
  • Test database connection
  • Check WHEELS_ENV variable
  • Verify environment.cfm logic
  • Set environment explicitly
  1. Regular Checks: Validate environments periodically
  2. Documentation: Keep environment purposes clear
  3. Consistency: Use consistent naming
  4. Cleanup: Remove unused environments
  5. Security: Don’t expose production details
  • Current environment marked with asterisk (*)
  • Invalid environments shown but marked
  • Verbose mode may expose sensitive data
  • JSON format useful for automation