Skip to main content

release_kit/cli/
runs.rs

1//! Arguments for `rk runs`.
2
3use clap::{Args, Subcommand};
4
5/// Inspect and prune the run journals under the state root.
6#[derive(Debug, Args)]
7pub struct RunsArgs {
8    /// What to do with the journals.
9    #[command(subcommand)]
10    pub action: RunsAction,
11}
12
13/// The journal verbs.
14#[derive(Debug, Subcommand)]
15pub enum RunsAction {
16    /// List the kept runs, oldest first.
17    List {
18        /// Emit one JSON object on stdout instead of the human report.
19        #[arg(long)]
20        json: bool,
21    },
22    /// Print one run's record and where its files live.
23    Show {
24        /// The run id, from `rk runs list`.
25        id: String,
26        /// Emit one JSON object on stdout instead of the human report.
27        #[arg(long)]
28        json: bool,
29    },
30    /// Remove old runs past the retention bound.
31    Prune {
32        /// How many newest runs to keep; defaults to the retention bound.
33        #[arg(long)]
34        keep: Option<usize>,
35    },
36}