#[derive(Args, Debug)]
pub struct BatchArgs {
#[command(flatten)]
pub strict: crate::cli_args::StrictAtomicArgs,
#[arg(long, help = "Show what would be done without executing", action = clap::ArgAction::SetTrue)]
pub dry_run: bool,
#[arg(long, help = "Read manifest from file instead of stdin", value_hint = ValueHint::FilePath)]
pub file: Option<PathBuf>,
#[arg(
long,
help = "All-or-nothing: rollback all changes if any operation fails",
action = clap::ArgAction::SetTrue
)]
pub transaction: bool,
#[arg(long, help = "Print JSON Schema for the batch input manifest", action = clap::ArgAction::SetTrue)]
pub input_schema: bool,
#[arg(
long,
default_value_t = crate::constants::DEFAULT_LIST_LIMIT,
help = "Operations to buffer before emitting the summary line"
)]
pub batch_size: usize,
#[command(flatten)]
pub backup_opts: BackupOpts,
}
#[derive(Debug, Clone, Copy, ValueEnum, Default)]
pub enum PatchFormat {
#[default]
Auto,
Unified,
SearchReplace,
Full,
Markdown,
}
#[derive(Args, Debug)]
pub struct SetArgs {
#[command(flatten)]
pub strict: crate::cli_args::StrictAtomicArgs,
#[arg(value_hint = ValueHint::FilePath)]
pub path: PathBuf,
pub key_path: String,
pub value: String,
#[arg(long, help = "Report the planned change and write nothing", action = clap::ArgAction::SetTrue)]
pub dry_run: bool,
#[command(flatten)]
pub backup_opts: BackupOpts,
#[arg(long, help = "Preserve original mtime/atime", action = clap::ArgAction::SetTrue)]
pub preserve_timestamps: bool,
}
#[derive(Args, Debug)]
pub struct CaseArgs {
#[command(flatten)]
pub strict: crate::cli_args::StrictAtomicArgs,
#[arg(required = true, value_hint = ValueHint::AnyPath)]
pub paths: Vec<PathBuf>,
#[arg(short = 'g', long, action = clap::ArgAction::Append, help = "Include files matching glob")]
pub include: Vec<String>,
#[arg(long, action = clap::ArgAction::Append, help = "Exclude files matching glob")]
pub exclude: Vec<String>,
#[arg(
long = "subvert",
num_args = 2,
value_name = "OLD NEW",
required = true,
help = "Old and new identifier (repeat for multiple pairs; required — no global scan)"
)]
pub subvert: Vec<String>,
#[arg(long, value_enum, default_value_t = IdentifierCase::Snake, help = "Target case style")]
pub to: IdentifierCase,
#[command(flatten)]
pub backup_opts: BackupOpts,
#[arg(long, help = "Preserve original mtime/atime", action = clap::ArgAction::SetTrue)]
pub preserve_timestamps: bool,
#[arg(long, help = "Show what would be changed without writing", action = clap::ArgAction::SetTrue)]
pub dry_run: bool,
}
#[derive(Args, Debug)]
pub struct WalStatsArgs {
#[arg(long, help = "Show what would be done without scanning", action = clap::ArgAction::SetTrue)]
pub dry_run: bool,
}