Skip to main content

Module loader

Module loader 

Source
Expand description

Unified Configuration Loader

This module handles loading configuration from the unified config file at ~/.config/ralph-workflow.toml, with environment variable overrides.

§Configuration Priority

  1. Global config: ~/.config/ralph-workflow.toml
  2. Local config: .agent/ralph-workflow.toml (overrides global)
  3. Override layer: Environment variables (RALPH_*)
  4. CLI arguments: Final override (handled at CLI layer)

§Legacy Configs

Legacy config discovery is intentionally not supported. Only the unified config path is consulted, and missing config files fall back to defaults.

§Fail-Fast Validation

Ralph validates ALL config files before starting the pipeline. Invalid TOML, type mismatches, or unknown keys will cause Ralph to refuse to start with a clear error message. This is not optional - config validation runs on every startup before any other CLI operation.

Enums§

ConfigLoadWithValidationError
Error type for config loading with validation.

Functions§

load_config
Load configuration with the unified approach.
load_config_from_path
Load configuration from a specific path or the default location.
load_config_from_path_with_env
Load configuration from a specific path or the default location using a ConfigEnvironment.
unified_config_exists
Check if the unified config file exists.
unified_config_exists_with_env
Check if the unified config file exists using a ConfigEnvironment.