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