1use anyhow::Result;
4use clap::{Parser, Subcommand};
5
6pub mod ai;
7pub mod atlassian;
8pub mod commands;
9pub mod config;
10pub mod git;
11pub mod help;
12
13#[derive(Parser)]
15#[command(name = "omni-dev")]
16#[command(about = "A comprehensive development toolkit", long_about = None)]
17#[command(version)]
18pub struct Cli {
19 #[command(subcommand)]
21 pub command: Commands,
22}
23
24#[derive(Subcommand)]
26pub enum Commands {
27 Ai(ai::AiCommand),
29 Git(git::GitCommand),
31 Commands(commands::CommandsCommand),
33 Config(config::ConfigCommand),
35 Atlassian(atlassian::AtlassianCommand),
37 #[command(name = "help-all")]
39 HelpAll(help::HelpCommand),
40}
41
42impl Cli {
43 pub async fn execute(self) -> Result<()> {
45 match self.command {
46 Commands::Ai(ai_cmd) => ai_cmd.execute().await,
47 Commands::Git(git_cmd) => git_cmd.execute().await,
48 Commands::Commands(commands_cmd) => commands_cmd.execute(),
49 Commands::Atlassian(cmd) => cmd.execute().await,
50 Commands::Config(config_cmd) => config_cmd.execute(),
51 Commands::HelpAll(help_cmd) => help_cmd.execute(),
52 }
53 }
54}