diff --git a/src/command.rs b/src/command.rs new file mode 100644 index 0000000..4a0dee4 --- /dev/null +++ b/src/command.rs @@ -0,0 +1,17 @@ +use clap::{Parser, Subcommand}; + +#[derive(Parser)] +#[command(version, about, long_about = None)] +pub struct Cli { + #[command(subcommand)] + command: Commands, +} + +#[derive(Subcommand)] +pub enum Commands { + /// Run a script in package.json + Run { + /// The name of the script to run + script_name: bool, + }, +} diff --git a/src/main.rs b/src/main.rs index e7a11a9..61a95b6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,10 @@ -fn main() { +use clap::Parser; + +mod command; +use command::Cli; + +#[tokio::main] +async fn main() { + let cli = Cli::parse(); println!("Hello, world!"); }