Skip to main content

release_kit/
cli.rs

1//! Command-line surface: clap derive types only, one module per
2//! subcommand's arguments. No behavior lives here; each variant routes to
3//! its handler in `commands`.
4
5pub mod adopt;
6pub mod branches;
7pub mod completions;
8pub mod doctor;
9pub mod guide;
10pub mod init;
11pub mod payload;
12pub mod read;
13pub mod runs;
14pub mod setup;
15pub mod skill;
16pub mod status;
17pub mod upgrade;
18pub mod versions;
19
20use clap::{Parser, Subcommand};
21
22/// The release-kit CLI: reads the canon and lands the deterministic files.
23#[derive(Debug, Parser)]
24#[command(name = "rk", version, about, propagate_version = true)]
25pub struct Cli {
26    /// Which subcommand to run.
27    #[command(subcommand)]
28    pub command: Commands,
29}
30
31/// Every subcommand the binary offers.
32#[derive(Debug, Subcommand)]
33pub enum Commands {
34    /// Read the technology-agnostic method chapters.
35    Method(read::ReadArgs),
36    /// Read the per-technology bindings.
37    Binding(read::ReadArgs),
38    /// Read the deterministic files a binding lands.
39    Snippet(read::ReadArgs),
40    /// Print a runbook with what detection knows filled in.
41    Guide(guide::GuideArgs),
42    /// Read the per-forge documents.
43    Forge(read::ReadArgs),
44    /// Print the pinned-tool registry, with --check as its online freshness report.
45    Versions(versions::VersionsArgs),
46    /// Report the payload this binary carries, with its digests.
47    Payload(payload::PayloadArgs),
48    /// Land a technology's files into a target repository.
49    Init(init::InitArgs),
50    /// Report what landed in a target and whether it drifted.
51    Status(status::StatusArgs),
52    /// Take a landed target to this binary's payload.
53    Upgrade(upgrade::UpgradeArgs),
54    /// Record a target landed before the record existed.
55    Adopt(adopt::AdoptArgs),
56    /// Execute the repository-side setup against the detected forge.
57    Setup(setup::SetupArgs),
58    /// Report and prune local branches the forge already merged.
59    Branches(branches::BranchesArgs),
60    /// Inspect and prune the run journals.
61    Runs(runs::RunsArgs),
62    /// Manage the agent skills at user scope.
63    Skill(skill::SkillArgs),
64    /// Run every environment probe and report by class.
65    Doctor(doctor::DoctorArgs),
66    /// Print the whole command surface in one call.
67    Usage,
68    /// Print the license terms the binary carries.
69    License,
70    /// Generate shell completions.
71    Completions(completions::CompletionsArgs),
72}