vx_cli/commands/
global.rs1use crate::ui::UI;
4use anyhow::Result;
5use clap::Subcommand;
6
7#[derive(Subcommand, Clone)]
8pub enum GlobalCommand {
9 List {
11 #[arg(short, long)]
13 verbose: bool,
14 },
15 Info {
17 tool_name: String,
19 },
20 Remove {
22 tool_name: String,
24 #[arg(short, long)]
26 force: bool,
27 },
28 Dependents {
30 tool_name: String,
32 },
33 Cleanup {
35 #[arg(short, long)]
37 dry_run: bool,
38 },
39}
40
41pub async fn handle(command: GlobalCommand) -> Result<()> {
43 UI::warning("Global commands not yet implemented in new architecture");
44
45 match command {
46 GlobalCommand::List { verbose: _ } => {
47 UI::hint("Would list global tools");
48 }
49
50 GlobalCommand::Info { tool_name } => {
51 UI::hint(&format!("Would show info for global tool: {}", tool_name));
52 }
53
54 GlobalCommand::Remove { tool_name, force } => {
55 UI::hint(&format!(
56 "Would remove global tool: {} (force: {})",
57 tool_name, force
58 ));
59 }
60
61 GlobalCommand::Dependents { tool_name } => {
62 UI::hint(&format!(
63 "Would show dependents for global tool: {}",
64 tool_name
65 ));
66 }
67
68 GlobalCommand::Cleanup { dry_run } => {
69 UI::hint(&format!(
70 "Would cleanup global tools (dry_run: {})",
71 dry_run
72 ));
73 }
74 }
75
76 Ok(())
77}