Skip to main content

spec_driven_docs/cli/
upgrade.rs

1//! `upgrade` subcommand: parse-shape.
2//!
3//! Holds the clap derive struct only. No I/O, no business logic.
4
5use camino::Utf8PathBuf;
6
7/// Upgrade an installed instance to this binary's version.
8#[derive(Debug, clap::Args)]
9pub struct UpgradeArgs {
10    /// The instance to upgrade; absolute, or the working directory.
11    #[arg(long, default_value = ".")]
12    pub target: Utf8PathBuf,
13
14    /// Report the plan and change nothing.
15    #[arg(long)]
16    pub dry_run: bool,
17
18    /// Land the choices a stage recorded for this target: its docs scratch,
19    /// writing style, reserved paths, and acquisition decision. Every byte
20    /// is still rendered from this binary; only the stage's receipt is
21    /// read, and a receipt another release or another target wrote refuses.
22    #[arg(long, value_name = "ROOT")]
23    pub stage: Option<Utf8PathBuf>,
24
25    /// Overwrite this conflict, as the run lists it; repeatable. Its bytes
26    /// are saved first, and every conflict not named still refuses.
27    #[arg(long, value_name = "PATH")]
28    pub replace: Vec<String>,
29
30    /// Print one JSON object instead of text.
31    #[arg(long)]
32    pub json: bool,
33}