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
use clap::Subcommand;
#[derive(Subcommand, Debug)]
pub enum AppCommands {
/// List available app preset categories and their destination paths
List,
/// Show detailed information about a specific app preset category
Info {
/// Category to inspect (e.g. vim, starship)
#[arg(value_name = "CATEGORY")]
category: String,
/// Explicitly execute generators to evaluate final transformed content
#[arg(long)]
run_generators: bool,
/// Print a unified diff against installed content (or an empty file before install)
#[arg(long)]
diff: bool,
},
/// Install app preset files for all or a specific category
Install {
/// Category to install (e.g. JetBrains, starship). Installs all if omitted.
#[arg(value_name = "CATEGORY")]
category: Option<String>,
/// Print what would be installed without making any changes
#[arg(long)]
dry_run: bool,
/// Replace user-modified files that are already managed by shine
#[arg(long)]
replace_managed: bool,
/// Approve the displayed lifecycle Plan without prompting
#[arg(long, conflicts_with = "dry_run")]
yes: bool,
},
/// Explicitly refresh installed generated files for an app preset
Refresh {
/// App preset category to refresh
#[arg(value_name = "CATEGORY")]
category: String,
/// Optional generator source path; refreshes all installed generators when omitted
#[arg(value_name = "FILE")]
file: Option<String>,
/// Overwrite a managed destination that was modified after install
#[arg(long)]
force: bool,
/// Approve the displayed security Plan without prompting
#[arg(long)]
yes: bool,
},
/// Review and recover an interrupted app lifecycle operation
Recover {
/// Approve the displayed recovery Plan without prompting
#[arg(long)]
yes: bool,
},
/// Uninstall installed app preset files and optionally restore backups
Uninstall {
/// Category to uninstall (e.g. vim, starship). Uninstalls all if omitted.
#[arg(value_name = "CATEGORY")]
category: Option<String>,
/// Remove app config files even if they were modified after install
#[arg(long)]
force: bool,
/// Also remove the app presets directory and manifest after uninstalling
#[arg(long)]
purge: bool,
/// Print what would be removed without making any changes
#[arg(long)]
dry_run: bool,
/// Approve the displayed lifecycle Plan without prompting
#[arg(long, conflicts_with = "dry_run")]
yes: bool,
},
/// Apply or remove an app preset's external artifact integration
Artifact {
#[command(subcommand)]
command: AppArtifactCommands,
},
}
#[derive(Subcommand, Debug)]
pub enum AppArtifactCommands {
/// Apply the artifact integration declared by an app preset
Apply {
#[arg(value_name = "APP_ID")]
app_id: String,
/// Approve the displayed security Plan without prompting
#[arg(long)]
yes: bool,
},
/// Remove the artifact integration declared by an app preset
Remove {
#[arg(value_name = "APP_ID")]
app_id: String,
/// Approve the displayed security Plan without prompting
#[arg(long)]
yes: bool,
},
}