Add basic command structure

This commit is contained in:
SkyfallWasTaken 2024-07-09 20:30:33 +01:00
parent 76fb78605d
commit acfcb28d28
2 changed files with 25 additions and 1 deletions

17
src/command.rs Normal file
View file

@ -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,
},
}

View file

@ -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!");
}