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 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    /// Report the payload this binary carries, with its digests.
56    Payload(payload::PayloadArgs),
57    /// Land a technology's files into a target repository.
58    Init(init::InitArgs),
59    /// Report what landed in a target and whether it drifted.
60    Status(status::StatusArgs),
61    /// Take a landed target to this binary's payload.
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    /// Compute the plan that converges a target toward one release, and print it.
70    Reconcile(reconcile::ReconcileArgs),
71    /// Execute the repository-side setup against the detected forge.
72    Setup(setup::SetupArgs),
73    /// Report and prune local branches the forge already merged.
74    Branches(branches::BranchesArgs),
75    /// Open, inventory, and retire the release lines.
76    Lines(lines::LinesArgs),
77    /// Judge a commit message, title, or body against the content guards.
78    Message(message::MessageArgs),
79    /// Inspect, create, and prune the linked worktrees beside a checkout.
80    Worktree(worktree::WorktreeArgs),
81    /// Start work from a forge issue, with the forge naming the branch.
82    Issue(issue::IssueArgs),
83    /// Inspect and prune the run journals.
84    Runs(runs::RunsArgs),
85    /// Manage the agent skills at user scope.
86    Skill(skill::SkillArgs),
87    /// Wire release-kit as a consumer's dependency and keep its pin fresh.
88    SelfDepend(self_depend::SelfDependArgs),
89    /// Add another project as a dependency of a target, from how the source distributes itself.
90    Depend(depend::DependArgs),
91    /// Run every environment probe and report by class.
92    Doctor(doctor::DoctorArgs),
93    /// Print the whole command surface in one call.
94    Usage,
95    /// Print the license terms the binary carries.
96    License,
97    /// Generate shell completions.
98    Completions(completions::CompletionsArgs),
99}