subx_cli/cli/
config_args.rs

1// src/cli/config_args.rs
2use clap::{Args, Subcommand};
3
4/// 配置管理參數
5#[derive(Args, Debug)]
6pub struct ConfigArgs {
7    #[command(subcommand)]
8    pub action: ConfigAction,
9}
10
11/// 配置子命令
12#[derive(Subcommand, Debug)]
13pub enum ConfigAction {
14    /// 設定配置值
15    Set {
16        /// 配置名稱
17        key: String,
18        /// 配置值
19        value: String,
20    },
21    /// 獲取配置值
22    Get {
23        /// 配置名稱
24        key: String,
25    },
26    /// 列出所有配置
27    List,
28    /// 重置配置
29    Reset,
30}