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