Skip to main content

release_kit/cli/
init.rs

1//! Arguments for `rk init`.
2
3use camino::Utf8PathBuf;
4use clap::Args;
5
6/// Land a technology's deterministic files into a target repository.
7#[derive(Debug, Args)]
8pub struct InitArgs {
9    /// The technology whose files land; one of the bindings.
10    #[arg(long)]
11    pub tech: String,
12
13    /// The repository the files land into.
14    #[arg(long)]
15    pub target: Utf8PathBuf,
16
17    /// The forge whose files land: github or gitlab. Defaults to detection
18    /// from the target's git remote; an unrecognized host refuses.
19    #[arg(long)]
20    pub forge: Option<String>,
21
22    /// The project path on the forge, substituted into the rendered files
23    /// and recorded as the landing parameter. Defaults to detection from
24    /// the target's git remote; an apply with neither refuses.
25    #[arg(long)]
26    pub repo: Option<String>,
27
28    /// The Conventional Commit scopes this project accepts,
29    /// comma-separated, rendered into the title checks and the commit
30    /// hook and recorded as a landing parameter. An apply without it
31    /// refuses: the scope vocabulary is a decision, not a default.
32    #[arg(long)]
33    pub scopes: Option<String>,
34
35    /// Write the files; without it the destinations are listed and nothing
36    /// is touched.
37    #[arg(long)]
38    pub apply: bool,
39
40    /// Emit one JSON object on stdout instead of the human report.
41    #[arg(long)]
42    pub json: bool,
43}