Keep your configs cozy!
// cozyconf - Keep your configs cozy!
// Copyright (C) 2025  Aster Boese

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

use std::path::PathBuf;

use clap::{Parser, Subcommand};

#[derive(Parser)]
#[command(version, about, long_about = None)]
struct Cli {
    /// Path to the configuration file
    #[arg(short, long, value_name = "CONFIG")]
    config: PathBuf,

    #[command(subcommand)]
    command: Option<Commands>,
}

#[derive(Subcommand)]
enum Commands {
    /// Synchronize system configuration
    Sync {
        /// Prints changed files without touching them
        #[arg(short, long)]
        dry_run: bool,
    },
}

fn main() {
    let cli = Cli::parse();

    println!("Value for config: {}", cli.config.display());
    
    match &cli.command {
        Some(Commands::Sync { dry_run }) => {
            if *dry_run {
                println!("Dry Run!");
            }
        },
        None => {},
    }
}