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
use clap::{Args, Subcommand};
#[derive(Args, Default)]
pub struct PluginArgs {
#[command(subcommand)]
pub command: Option<PluginCommands>,
}
#[derive(Subcommand)]
pub enum PluginCommands {
/// List installed plugins
List,
/// Install a plugin from a git URL or local path
Install {
/// Source URL, GitHub shorthand (user/repo), or local path
source: String,
/// Trust the plugin immediately (skip confirmation prompt)
#[arg(long)]
trust: bool,
/// Install in global config instead of project-local
#[arg(short, long)]
global: bool,
/// Replace existing plugin version
#[arg(short, long)]
force: bool,
},
/// Remove an installed plugin
Remove {
/// Name of the plugin to remove
name: String,
/// Remove from global config instead of project-local
#[arg(short, long)]
global: bool,
},
/// Update installed plugin(s)
Update {
/// Plugin name to update (updates all if omitted)
name: Option<String>,
/// Update all installed plugins
#[arg(long)]
all: bool,
},
/// Enable a disabled plugin
Enable {
/// Name of the plugin to enable
name: String,
},
/// Disable a plugin without uninstalling it
Disable {
/// Name of the plugin to disable
name: String,
},
}