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