Skip to main content

omni_dev/cli/ai/
mod.rs

1//! AI commands.
2
3mod chat;
4mod claude;
5
6pub use chat::ChatCommand;
7
8use anyhow::Result;
9use clap::{Parser, Subcommand};
10
11/// AI operations.
12#[derive(Parser)]
13pub struct AiCommand {
14    /// The AI subcommand to execute.
15    #[command(subcommand)]
16    pub command: AiSubcommands,
17}
18
19/// AI subcommands.
20#[derive(Subcommand)]
21pub enum AiSubcommands {
22    /// Interactive AI chat session.
23    Chat(ChatCommand),
24    /// Claude Code diagnostics and inspection.
25    Claude(claude::ClaudeCommand),
26}
27
28impl AiCommand {
29    /// Executes the AI command.
30    pub async fn execute(self) -> Result<()> {
31        match self.command {
32            AiSubcommands::Chat(cmd) => cmd.execute().await,
33            AiSubcommands::Claude(cmd) => cmd.execute(),
34        }
35    }
36}