Skip to main content

Module cli

Module cli 

Source
Expand description

CLI argument parsing and command-line interface definitions.

This module contains all CLI-related types and functions:

  • Args struct with clap configuration for command-line argument parsing
  • Preset enum for preset agent configurations
  • CLI handler functions for --list-agents, --list-providers, --diagnose
  • Config initialization handlers for --init, --init-global
  • Interactive template selection for PROMPT.md creation

§Module Structure

  • args - Args struct with clap configuration
  • presets - Preset enum and apply_args_to_config
  • providers - Provider listing and info display
  • handlers - Command handlers (list-agents, diagnose, dry-run, template-selection)
  • init - Config initialization handlers (–init, –init-global)

Re-exports§

pub use handlers::create_prompt_from_template;
pub use handlers::handle_diagnose;
pub use handlers::handle_dry_run;
pub use handlers::handle_list_agents;
pub use handlers::handle_list_available_agents;
pub use handlers::handle_show_baseline;
pub use handlers::handle_template_commands;
pub use handlers::prompt_template_selection;
pub use presets::apply_args_to_config;

Modules§

handlers
CLI command handlers.
presets
Preset configurations for common agent combinations.
reducer
CLI argument reducer module.

Structs§

Args
Ralph: PROMPT-driven agent orchestrator for git repos

Enums§

PauseOnExitMode
Controls whether Ralph pauses for input before process exit.

Functions§

handle_check_config
Handle the --check-config flag using the default environment.
handle_check_config_with
Handle the --check-config flag with a custom environment.
handle_extended_help
Handle the --extended-help / --man flag.
handle_generate_completion
Handle the --generate-completion flag.
handle_init_global
Handle the --init-global flag using the default path resolver.
handle_init_global_with
Handle the --init-global flag with a custom path resolver.
handle_init_local_config
Handle the --init-local-config flag using the default path resolver.
handle_init_local_config_with
Handle the --init-local-config flag with a custom path resolver.
handle_list_providers
Handle –list-providers command.
handle_list_work_guides
Handle the --list-work-guides (or --list-templates) flag.
handle_smart_init
Handle the smart --init flag using the default path resolver.
handle_smart_init_with
Handle the smart --init flag with a custom path resolver.

Type Aliases§

ConfigInfo