doum_cli/cli/
args.rs

1use clap::{Parser, Subcommand};
2
3#[derive(Parser, Debug)]
4#[command(name = "doum")]
5#[command(author = "doum-cli contributors")]
6#[command(version = "0.1.0")]
7#[command(about = "AI-powered terminal assistant - Convert natural language to OS commands", long_about = None)]
8pub struct Cli {
9    #[command(subcommand)]
10    pub command: Option<Commands>,
11    
12    /// Auto mode: Automatically select mode based on input
13    #[arg(value_name = "INPUT")]
14    pub input: Option<String>,
15}
16
17#[derive(Subcommand, Debug)]
18pub enum Commands {
19    /// Configuration management
20    Config {
21        #[command(subcommand)]
22        action: Option<ConfigAction>,
23    },
24    /// Ask questions (Ask mode)
25    Ask {
26        /// Question to ask
27        question: String,
28    },
29    /// Suggest and execute commands (Suggest mode)
30    Suggest {
31        /// Request description
32        request: String,
33    },
34}
35
36
37#[derive(Subcommand, Debug)]
38pub enum ConfigAction {
39    /// Interactive configuration mode
40    Interactive,
41    /// Show all configuration
42    Show,
43    /// Reset all configuration to default
44    Reset,
45}