Skip to main content

omni_dev/cli/ai/
mod.rs

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