iowo/crates/app/src/config/cli.rs

24 lines
747 B
Rust
Raw Normal View History

2024-01-12 09:36:30 +01:00
use std::path::PathBuf;
2024-01-19 18:50:51 +01:00
use clap::{builder::BoolishValueParser, ArgAction, Parser};
2024-01-12 09:36:30 +01:00
#[derive(Parser)]
pub(crate) struct Args {
/// What file contains the pipeline to evaluate.
pub source: PathBuf,
/// How to actually run the pipeline.
/// Overrides the config file. Defaults to the debug evaluator.
#[arg(short, long)]
pub evaluator: Option<eval::Available>,
2024-01-12 09:36:30 +01:00
/// Read this config file.
#[arg(short, long)]
pub config_path: Option<PathBuf>,
2024-01-19 09:51:48 +01:00
/// Turn off the startup message.
///
/// The startup message is not constant and depends on the time.
2024-01-19 18:50:51 +01:00
#[arg(long, env = "NO_STARTUP_MESSAGE", action = ArgAction::SetTrue, value_parser = BoolishValueParser::new())]
2024-01-12 09:36:30 +01:00
pub no_startup_message: bool,
}