Module config

Module config 

Source
Expand description

Config command implementation.

This module implements the workspace config subcommands for managing and viewing configuration settings.

§What

Provides the config subcommands:

  • show - Display current configuration
  • validate - Validate configuration file (future story 2.3)

§How

The show command:

  1. Attempts to load configuration from repo.config.{toml,json,yaml,yml}
  2. Falls back to defaults if no config file exists
  3. Applies environment variable overrides
  4. Formats output based on OutputFormat (human or JSON)

Human format displays configuration in organized sections with clear labels. JSON format uses the standard JsonResponse structure for consistency.

§Why

Configuration inspection is essential for:

  • Troubleshooting issues
  • Verifying settings
  • Understanding current workspace setup
  • CI/CD automation (JSON output)

Clear display of configuration helps users understand their setup and verify that settings are correctly applied.

The validate command performs comprehensive validation of configuration:

  • Checks all required fields are present
  • Validates field types and formats
  • Checks referenced directories exist or can be created
  • Validates environment names (no duplicates)
  • Validates registry URLs
  • Provides clear, actionable error messages

Functions§

execute_show
Execute the config show command.
execute_validate
Execute the config validate command.