Skip to main content

kagami/
command_line.rs

1use crate::{LogLevel, OutputFormat};
2use clap::Parser;
3
4#[derive(Parser, Debug)]
5#[command(name = "kagami")]
6#[command(version)]
7#[command(
8    about = "This simple tool checks whether there are any publicly disclosed vulnerabilities in a list of defined software.",
9    long_about= None
10)]
11pub struct KagamiCommands {
12    /// Sets an output format, overriding the one in the config file [default: text]
13    #[arg(short, long, value_enum)]
14    pub output_format: Option<OutputFormat>,
15    /// Sets a log level, overriding the one in the config file [default: warn]
16    #[arg(short, long, value_enum)]
17    pub log_level: Option<LogLevel>,
18    /// Sets a path to the config file, relative to the current directory.
19    #[arg(default_value = "kagami.yaml")]
20    pub config_file_path: String,
21}