feat: Add weevil uninstall command

Adds `weevil uninstall` with three modes of operation:
- Full uninstall removes the entire .weevil directory
- --dry-run enumerates managed components and their sizes
- --only N removes specific components by index

Acknowledges system-installed dependencies (Android SDK, Gradle)
in dry-run output so users know what will and won't be touched.
This commit is contained in:
Eric Ratliff
2026-01-31 13:05:20 -06:00
parent d8e3c54f3d
commit 78abe1d65c
3 changed files with 409 additions and 1 deletions

View File

@@ -42,6 +42,17 @@ enum Commands {
path: Option<String>,
},
/// Remove Weevil-installed SDKs and dependencies
Uninstall {
/// Show what would be removed without actually removing anything
#[arg(long)]
dry_run: bool,
/// Remove only specific items by number (use --dry-run first to see the list)
#[arg(long, value_name = "NUM", num_args = 1..)]
only: Option<Vec<usize>>,
},
/// Upgrade an existing project to the latest generator version
Upgrade {
/// Path to the project directory
@@ -114,6 +125,9 @@ fn main() -> Result<()> {
Commands::Setup { path } => {
commands::setup::setup_environment(path.as_deref())
}
Commands::Uninstall { dry_run, only } => {
commands::uninstall::uninstall_dependencies(dry_run, only)
}
Commands::Upgrade { path } => {
commands::upgrade::upgrade_project(&path)
}