summaryrefslogtreecommitdiff
path: root/makima/src/daemon/cli/directive.rs
blob: 5ce88c589444b8f683af071231e6f92176523097 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Directive subcommand - directive orchestration commands.

use clap::Args;
use uuid::Uuid;

/// Common arguments for directive commands.
#[derive(Args, Debug, Clone)]
pub struct DirectiveArgs {
    /// API URL
    #[arg(long, env = "MAKIMA_API_URL", default_value = "https://api.makima.jp", global = true)]
    pub api_url: String,

    /// API key for authentication
    #[arg(long, env = "MAKIMA_API_KEY", global = true)]
    pub api_key: String,

    /// Directive ID
    #[arg(long, env = "MAKIMA_DIRECTIVE_ID", global = true)]
    pub directive_id: Uuid,
}

/// Arguments for chain command (get specific chain).
#[derive(Args, Debug)]
pub struct ChainArgs {
    #[command(flatten)]
    pub common: DirectiveArgs,

    /// Chain ID to retrieve
    pub chain_id: Uuid,
}

/// Arguments for update-status command.
#[derive(Args, Debug)]
pub struct UpdateStatusArgs {
    #[command(flatten)]
    pub common: DirectiveArgs,

    /// New status (draft, planning, active, paused, completed, archived, failed)
    pub status: String,
}