use clap::{Parser, Subcommand};
#[derive(Parser, Debug)]
#[command(
name = "dejavu",
version,
about = "Stop showing agents the same output twice."
)]
pub struct Cli {
#[command(subcommand)]
pub command: DejavuCmd,
}
#[derive(Subcommand, Debug)]
pub enum DejavuCmd {
Start {
#[arg(
trailing_var_arg = true,
allow_hyphen_values = true,
required = true,
value_name = "COMMAND"
)]
command: Vec<String>,
},
Init,
Shellenv {
#[arg(long)]
install: bool,
#[arg(long, conflicts_with = "install")]
uninstall: bool,
#[arg(long, value_name = "SHELL")]
shell: Option<String>,
},
Doctor {
#[arg(long)]
json: bool,
},
#[command(hide = true)]
Run {
#[arg(long)]
shim_name: String,
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
args: Vec<String>,
},
Show {
target: String,
#[arg(long)]
stdout: bool,
#[arg(long)]
stderr: bool,
#[arg(long)]
normalized: bool,
},
Grep {
target: String,
pattern: String,
#[arg(long)]
normalized: bool,
},
Stats {
#[arg(long)]
json: bool,
#[arg(long)]
all: bool,
#[arg(long)]
public: bool,
},
Repos {
#[arg(long)]
json: bool,
#[arg(long)]
all: bool,
},
Report {
#[arg(long)]
redact: bool,
},
Bench {
#[arg(long)]
scenario: Option<String>,
#[arg(long)]
json: bool,
#[arg(long)]
check: bool,
},
Clean {
#[arg(long, value_name = "AGE")]
older_than: Option<String>,
#[arg(long)]
all: bool,
},
Uninstall,
Enable,
Disable,
}