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