Skip to main content

vorpal_sdk/
cli.rs

1use crate::artifact::get_default_address;
2use clap::{Parser, Subcommand};
3
4#[derive(Parser)]
5#[command(author, version, about, long_about = None)]
6#[command(propagate_version = true)]
7pub struct Cli {
8    #[command(subcommand)]
9    pub command: Command,
10}
11
12#[derive(Subcommand)]
13pub enum Command {
14    Start {
15        #[clap(default_value_t = get_default_address(), long)]
16        agent: String,
17
18        #[clap(long)]
19        artifact: String,
20
21        #[clap(long)]
22        artifact_context: String,
23
24        #[clap(long)]
25        artifact_namespace: String,
26
27        #[arg(long)]
28        artifact_system: String,
29
30        #[clap(long, default_value_t = false)]
31        artifact_unlock: bool,
32
33        #[clap(long)]
34        artifact_variable: Vec<String>,
35
36        #[clap(long)]
37        port: u16,
38
39        #[clap(default_value_t = get_default_address(), long)]
40        registry: String,
41    },
42}