cli/commands/sys.rs
1use clap::Subcommand;
2
3#[derive(Subcommand, Debug)]
4pub enum SysProfileCommands {
5 /// Enable one item's Shine-managed shell integration without installing software
6 Enable {
7 #[arg(value_name = "ITEM")]
8 item: String,
9 #[arg(long)]
10 dry_run: bool,
11 /// Approve the displayed security Plan without prompting
12 #[arg(long, conflicts_with = "dry_run")]
13 yes: bool,
14 },
15 /// Disable one item's Shine-managed shell integration without uninstalling software
16 Disable {
17 #[arg(value_name = "ITEM")]
18 item: String,
19 #[arg(long)]
20 dry_run: bool,
21 /// Approve the displayed security Plan without prompting
22 #[arg(long, conflicts_with = "dry_run")]
23 yes: bool,
24 },
25}
26
27#[derive(Subcommand, Debug)]
28pub enum SysCommands {
29 /// Review and recover an interrupted managed system operation
30 Recover {
31 /// Approve the displayed recovery Plan without prompting
32 #[arg(long)]
33 yes: bool,
34 },
35 /// List available system items
36 List {
37 /// Show items for every supported operating system
38 #[arg(long)]
39 all: bool,
40 },
41 /// Show detailed information about a system item
42 Info {
43 /// System item to inspect
44 #[arg(value_name = "ITEM")]
45 item: String,
46 },
47 /// Show system bootstrap items previously initialized by shine
48 Status,
49 /// Bootstrap software and shell integration for the current OS
50 Bootstrap {
51 /// Bootstrap only these system items, in the given order
52 #[arg(value_name = "ITEM", conflicts_with_all = ["preset", "exact_items"])]
53 items: Vec<String>,
54 /// Bootstrap one exact system item; repeat to preserve an explicit order
55 #[arg(long = "item", value_name = "ITEM", action = clap::ArgAction::Append, conflicts_with_all = ["items", "preset"])]
56 exact_items: Vec<String>,
57 /// Apply a named profile without showing interactive selection
58 #[arg(long, value_name = "PROFILE", conflicts_with = "items")]
59 preset: Option<String>,
60 /// Print what would run without executing
61 #[arg(long)]
62 dry_run: bool,
63 /// Back up and replace the sys profile instead of merging user edits
64 #[arg(long)]
65 force_profile: bool,
66 /// Route init-script downloads through shine's preset proxy ([env] PROXY_HOST/HTTP_PROXY_PORT)
67 #[arg(long)]
68 proxy: bool,
69 /// Approve the displayed security Plan without prompting
70 #[arg(long, conflicts_with = "dry_run")]
71 yes: bool,
72 },
73 /// Manage Shine-owned shell integrations for bootstrap items
74 Profile {
75 #[command(subcommand)]
76 command: SysProfileCommands,
77 },
78 /// Reapply enabled managed system configuration items
79 Apply {
80 /// Managed item to apply; applies all enabled items when omitted
81 #[arg(value_name = "ITEM")]
82 item: Option<String>,
83 /// Print what would run without executing
84 #[arg(long)]
85 dry_run: bool,
86 /// Approve the displayed lifecycle Plan without prompting
87 #[arg(long, conflicts_with = "dry_run")]
88 yes: bool,
89 },
90 /// Remove a managed system configuration item safely
91 Uninstall {
92 /// Managed item to remove
93 #[arg(value_name = "ITEM")]
94 item: String,
95 /// Print what would run without executing
96 #[arg(long)]
97 dry_run: bool,
98 /// Approve the displayed lifecycle Plan without prompting
99 #[arg(long, conflicts_with = "dry_run")]
100 yes: bool,
101 },
102}