| 1 | use clap::{ArgAction, Parser}; |
| 2 | |
| 3 | #[derive(Parser, Debug)] |
| 4 | #[command(version, about, long_about = None)] |
| 5 | pub struct Args { |
| 6 | #[arg(long, action = ArgAction::SetTrue)] |
| 7 | /// generate config file. |
| 8 | pub config: bool, |
| 9 | } |
| 10 | |
| 11 | pub struct Cli { |
| 12 | pub args: Args, |
| 13 | } |
| 14 | |
| 15 | impl Cli { |
| 16 | pub fn new() -> Self { |
| 17 | Self { |
| 18 | args: Args::parse(), |
| 19 | } |
| 20 | } |
| 21 | } |
