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