Skip to main content

handle_init_local_config_with

Function handle_init_local_config_with 

Source
pub fn handle_init_local_config_with<R: ConfigEnvironment>(
    colors: Colors,
    env: &R,
    force: bool,
) -> Result<bool>
Expand description

Handle the --init-local-config flag with a custom path resolver.

Creates a local config file at .agent/ralph-workflow.toml in the current directory. The generated template shows the user’s current effective configuration values (from global config or built-in defaults) as commented-out entries.

§Arguments

  • colors - Terminal color configuration for output
  • env - Path resolver for determining config file location
  • force - Whether to overwrite existing config file

§Returns

Returns Ok(true) if the flag was handled (program should exit after), or an error if config creation failed.

§Errors

Returns error if the operation fails.