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 },
12 /// Disable one item's Shine-managed shell integration without uninstalling software
13 Disable {
14 #[arg(value_name = "ITEM")]
15 item: String,
16 #[arg(long)]
17 dry_run: bool,
18 },
19}
20
21#[derive(Subcommand, Debug)]
22pub enum SysCommands {
23 /// List available system items
24 List {
25 /// Show items for every supported operating system
26 #[arg(long)]
27 all: bool,
28 },
29 /// Show detailed information about a system item
30 Info {
31 /// System item to inspect
32 #[arg(value_name = "ITEM")]
33 item: String,
34 },
35 /// Show system bootstrap items previously initialized by shine
36 Status,
37 /// Bootstrap software and shell integration for the current OS
38 Bootstrap {
39 /// Bootstrap only these system items, in the given order
40 #[arg(value_name = "ITEM", conflicts_with = "preset")]
41 items: Vec<String>,
42 /// Apply a named profile without showing interactive selection
43 #[arg(long, value_name = "PROFILE", conflicts_with = "items")]
44 preset: Option<String>,
45 /// Print what would run without executing
46 #[arg(long)]
47 dry_run: bool,
48 /// Back up and replace the sys profile instead of merging user edits
49 #[arg(long)]
50 force_profile: bool,
51 /// Route init-script downloads through shine's preset proxy ([env] PROXY_HOST/HTTP_PROXY_PORT)
52 #[arg(long)]
53 proxy: bool,
54 },
55 /// Manage Shine-owned shell integrations for bootstrap items
56 Profile {
57 #[command(subcommand)]
58 command: SysProfileCommands,
59 },
60 /// Reapply enabled managed system configuration items
61 Apply {
62 /// Managed item to apply; applies all enabled items when omitted
63 #[arg(value_name = "ITEM")]
64 item: Option<String>,
65 /// Print what would run without executing
66 #[arg(long)]
67 dry_run: bool,
68 },
69 /// Remove a managed system configuration item safely
70 Uninstall {
71 /// Managed item to remove
72 #[arg(value_name = "ITEM")]
73 item: String,
74 /// Print what would run without executing
75 #[arg(long)]
76 dry_run: bool,
77 },
78}