1use anyhow::Result;
4use clap::{Parser, Subcommand};
5
6pub mod git;
7pub mod help;
8
9#[derive(Parser)]
11#[command(name = "omni-dev")]
12#[command(about = "A comprehensive development toolkit", long_about = None)]
13#[command(version)]
14pub struct Cli {
15 #[command(subcommand)]
17 pub command: Commands,
18}
19
20#[derive(Subcommand)]
22pub enum Commands {
23 Git(git::GitCommand),
25 #[command(name = "help-all")]
27 HelpAll(help::HelpCommand),
28}
29
30impl Cli {
31 pub fn execute(self) -> Result<()> {
33 match self.command {
34 Commands::Git(git_cmd) => git_cmd.execute(),
35 Commands::HelpAll(help_cmd) => help_cmd.execute(),
36 }
37 }
38}