omni_dev/cli/
mod.rs

1//! CLI interface for omni-dev
2
3use anyhow::Result;
4use clap::{Parser, Subcommand};
5
6pub mod git;
7
8/// omni-dev: A comprehensive development toolkit
9#[derive(Parser)]
10#[command(name = "omni-dev")]
11#[command(about = "A comprehensive development toolkit", long_about = None)]
12#[command(version)]
13pub struct Cli {
14    /// The main command to execute
15    #[command(subcommand)]
16    pub command: Commands,
17}
18
19/// Main command categories
20#[derive(Subcommand)]
21pub enum Commands {
22    /// Git-related operations
23    Git(git::GitCommand),
24}
25
26impl Cli {
27    /// Execute the CLI command
28    pub fn execute(self) -> Result<()> {
29        match self.command {
30            Commands::Git(git_cmd) => git_cmd.execute(),
31        }
32    }
33}