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