agda_tree/
cli.rs

1use std::path::PathBuf;
2
3use clap::{Parser, Subcommand};
4
5#[derive(Parser)]
6#[command(version, about, long_about = None)]
7pub struct Cli {
8    /// Optional name to operate on
9    pub name: Option<String>,
10
11    /// Sets a custom config file
12    #[arg(short, long, value_name = "FILE")]
13    pub config: Option<PathBuf>,
14
15    /// Turn debugging information on
16    #[arg(short, long, action = clap::ArgAction::Count)]
17    pub debug: u8,
18
19    #[command(subcommand)]
20    pub command: Option<Commands>,
21}
22
23#[derive(Subcommand)]
24pub enum Commands {
25    /// does testing things
26    Build {
27        /// The target directory to build
28        #[arg(group = "input")]
29        directory: Option<PathBuf>,
30
31        /// The directory that generated trees should go
32        #[arg(short, long)]
33        output_dir: Option<PathBuf>,
34    },
35}