claudy 0.2.2

Modern multi-provider launcher for Claude CLI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::Path;

use crate::domain::context::Context;

pub fn run_uninstall(ctx: &mut Context) -> anyhow::Result<i32> {
    let ok = ctx.prompt.confirm("Remove all Claudy files?", false)?;
    if !ok {
        return Ok(0);
    }

    let _ = std::fs::remove_file(Path::new(&ctx.paths.bin_dir).join("claudy"));
    let _ = std::fs::remove_dir_all(&ctx.paths.config_dir);
    let _ = std::fs::remove_dir_all(&ctx.paths.data_dir);
    let _ = std::fs::remove_dir_all(&ctx.paths.cache_dir);

    ctx.output.write_line("Claudy uninstalled")?;
    Ok(0)
}