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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Config command arguments
//!
//! Commands for managing robot configurations independently of binary uploads.
use clap::{Args, Subcommand};
use std::path::PathBuf;
/// Config subcommands
#[derive(Subcommand)]
pub enum ConfigCommand {
/// Push local configs to the robot-config service
Push(#[command(flatten)] ConfigPushArgs),
/// Pull configs from the robot-config service to local project
Pull(#[command(flatten)] ConfigPullArgs),
/// List all configs for a robot
List(#[command(flatten)] ConfigListArgs),
}
/// Arguments for config push command
#[derive(Args)]
pub struct ConfigPushArgs {
/// Path to configs directory (default: dist/configs or configs/)
#[arg(short, long)]
pub path: Option<PathBuf>,
/// Robot ID to push configs for (default: from mecha10.json)
#[arg(short, long)]
pub robot_id: Option<String>,
/// Show what would be pushed without actually pushing
#[arg(long)]
pub dry_run: bool,
}
/// Arguments for config pull command
#[derive(Args)]
pub struct ConfigPullArgs {
/// Output directory for configs (default: configs/)
#[arg(short, long)]
pub output: Option<PathBuf>,
/// Robot ID to pull configs for (default: from mecha10.json)
#[arg(short, long)]
pub robot_id: Option<String>,
/// Overwrite existing config files
#[arg(long)]
pub force: bool,
}
/// Arguments for config list command
#[derive(Args)]
pub struct ConfigListArgs {
/// Robot ID to list configs for (default: from mecha10.json)
#[arg(short, long)]
pub robot_id: Option<String>,
/// Show full config values (not just keys)
#[arg(short, long)]
pub verbose: bool,
}