Command Line Tools
wheels env list
wheels env list
Section titled “wheels env list”List all available environments for your Wheels application.
Synopsis
Section titled “Synopsis”wheels env list [options]Description
Section titled “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
Section titled “Options”| Option | Description | Default |
|---|---|---|
--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 |
Examples
Section titled “Examples”List all environments
Section titled “List all environments”wheels env listShow detailed information
Section titled “Show detailed information”wheels env list --verboseOutput as JSON
Section titled “Output as JSON”wheels env list --format=jsonCheck environment validity
Section titled “Check environment validity”wheels env list --checkFilter production environments
Section titled “Filter production environments”wheels env list --filter=productionOutput Example
Section titled “Output Example”Basic Output
Section titled “Basic Output”================================================== Available Environments==================================================
╔═════════════╤═════════════╤══════════╤════════════╤════════╤═════════╗║ Name │ Type │ Database │ Status │ Active │ DB Type ║╠═════════════╪═════════════╪══════════╪════════════╪════════╪═════════╣║ development │ Development │ mydb_app │ [OK] Valid │ NO │ mysql ║╚═════════════╧═════════════╧══════════╧════════════╧════════╧═════════╝
Total Environments: 1Current Environment:[INFO]: * = Currently active environment[INFO]: Use 'wheels env list --verbose' for detailed informationVerbose Output
Section titled “Verbose Output”================================================== Available Environments==================================================
Total Environments: 1Current 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:00JSON Output Format
Section titled “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
Section titled “Environment Status”Status Indicators
Section titled “Status Indicators”OK Valid- Configuration is valid and workingActive- Currently active environmentWARN Invalid- Configuration errors
Validation Checks
Section titled “Validation Checks”When using --check:
- Configuration file exists
- Syntax is valid
- Database connection works
- Required settings present
Environment Types
Section titled “Environment Types”Standard Types
Section titled “Standard Types”- Development: Local development
- Testing: Automated testing
- Staging: Pre-production
- Production: Live environment
Custom Types
Section titled “Custom Types”- User-defined environments
- Special purpose configs
- Client-specific setups
Filtering Options
Section titled “Filtering Options”By Type
Section titled “By Type”# Production environments onlywheels env list --filter=production
# Development environmentswheels env list --filter=developmentBy Status
Section titled “By Status”# Valid environments onlywheels env list --filter=valid
# Environments with issueswheels env list --filter=issuesBy Pattern
Section titled “By Pattern”# Environments containing "prod"wheels env list --filter="*prod*"
# Can also be written aswheels env list --filter=*prod*Sorting Options
Section titled “Sorting Options”By Name
Section titled “By Name”wheels env list --sort=nameBy Type
Section titled “By Type”wheels env list --sort=typeBy Last Modified
Section titled “By Last Modified”wheels env list --sort=modifiedEnvironment Details
Section titled “Environment Details”When using --verbose, shows:
-
Configuration:
- Config file path
- Last modified date
- File size
-
Database:
- Database name
- Datasource name
-
Settings:
- Debug mode
- Cache settings
- Custom configurations
Troubleshooting
Section titled “Troubleshooting”No Environments Listed
Section titled “No Environments Listed”- Check
/config/directory - Verify environment.cfm exists
- Run
wheels env setupto create
Invalid Environment
Section titled “Invalid Environment”- Check configuration syntax
- Verify database credentials
- Test database connection
Missing Current Environment
Section titled “Missing Current Environment”- Check WHEELS_ENV variable
- Verify environment.cfm logic
- Set environment explicitly
Best Practices
Section titled “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
- Current environment marked with asterisk (*)
- Invalid environments shown but marked
- Verbose mode may expose sensitive data
- JSON format useful for automation
See Also
Section titled “See Also”- wheels env - Environment management overview
- wheels env setup - Setup new environment
- wheels env switch - Switch environments
- wheels config list - List configuration