wheels env
Base command for environment management in Wheels applications.
Usage
Description
The wheels env
command provides environment management for Wheels applications. It handles environment configuration, switching between environments, and managing environment-specific settings.
Subcommands
list
List all configured environments
setup
Setup a new environment
switch
Switch to a different environment
Direct Usage
When called without subcommands, displays help information:
Output:
Examples
List all environments
Setup new environment
Switch environment
Environment Configuration
Each environment has its own configuration:
Environment Variables
The command respects these environment variables:
WHEELS_ENV
Current environment
development
WHEELS_DATASOURCE
Database name
Per environment
WHEELS_DEBUG
Debug mode
Per environment
Environment Detection
Order of precedence:
Command line argument
WHEELS_ENV
environment variable.wheels-env
fileDefault (
development
)
Common Environments
Development
Debug enabled
Detailed error messages
Hot reload active
Development database
Testing
Test database
Fixtures loaded
Debug enabled
Isolated from production
Production
Debug disabled
Optimized performance
Production database
Error handling active
Staging
Production-like
Separate database
Debug configurable
Pre-production testing
Environment Files
.wheels-env
Local environment override:
.env.[environment]
Environment-specific variables:
Integration
With Other Commands
Many commands respect current environment:
In Application Code
Access current environment:
Best Practices
Never commit
.wheels-env
fileUse testing environment for tests
Match staging to production closely
Separate databases per environment
Environment-specific configuration files
Use Cases
Local Development: Switch between feature environments
Testing: Isolated test environment
Deployment: Environment-specific configurations
Debugging: Quick environment switching
Team Development: Consistent environments
Notes
Environment changes may require application restart
Database connections are environment-specific
Some settings only take effect after reload
Use version control for environment configs
See Also
wheels env setup - Setup new environment
wheels env list - List environments
wheels env switch - Switch environments
wheels config - Configuration management
Last updated
Was this helpful?