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    /// Write the files; without it the destinations are listed and nothing
29    /// is touched.
30    #[arg(long)]
31    pub apply: bool,
32
33    /// Emit one JSON object on stdout instead of the human report.
34    #[arg(long)]
35    pub json: bool,
36}