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, --init-legacy
  • 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, –init-legacy)

Re-exports§

pub use presets::apply_args_to_config;

Modules§

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

Structs§

Args
Ralph: PROMPT-driven agent orchestrator for git repos

Functions§

create_prompt_from_template
Create PROMPT.md from the selected template.
handle_diagnose
Handle –diagnose command.
handle_dry_run
Handle –dry-run command.
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_legacy
Handle the legacy --init-legacy flag.
handle_init_prompt
Handle the --init-prompt flag using the default path resolver.
handle_init_prompt_with
Handle the --init-prompt flag with a custom path resolver.
handle_list_agents
Handle –list-agents command.
handle_list_available_agents
Handle –list-available-agents command.
handle_list_providers
Handle –list-providers command.
handle_list_work_guides
Handle the --list-work-guides (or --list-templates) flag.
handle_show_baseline
Handle the –show-baseline 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.
handle_template_commands
Handle all template commands.
prompt_template_selection
Prompt the user to select a template when PROMPT.md is missing.