Loading...

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 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

Ask or search...
Ctrl K
Loading...

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

| 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 | | --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         OK Valid
  testing       Testing      wheels_test        OK Valid
  staging       Staging      wheels_staging     OK Valid
  production    Production   wheels_prod        OK Valid
  qa            Custom       wheels_qa          WARN Invalid

* = 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

  • OK Valid - Configuration is valid and working
  • Active - Currently active environment
  • WARN Invalid - Configuration errors

Validation Checks

When using --check:

  1. Configuration file exists
  2. Syntax is valid
  3. Database connection works
  4. 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*"

# Can also be written as
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

Environment Details

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

Troubleshooting

No Environments Listed

  • Check /config/ directory
  • Verify 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

Best Practices

  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

Notes

  • Current environment marked with asterisk (*)
  • Invalid environments shown but marked
  • Verbose mode may expose sensitive data
  • JSON format useful for automation

See Also