LogoLogo
HomeAPIBlog
3.0.0-SNAPSHOT
3.0.0-SNAPSHOT
  • INTRODUCTION
    • Getting Started
      • Running Local Development Servers
      • Beginner Tutorial: Hello World
      • Beginner Tutorial: Hello Database
      • Tutorial: Wheels, AJAX, and You
    • Frameworks and Wheels
    • Requirements
    • Manual Installation
    • Upgrading
    • Screencasts
  • Command Line Tools
    • CLI Overview
    • Quick Start Guide
    • Command Reference
      • Core Commands
        • wheels init
        • wheels info
        • wheels reload
        • wheels deps
        • wheels destroy
        • wheels watch
      • Code Generation
        • 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
      • Database Commands
        • 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 db schema
        • wheels db seed
      • Testing Commands
        • wheels test
        • wheels test run
        • wheels test coverage
        • wheels test debug
      • Configuration Commands
        • wheels config list
        • wheels config set
        • wheels config env
      • Environment Management
        • wheels env
        • wheels env setup
        • wheels env list
        • wheels env switch
      • Plugin Management
        • wheels plugins
        • wheels plugins list
        • wheels plugins install
        • wheels plugins remove
      • Code Analysis
        • wheels analyze
        • wheels analyze code
        • wheels analyze performance
        • wheels analyze security
      • Security Commands
        • wheels security
        • wheels security scan
      • Performance Commands
        • wheels optimize
        • wheels optimize performance
      • Documentation Commands
        • wheels docs
        • wheels docs generate
        • wheels docs serve
      • CI/CD Commands
        • wheels ci init
      • Docker Commands
        • wheels docker init
        • wheels docker deploy
      • Deployment Commands
        • 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
    • CLI Development Guides
      • Creating Commands
      • Service Architecture
      • Migrations Guide
      • Testing Guide
  • Working with Wheels
    • Conventions
    • Configuration and Defaults
    • Directory Structure
    • Switching Environments
    • Testing Your Application
    • Using the Test Environment
    • Contributing to Wheels
    • Submitting Pull Requests
    • Documenting your Code
  • Handling Requests with Controllers
    • Request Handling
    • Rendering Content
    • Redirecting Users
    • Sending Files
    • Sending Email
    • Responding with Multiple Formats
    • Using the Flash
    • Using Filters
    • Verification
    • Event Handlers
    • Routing
    • URL Rewriting
      • Apache
      • IIS
      • Tomcat
      • Nginx
    • Obfuscating URLs
    • Caching
    • Nesting Controllers
    • CORS Requests
  • Displaying Views to Users
    • Pages
    • Partials
    • Linking Pages
    • Layouts
    • Form Helpers and Showing Errors
    • Displaying Links for Pagination
    • Date, Media, and Text Helpers
    • Creating Custom View Helpers
    • Localization
  • Database Interaction Through Models
    • 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
    • Database Migrations
      • Migrations in Production
    • Using Multiple Data Sources
  • Plugins
    • Installing and Using Plugins
    • Developing Plugins
    • Publishing Plugins
  • Project Documentation
    • Overview
  • External Links
    • Source Code
    • Issue Tracker
    • Sponsor Us
    • Community
Powered by GitBook
LogoLogo
On this page
  • Synopsis
  • Description
  • Options
  • Examples
  • List all environments
  • Show detailed information
  • Output as JSON
  • Check environment validity
  • Filter production environments
  • Output Example
  • Basic Output
  • Verbose Output
  • JSON Output Format
  • Environment Status
  • Status Indicators
  • Validation Checks
  • Environment Types
  • Standard Types
  • Custom Types
  • Filtering Options
  • By Type
  • By Status
  • By Pattern
  • Sorting Options
  • By Name
  • By Type
  • By Last Modified
  • Integration
  • Script Usage
  • CI/CD Usage
  • Environment Details
  • Troubleshooting
  • No Environments Listed
  • Invalid Environment
  • Missing Current Environment
  • Export Capabilities
  • Export Configuration
  • Environment Comparison
  • Best Practices
  • Notes
  • See Also

Was this helpful?

Edit on GitHub
Export as PDF
  1. Command Line Tools
  2. Command Reference
  3. Environment Management

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

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

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:

  1. Configuration:

    • Config file path

    • Last modified date

    • File size

  2. Database:

    • Database name

    • Datasource name

    • Connection status

  3. Settings:

    • Debug mode

    • Cache settings

    • Custom configurations

  4. Validation:

    • Syntax check

    • Connection test

    • Dependencies

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

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

  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

Previouswheels env setupNextwheels env switch

Last updated 2 days ago

Was this helpful?

- Environment management overview

- Setup new environment

- Switch environments

- List configuration

wheels env
wheels env setup
wheels env switch
wheels config list