pub mod commands;
use crate::error::Result;
use clap::{Parser, Subcommand};
#[derive(Subcommand, Debug, PartialEq)]
pub enum Commands {
Init,
}
#[derive(Parser, Debug, PartialEq)]
#[command(name = "eska")]
#[command(about = "Утилита для 1С Разработчиков")]
#[command(version)]
pub struct Cli {
#[command(subcommand)]
command: Commands,
}
impl Cli {
pub async fn run(self) -> Result<String> {
match self.command {
Commands::Init => commands::init::run().await,
}
}
pub fn get_command(&self) -> &Commands {
&self.command
}
}