use std::path::PathBuf;
use clap::{Parser, Subcommand};
use crate::platform::Platform;
#[derive(Debug, Parser)]
#[command(name = "dotling", version, about)]
pub struct Cli {
#[arg(short, long, global = true)]
pub verbose: bool,
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub enum Command {
Init {
path_or_url: String,
},
Link {
path: PathBuf,
#[arg(long)]
as_dir: bool,
#[arg(long)]
copy: bool,
#[arg(long)]
no_commit: bool,
#[arg(long, default_value = "all")]
os: Platform,
},
Unlink {
path: PathBuf,
#[arg(long)]
purge: bool,
},
Sync {
#[arg(long)]
push: bool,
#[arg(long)]
force: bool,
#[arg(long)]
dry_run: bool,
},
Push {
message: Option<String>,
},
Status,
Diff {
file: Option<PathBuf>,
},
Apply {
#[arg(long)]
dry_run: bool,
},
PullBack {
file: String,
},
List,
Doctor,
}