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