mod git; mod sys; use sys::{SysCommand, handle_sys}; use tokio; use clap::{Parser, Subcommand}; use crate::git::{handle_git, GitCommand}; #[derive(Subcommand)] enum Command { /// Various commands for creating and adding git repos to breadpi. Git { #[command(subcommand)] git_command: GitCommand }, Sys { #[command(subcommand)] sys_command: SysCommand } } #[derive(Parser)] #[command(version, about, long_about = None)] struct Cli { #[command(subcommand)] command: Command, } #[tokio::main] async fn main() { let cli = Cli::parse(); match &cli.command { Command::Git { git_command } => { handle_git(&git_command).await; }, Command::Sys { sys_command } => { handle_sys(&sys_command).await; } } }