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
  • Actions
  • Arguments
  • Options
  • Examples
  • Show environment config
  • Compare environments
  • Sync configurations
  • Validate configuration
  • Export configuration
  • Show Environment Configuration
  • Compare Environments
  • Basic Comparison
  • Detailed Diff
  • Synchronize Environments
  • Copy Settings
  • Selective Sync
  • Safe Sync
  • Validate Configuration
  • Full Validation
  • Quick Check
  • Export Configuration
  • Export Formats
  • Export Options
  • Import Configuration
  • From File
  • Merge Import
  • Validation
  • Environment Templates
  • Create Template
  • Use Template
  • Bulk Operations
  • Update Multiple Environments
  • Batch Validation
  • Configuration Inheritance
  • Security Features
  • Safe Mode
  • Audit Trail
  • Integration
  • CI/CD Usage
  • Documentation
  • Best Practices
  • Troubleshooting
  • Validation Failures
  • Sync Issues
  • Import Problems
  • Notes
  • See Also

Was this helpful?

Edit on GitHub
Export as PDF
  1. Command Line Tools
  2. Command Reference
  3. Configuration Commands

wheels config env

Manage environment-specific configuration for your Wheels application.

Synopsis

wheels config env [action] [environment] [options]

Description

The wheels config env command provides specialized tools for managing environment-specific configurations. It helps you create, compare, sync, and validate configurations across different environments.

Actions

Action
Description

show

Display environment configuration

compare

Compare configurations between environments

sync

Synchronize settings between environments

validate

Validate environment configuration

export

Export environment configuration

import

Import environment configuration

Arguments

Argument
Description
Required

action

Action to perform

Yes

environment

Target environment name

Depends on action

Options

Option
Description
Default

--format

Output format (table, json, yaml, diff)

table

--output

Output file path

Console

--filter

Filter settings by pattern

Show all

--include-defaults

Include default values

false

--safe

Hide sensitive values

true

--force

Force operation without confirmation

false

--help

Show help information

Examples

Show environment config

wheels config env show production

Compare environments

wheels config env compare development production

Sync configurations

wheels config env sync development staging

Validate configuration

wheels config env validate production

Export configuration

wheels config env export production --format=json > prod-config.json

Show Environment Configuration

Display all settings for an environment:

wheels config env show staging

Output:

Environment: staging
Configuration File: /config/staging/settings.cfm
Last Modified: 2024-01-15 10:30:45

Settings:
---------
dataSourceName: wheels_staging
environment: staging
showDebugInformation: true
showErrorInformation: true
cacheQueries: false
cacheActions: true
urlRewriting: partial

Database:
---------
Server: localhost
Database: wheels_staging
Port: 3306

Features:
---------
Debug: Enabled
Cache: Partial
Reload: Protected

Compare Environments

Basic Comparison

wheels config env compare development production

Output:

Comparing: development → production

Setting                 Development          Production
--------------------- ------------------- -------------------
environment           development         production
dataSourceName        wheels_dev          wheels_prod
showDebugInformation  true               false
showErrorInformation  true               false
cacheQueries          false              true
cacheActions          false              true

Differences: 6
Only in development: 2
Only in production: 1

Detailed Diff

wheels config env compare development production --format=diff

Output:

--- development
+++ production
@@ -1,6 +1,6 @@
-environment=development
-dataSourceName=wheels_dev
-showDebugInformation=true
-showErrorInformation=true
-cacheQueries=false
-cacheActions=false
+environment=production
+dataSourceName=wheels_prod
+showDebugInformation=false
+showErrorInformation=false
+cacheQueries=true
+cacheActions=true

Synchronize Environments

Copy Settings

wheels config env sync production staging

Prompts:

Sync configuration from production to staging?

Settings to copy:
- cacheQueries: false → true
- cacheActions: false → true
- sessionTimeout: 1800 → 3600

Settings to preserve:
- dataSourceName: wheels_staging
- environment: staging

Continue? (y/N)

Selective Sync

wheels config env sync production staging --filter=cache*

Safe Sync

wheels config env sync production staging --safe
# Excludes: passwords, keys, datasources

Validate Configuration

Full Validation

wheels config env validate production

Output:

Validating: production

✓ Configuration file exists
✓ Syntax is valid
✓ Required settings present
✓ Database connection successful
⚠ Warning: Debug information enabled
✗ Error: Missing encryption key

Status: FAILED (1 error, 1 warning)

Quick Check

wheels config env validate all

Shows validation summary for all environments.

Export Configuration

Export Formats

JSON:

wheels config env export production --format=json

YAML:

wheels config env export production --format=yaml

Environment variables:

wheels config env export production --format=env

Export Options

# Include descriptions
wheels config env export production --verbose

# Exclude sensitive data
wheels config env export production --safe

# Filter specific settings
wheels config env export production --filter=cache*

Import Configuration

From File

wheels config env import staging --from=staging-config.json

Merge Import

wheels config env import staging --from=updates.json --merge

Validation

wheels config env import staging --from=config.json --validate

Environment Templates

Create Template

wheels config env export production --template > environment-template.json

Use Template

wheels config env create qa --from-template=environment-template.json

Bulk Operations

Update Multiple Environments

# Update all non-production environments
for env in development staging qa; do
  wheels config env sync production $env --filter=cache*
done

Batch Validation

wheels config env validate all --report=validation-report.html

Configuration Inheritance

Show inheritance chain:

wheels config env show staging --show-inheritance

Output:

Inheritance Chain:
1. /config/staging/settings.cfm (environment-specific)
2. /config/settings.cfm (global)
3. Framework defaults

Override Summary:
- From global: 15 settings
- From defaults: 45 settings
- Environment-specific: 8 settings

Security Features

Safe Mode

Hide sensitive values:

wheels config env show production --safe

Sensitive patterns:

  • *password*

  • *secret*

  • *key*

  • *token*

Audit Trail

wheels config env audit production

Shows configuration change history.

Integration

CI/CD Usage

- name: Validate configs
  run: |
    wheels config env validate all
    wheels config env compare staging production --fail-on-diff

Documentation

# Generate environment docs
wheels config env export all --format=markdown > ENVIRONMENTS.md

Best Practices

  1. Regular Validation: Check configs before deployment

  2. Environment Parity: Keep environments similar

  3. Safe Exports: Never export sensitive data

  4. Version Control: Track configuration files

  5. Document Differences: Explain why environments differ

Troubleshooting

Validation Failures

  • Check syntax errors

  • Verify required settings

  • Test database connections

Sync Issues

  • Review protected settings

  • Check file permissions

  • Verify source environment

Import Problems

  • Validate import format

  • Check for conflicts

  • Review type mismatches

Notes

  • Some operations require application restart

  • Sensitive values protected by default

  • Changes logged for audit purposes

  • Use templates for consistency

See Also

Previouswheels config setNextEnvironment Management

Last updated 2 days ago

Was this helpful?

- List all settings

- Set configuration values

- Environment management

wheels config list
wheels config set
wheels env
Configuration Guide