Skip to main content

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