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 env_config: EnvironmentConfig,
20}
21
22impl CliConfig {
23 pub fn is_json(&self) -> bool {
24 matches!(self.output_format, OutputFormat::Json)
25 }
26}