ralph_workflow/cli/mod.rs
1//! CLI argument parsing and command-line interface definitions.
2//!
3//! This module contains all CLI-related types and functions:
4//! - [`Args`] struct with clap configuration for command-line argument parsing
5//! - `Preset` enum for preset agent configurations
6//! - CLI handler functions for `--list-agents`, `--list-providers`, `--diagnose`
7//! - Config initialization handlers for `--init`, `--init-global`
8//! - Interactive template selection for PROMPT.md creation
9//!
10//! # Module Structure
11//!
12//! - `args` - Args struct with clap configuration
13//! - [`presets`] - Preset enum and `apply_args_to_config`
14//! - `providers` - Provider listing and info display
15//! - `handlers` - Command handlers (list-agents, diagnose, dry-run, template-selection)
16//! - `init` - Config initialization handlers (--init, --init-global)
17
18mod args;
19mod completions;
20mod diagnostics_domain;
21pub mod handlers;
22mod init;
23pub mod presets;
24mod providers;
25pub mod reducer;
26
27// Re-export public items for API convenience
28pub use args::Args;
29pub use args::PauseOnExitMode;
30pub use completions::handle_generate_completion;
31pub type ConfigInfo<'a> = handlers::boundary::ConfigInfo<'a>;
32pub use handlers::{
33 create_prompt_from_template, handle_diagnose, handle_dry_run, handle_list_agents,
34 handle_list_available_agents, handle_show_baseline, handle_template_commands,
35 prompt_template_selection,
36};
37pub use init::{
38 handle_check_config, handle_check_config_with, handle_extended_help, handle_init_global,
39 handle_init_global_with, handle_init_local_config, handle_init_local_config_with,
40 handle_list_work_guides, handle_smart_init, handle_smart_init_with,
41};
42pub use presets::apply_args_to_config;
43pub use providers::handle_list_providers;