cargo_run/commands/
mod.rs1use clap::{Subcommand, ArgAction};
6
7#[derive(Subcommand, Debug)]
9pub enum Commands {
10 #[command(about = "Run a script by name defined in Scripts.toml")]
11 Run {
12 #[arg(value_name = "SCRIPT_NAME", action = ArgAction::Set)]
13 script: String,
14 #[arg(short, long, value_name = "KEY=VALUE", action = ArgAction::Append)]
15 env: Vec<String>,
16 },
17 #[command(about = "Initialize a Scripts.toml file in the current directory")]
18 Init,
19 #[command(about = "Show all script names and descriptions defined in Scripts.toml")]
20 Show,
21}
22
23pub mod init;
24pub mod script;
25pub mod show;