devex config
Comprehensive configuration management for DevEx
devex config
The config command provides comprehensive tools for managing DevEx configuration files. It includes subcommands for viewing, editing, validating, and backing up your configuration files, as well as advanced features like team configuration management and environment-specific settings.
Usage
devex config <subcommand> [flags]Subcommands Overview
show
Display configuration status and summary
edit
Edit configuration files with your preferred editor
validate
Validate configuration syntax and content
diff
Compare configuration files
backup
Create and manage configuration backups
team
Manage team configuration templates
environment
Handle environment-specific configurations
export/import
Export and import configuration packages
version
Configuration version management
undo
Undo configuration changes
Core Subcommands
devex config show
Display comprehensive configuration information and status.
devex config show [flags]Options
| Flag | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output format (table, json, yaml) |
--verbose | bool | false | Show detailed information |
--files | bool | false | Show individual file details |
Examples
devex config show
Configuration Summary:
┌─────────────────┬────────┬─────────┬──────────────────┐
│ File │ Status │ Size │ Last Modified │
├─────────────────┼────────┼─────────┼──────────────────┤
│ applications │ ✓ │ 45.2 KB │ 2024-08-17 14:30 │
│ environment │ ✓ │ 12.1 KB │ 2024-08-17 14:25 │
│ desktop │ ✓ │ 8.4 KB │ 2024-08-17 14:25 │
│ system │ ✓ │ 2.1 KB │ 2024-08-17 14:25 │
└─────────────────┴────────┴─────────┴──────────────────┘
Config Directory: ~/.local/share/devex/config
Override Directory: ~/.devex (2 files)
Total Size: 67.8 KBdevex config edit
Open configuration files in your preferred editor.
devex config edit <file> [flags]Arguments
file: Configuration file to edit (applications,environment,desktop,system)
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--editor | string | $EDITOR | Editor to use (vim, nano, code, etc.) |
--backup | bool | true | Create backup before editing |
--template | string | Start from a template |
Examples
# Edit applications configuration
devex config edit applications
# Use specific editor
devex config edit environment --editor code
# Edit with automatic backup
devex config edit desktop --backup
# Start from template
devex config edit applications --template backend-teamdevex config validate
Validate configuration files for syntax and logical errors.
devex config validate [file] [flags]Options
| Flag | Type | Default | Description |
|---|---|---|---|
--strict | bool | false | Enable strict validation mode |
--fix | bool | false | Automatically fix common issues |
--schema | string | Custom schema file to validate against |
Examples
devex config validate
Validation Results:
✓ applications.yaml - No issues found
✓ environment.yaml - No issues found
⚠ desktop.yaml - 1 warning
→ Line 45: Theme 'custom-theme' not found in available themes
✗ system.yaml - 1 error
→ Line 12: Invalid Git email format
Summary: 2 files valid, 1 warning, 1 errordevex config diff
Compare configuration files or show changes.
devex config diff <source> [target] [flags]Options
| Flag | Type | Default | Description |
|---|---|---|---|
--unified | int | 3 | Number of context lines |
--ignore-whitespace | bool | false | Ignore whitespace differences |
--semantic | bool | false | Show semantic differences only |
Examples
# Compare with backup
devex config diff applications backup-20240817.yaml
# Compare current with default
devex config diff applications default
# Show changes since last commit
devex config diff --since-commit
# Semantic comparison (ignores formatting)
devex config diff applications backup.yaml --semanticAdvanced Configuration Management
Team Configuration
Manage shared team configurations and templates.
devex config team <subcommand> [flags]Team Subcommands
devex config team status
Team Configuration Status:
Repository: https://github.com/company/devex-configs
Branch: main
Last Sync: 2024-08-17 10:30:00
Local Changes: 3 files modified
Available Templates:
✓ backend-team - Backend development setup
✓ frontend-team - Frontend development setup
✓ full-stack-team - Full-stack development setup
⚠ data-science - Template needs updateEnvironment-Specific Configuration
Handle different configurations for different environments (development, staging, production).
devex config environment <subcommand> [flags]Environment Subcommands
# List available environments
devex config environment list
# Show current environment
devex config environment status
# Switch to different environment
devex config environment use production
# Create new environment configuration
devex config environment init staging --from developmentEnvironment Example
Create Environment
devex config environment init stagingCustomize for Environment
devex config edit applications --env staging
# Remove development-only tools
# Add staging-specific monitoringSwitch Environment
devex config environment use staging
devex install # Installs staging configurationBackup and Version Management
Configuration Backups
devex config backup <subcommand> [flags]Backup Subcommands
# Create backup
devex config backup create
# Create named backup
devex config backup create --name "before-team-config"
# Create backup with description
devex config backup create --description "Pre-migration backup"Version Management
devex config version <subcommand> [flags]Version Subcommands
# Show current configuration version
devex config version show
# List all versions
devex config version list
# Migrate to newer version
devex config version migrate --to 2.1.0
# Check compatibility
devex config version compatibility
# Update configuration format
devex config version updateImport and Export
Export Configurations
devex config export [flags]Export Options
| Flag | Type | Default | Description |
|---|---|---|---|
--output | string | devex-config.tar.gz | Output file path |
--format | string | archive | Export format (archive, directory, git) |
--include-backups | bool | false | Include backup files |
--compress | bool | true | Compress the export |
Export Examples
# Export complete configuration
devex config export
# Export to specific file
devex config export --output my-devex-setup.tar.gz
# Export as directory
devex config export --format directory --output ./my-config
# Export for team sharing (includes templates)
devex config export --team --include-templatesImport Configurations
devex config import <source> [flags]Import Options
| Flag | Type | Default | Description |
|---|---|---|---|
--merge | bool | false | Merge with existing configuration |
--backup | bool | true | Create backup before import |
--validate | bool | true | Validate imported configuration |
Import Examples
# Import configuration package
devex config import devex-config.tar.gz
# Import and merge with existing
devex config import team-config.tar.gz --merge
# Import from directory
devex config import ./config-directory
# Import from Git repository
devex config import https://github.com/company/devex-configs.gitUndo System
Configuration Undo
Track and undo configuration changes.
devex config undo <subcommand> [flags]Undo Subcommands
devex config undo list
Recent Configuration Changes:
┌────┬─────────────────────┬─────────────────┬─────────────────────┐
│ ID │ Operation │ Files Changed │ Timestamp │
├────┼─────────────────────┼─────────────────┼─────────────────────┤
│ 1 │ team apply │ applications │ 2024-08-17 14:30:00 │
│ 2 │ edit environment │ environment │ 2024-08-17 13:15:00 │
│ 3 │ import config │ all files │ 2024-08-17 12:00:00 │
└────┴─────────────────────┴─────────────────┴─────────────────────┘Configuration Inheritance
DevEx supports configuration inheritance for complex scenarios:
devex config inheritance <subcommand> [flags]Inheritance Chain
User Override (~/.devex/)
↓
Team Configuration
↓
Environment Configuration
↓
Default ConfigurationInheritance Commands
# Show inheritance chain
devex config inheritance show
# Show effective configuration (after inheritance)
devex config inheritance effective
# Debug inheritance issues
devex config inheritance debugBest Practices
Configuration Management Best Practices:
- Always backup before major changes
- Use team configurations for consistent environments
- Validate regularly to catch issues early
- Version control your custom configurations
- Document changes with meaningful commit messages
Backup Current Configuration
devex config backup create --name "before-changes"Make Changes Safely
devex config edit applications --backupValidate Changes
devex config validate --strictTest with Dry Run
devex install --dry-runApply if Successful
devex installTroubleshooting
Common Issues
# Check syntax errors
devex config validate --verbose
# Auto-fix common issues
devex config validate --fix
# Use schema validation
devex config validate --schemaRelated Commands
devex template- Work with configuration templatesdevex install- Apply configuration by installingdevex status- Check current installation statusdevex recovery- Fix configuration issues
The config command is the heart of DevEx's flexibility. Master these subcommands to get the most out of your development environment setup.