harmont_cli/cli/run.rs
1use clap::Parser;
2use std::path::PathBuf;
3
4#[derive(Debug, Clone, Parser)]
5pub struct RunArgs {
6 /// Pipeline slug. Required when the repo declares more than one
7 /// `@hm.pipeline`; the CLI lists available slugs when omitted.
8 #[arg()]
9 pub pipeline: Option<String>,
10
11 /// Branch to record on the build.
12 #[arg(short, long)]
13 pub branch: Option<String>,
14
15 /// Build message.
16 #[arg(short, long)]
17 pub message: Option<String>,
18
19 /// Environment variables (KEY=VALUE).
20 #[arg(short, long)]
21 pub env: Vec<String>,
22
23 /// Source root (defaults to cwd).
24 #[arg(short, long)]
25 pub dir: Option<PathBuf>,
26
27 /// Skip watching the build after it's created.
28 #[arg(long)]
29 pub no_watch: bool,
30
31 /// Maximum number of chains to run concurrently. Defaults to the
32 /// host's available parallelism. `0` is treated as `1`.
33 #[arg(long, value_name = "N")]
34 pub parallelism: Option<usize>,
35
36 /// Output formatter (matches an installed output-formatter plugin
37 /// `name`). Built-ins: `human`, `json`. Default: `human`.
38 #[arg(long, value_name = "NAME", default_value = "human", global = false)]
39 pub format: String,
40
41 /// Stream full build logs instead of showing progress bars.
42 /// Has no effect with `--format json`.
43 #[arg(long)]
44 pub logs: bool,
45}