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