blz_cli/config/mod.rs
1//! Runtime configuration for CLI command execution.
2//!
3//! This module provides resolved configuration types that bundle common
4//! execution parameters, reducing the number of arguments passed to commands.
5//!
6//! # Design Philosophy
7//!
8//! Rather than passing many individual parameters to execute functions,
9//! configuration is bundled into typed structs:
10//!
11//! ```ignore
12//! // Before: 15+ parameters
13//! pub async fn execute(
14//! query: &str,
15//! limit: usize,
16//! format: OutputFormat,
17//! quiet: bool,
18//! metrics: PerformanceMetrics,
19//! // ... many more
20//! ) -> Result<()>
21//!
22//! // After: 2 parameters
23//! pub async fn execute(args: &QueryArgs, config: &ExecutionConfig) -> Result<()>
24//! ```
25//!
26//! # Available Types
27//!
28//! - [`ExecutionConfig`] - Common execution context for all commands
29//!
30//! # Examples
31//!
32//! ```ignore
33//! use blz_cli::config::ExecutionConfig;
34//! use blz_cli::args::{OutputFormat, Verbosity};
35//! use blz_core::PerformanceMetrics;
36//!
37//! let config = ExecutionConfig::new(
38//! Verbosity::Normal,
39//! OutputFormat::Json,
40//! PerformanceMetrics::new(),
41//! );
42//!
43//! // Use with command execution
44//! commands::execute(&args, &config).await?;
45//! ```
46
47mod resolved;
48
49pub use resolved::ExecutionConfig;