Skip to main content

cdk_mintd/
cli.rs

1use std::path::PathBuf;
2
3use clap::Parser;
4
5#[derive(Debug, Parser)]
6#[command(about = "A cashu mint written in rust", author = env!("CARGO_PKG_AUTHORS"), version = env!("CARGO_PKG_VERSION"))]
7pub struct CLIArgs {
8    #[arg(
9        short,
10        long,
11        help = "Use the <directory> as the location of the database",
12        required = false
13    )]
14    pub work_dir: Option<PathBuf>,
15    #[cfg(feature = "sqlcipher")]
16    #[arg(short, long, help = "Database password for sqlcipher", required = true)]
17    pub password: String,
18    #[arg(
19        short,
20        long,
21        help = "Use the <file name> as the location of the config file",
22        required = false
23    )]
24    pub config: Option<PathBuf>,
25    #[arg(
26        long,
27        help = "Read the mint and active payment backend seed phrase from the specified file",
28        required = false
29    )]
30    pub seed_file: Option<PathBuf>,
31    #[arg(
32        long,
33        help = "Enable logging output",
34        required = false,
35        action = clap::ArgAction::SetTrue,
36        default_value = "true"
37    )]
38    pub enable_logging: bool,
39}