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