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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
use clap::Subcommand;
#[derive(Subcommand, Debug)]
pub enum SysProfileCommands {
/// Enable one item's Shine-managed shell integration without installing software
Enable {
#[arg(value_name = "ITEM")]
item: String,
#[arg(long)]
dry_run: bool,
/// Approve the displayed security Plan without prompting
#[arg(long, conflicts_with = "dry_run")]
yes: bool,
},
/// Disable one item's Shine-managed shell integration without uninstalling software
Disable {
#[arg(value_name = "ITEM")]
item: String,
#[arg(long)]
dry_run: bool,
/// Approve the displayed security Plan without prompting
#[arg(long, conflicts_with = "dry_run")]
yes: bool,
},
}
#[derive(Subcommand, Debug)]
pub enum SysCommands {
/// Review and recover an interrupted managed system operation
Recover {
/// Approve the displayed recovery Plan without prompting
#[arg(long)]
yes: bool,
},
/// List available system items
List {
/// Show items for every supported operating system
#[arg(long)]
all: bool,
},
/// Show detailed information about a system item
Info {
/// System item to inspect
#[arg(value_name = "ITEM")]
item: String,
},
/// Show system bootstrap items previously initialized by shine
Status,
/// Bootstrap software and shell integration for the current OS
Bootstrap {
/// Bootstrap only these system items, in the given order
#[arg(value_name = "ITEM", conflicts_with_all = ["preset", "exact_items"])]
items: Vec<String>,
/// Bootstrap one exact system item; repeat to preserve an explicit order
#[arg(long = "item", value_name = "ITEM", action = clap::ArgAction::Append, conflicts_with_all = ["items", "preset"])]
exact_items: Vec<String>,
/// Apply a named profile without showing interactive selection
#[arg(long, value_name = "PROFILE", conflicts_with = "items")]
preset: Option<String>,
/// Print what would run without executing
#[arg(long)]
dry_run: bool,
/// Back up and replace the sys profile instead of merging user edits
#[arg(long)]
force_profile: bool,
/// Route init-script downloads through shine's preset proxy ([env] PROXY_HOST/HTTP_PROXY_PORT)
#[arg(long)]
proxy: bool,
/// Approve the displayed security Plan without prompting
#[arg(long, conflicts_with = "dry_run")]
yes: bool,
},
/// Manage Shine-owned shell integrations for bootstrap items
Profile {
#[command(subcommand)]
command: SysProfileCommands,
},
/// Reapply enabled managed system configuration items
Apply {
/// Managed item to apply; applies all enabled items when omitted
#[arg(value_name = "ITEM")]
item: Option<String>,
/// Print what would run without executing
#[arg(long)]
dry_run: bool,
/// Approve the displayed lifecycle Plan without prompting
#[arg(long, conflicts_with = "dry_run")]
yes: bool,
},
/// Remove a managed system configuration item safely
Uninstall {
/// Managed item to remove
#[arg(value_name = "ITEM")]
item: String,
/// Print what would run without executing
#[arg(long)]
dry_run: bool,
/// Approve the displayed lifecycle Plan without prompting
#[arg(long, conflicts_with = "dry_run")]
yes: bool,
},
}