1use anyhow::Result;
4use clap::{Parser, Subcommand};
5
6pub mod commands;
7pub mod git;
8pub mod help;
9
10#[derive(Parser)]
12#[command(name = "omni-dev")]
13#[command(about = "A comprehensive development toolkit", long_about = None)]
14#[command(version)]
15pub struct Cli {
16 #[command(subcommand)]
18 pub command: Commands,
19}
20
21#[derive(Subcommand)]
23pub enum Commands {
24 Git(git::GitCommand),
26 Commands(commands::CommandsCommand),
28 #[command(name = "help-all")]
30 HelpAll(help::HelpCommand),
31}
32
33impl Cli {
34 pub fn execute(self) -> Result<()> {
36 match self.command {
37 Commands::Git(git_cmd) => git_cmd.execute(),
38 Commands::Commands(commands_cmd) => commands_cmd.execute(),
39 Commands::HelpAll(help_cmd) => help_cmd.execute(),
40 }
41 }
42}