1use clap::Parser;
2use clap::Subcommand;
3
4#[derive(Parser, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
5pub struct Args {
6 #[command(subcommand)]
7 pub command: Commands,
8}
9
10#[derive(Subcommand, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
11pub enum Commands {
12 Run {
13 path: String,
14 },
15 Toolchain {
16 #[command(subcommand)]
17 command: ToolChainCommand,
18 },
19 Install {
20 #[arg(short, long)]
21 global: bool,
22 package: Option<String>,
23 },
24 Uninstall {
25 name: String,
26 },
27}
28
29#[derive(Subcommand, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
30pub enum ToolChainCommand {
31 Add { user: String, repo: String },
32 Remove { toolchain: String },
33}