1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! `init` subcommand: parse-shape.
//!
//! Holds the clap derive struct only. No I/O, no business logic.
use camino::Utf8PathBuf;
use crate::domain::profile::ProfileId;
/// Install the payload into a target repository.
#[derive(Debug, clap::Args)]
pub struct InitArgs {
/// The target repository; must be an absolute path.
#[arg(long)]
pub target: Utf8PathBuf,
/// The profile to install.
#[arg(long, value_enum)]
pub profile: ProfileId,
/// Write into a non-empty target that has no instance yet.
#[arg(long, conflicts_with = "dry_run")]
pub apply: bool,
/// Preview only; write nothing.
#[arg(long)]
pub dry_run: bool,
/// Where the planning tool writes entry documents: a repository-relative
/// path, `untracked:<PATH>`, `env`, or `none`. Write `./none` or `./env`
/// for a directory carrying either name. Omitted, the recorded value
/// stays.
#[arg(long, value_name = "VALUE")]
pub plan_zone: Option<String>,
/// A path no delivered gate judges, recorded under `reserved:` in the
/// instance's declaration. Repeatable.
///
/// Use it for a region another tool owns. Omitted, a recorded value
/// stays.
#[arg(long, value_name = "PATH")]
pub reserve: Vec<String>,
/// Where material that is not a statement yet is kept, as a path that may
/// leave the repository, or `none` to clear a recorded value. Omitted,
/// the recorded value stays.
#[arg(long, value_name = "PATH")]
pub docs_scratch: Option<String>,
/// Where the writing style comes from: `builtin` routes authors to
/// `sdd method writing-style`, `project:<PATH>` routes them to the
/// project's own document, and `none` installs no route and imposes no
/// conversion obligation. Recorded in the instance's declaration.
/// Omitted, the recorded value stays.
#[arg(long, value_name = "SELECTION")]
pub writing_style: Option<String>,
}