1use std::path::PathBuf;
2use std::sync::Arc;
3
4use auths_core::config::EnvironmentConfig;
5use auths_core::signing::PassphraseProvider;
6
7#[derive(Debug, Clone, Copy, Default, clap::ValueEnum)]
8pub enum OutputFormat {
9 #[default]
10 Text,
11 Json,
12}
13
14pub struct CliConfig {
15 pub repo_path: Option<PathBuf>,
16 pub output_format: OutputFormat,
17 pub is_interactive: bool,
18 pub passphrase_provider: Arc<dyn PassphraseProvider + Send + Sync>,
19 pub http_client: reqwest::Client,
20 pub env_config: EnvironmentConfig,
21}
22
23impl CliConfig {
24 pub fn is_json(&self) -> bool {
25 matches!(self.output_format, OutputFormat::Json)
26 }
27}