git-cleaner 0.1.0

Bulk cleanup of git worktrees and merged branches across multiple repositories
use clap::{Parser, Subcommand};
use std::path::PathBuf;

#[derive(Parser)]
#[command(
    name = "git-cleaner",
    about = "Bulk cleanup of git worktrees and merged branches"
)]
pub struct Cli {
    #[command(subcommand)]
    pub command: Command,
}

#[derive(Subcommand)]
pub enum Command {
    /// Scan and report cleanable worktrees and merged branches
    Scan {
        /// Target directory containing git repositories
        #[arg(default_value = ".")]
        path: PathBuf,
    },

    /// Remove worktrees that are fully merged into main and have no uncommitted changes
    Worktrees {
        /// Target directory containing git repositories
        #[arg(default_value = ".")]
        path: PathBuf,

        /// Actually perform deletion (default is dry-run)
        #[arg(long)]
        execute: bool,
    },

    /// Delete local branches that are fully merged into main
    Branches {
        /// Target directory containing git repositories
        #[arg(default_value = ".")]
        path: PathBuf,

        /// Actually perform deletion (default is dry-run)
        #[arg(long)]
        execute: bool,
    },

    /// Clean both worktrees and merged branches
    All {
        /// Target directory containing git repositories
        #[arg(default_value = ".")]
        path: PathBuf,

        /// Actually perform deletion (default is dry-run)
        #[arg(long)]
        execute: bool,
    },
}