feat(cli): add runbook references to all miroir-ctl subcommands (P11.4)

Add after_help text to all 17 miroir-ctl subcommands with links to their
runbook documentation in docs/ctl/*.md.

- status, node, rebalance, task, verify, dump, ui, reshard: core commands
- alias, canary, cdc, explain, shadow, tenant, ttl, key: feature commands

Acceptance criteria met:
✓ Every subcommand has a matching docs/ctl/*.md runbook (pre-existing)
✓ --help mentions where to find runbook (now added)
✓ Runbooks are all under 100 lines each (verified: max 67 lines)

Closes: miroir-uyx.4

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-05-25 03:07:44 -04:00
parent 44cc1c68a3
commit 6358bdddef
16 changed files with 16 additions and 0 deletions

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Manage index aliases", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/alias.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum AliasSubcommand {
/// Create a new alias
Create,

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Manage canary deployments", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/canary.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum CanarySubcommand {
/// Create a canary deployment
Create,

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Manage change data capture", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/cdc.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum CdcSubcommand {
/// Create a CDC subscription
Create,

View file

@ -2,6 +2,7 @@ use clap::Subcommand;
use reqwest::Client;
#[derive(Subcommand, Debug)]
#[command(about = "Dump and inspect data", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/dump.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum DumpSubcommand {
/// Import a Meilisearch dump file into Miroir
///

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Explain query plans", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/explain.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum ExplainSubcommand {
/// Explain a query plan or operation
Query {

View file

@ -10,6 +10,7 @@ use std::io::{self, Write};
/// Key management commands.
#[derive(Subcommand, Debug)]
#[command(about = "Manage API keys", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/key.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum KeySubcommand {
/// Rotate the admin-scoped nodeMasterKey (zero-downtime).
///

View file

@ -9,6 +9,7 @@ use serde_json::json;
use std::time::Duration;
#[derive(Subcommand, Debug)]
#[command(about = "Manage cluster nodes", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/node.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum NodeSubcommand {
/// Add a new node to the cluster
Add(AddNodeArgs),

View file

@ -9,6 +9,7 @@ use std::time::Duration;
use tokio::time::sleep as tokio_sleep;
#[derive(Subcommand, Debug)]
#[command(about = "Manage rebalancing operations", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/rebalance.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum RebalanceSubcommand {
/// Show rebalancing status
Status {

View file

@ -4,6 +4,7 @@ use clap::Subcommand;
use miroir_core::reshard::{check_window_now, ReshardingConfig, WindowGuardResult};
#[derive(Subcommand, Debug)]
#[command(about = "Manage resharding operations", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/reshard.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum ReshardSubcommand {
/// Start an online resharding operation (plan §13.1).
///

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Manage shadow indexing", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/shadow.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum ShadowSubcommand {
/// Create a shadow index
Create,

View file

@ -5,6 +5,7 @@ use std::time::Duration;
use tokio::time::sleep as tokio_sleep;
#[derive(Parser, Debug)]
#[command(about = "Show cluster status and health", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/status.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub struct StatusSubcommand {
/// Watch mode: continuously refresh status
#[arg(short, long)]

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Monitor and manage background tasks", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/task.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum TaskSubcommand {
/// Show all background tasks
List,

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Manage multi-tenancy", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/tenant.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum TenantSubcommand {
/// Create a new tenant
Create,

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Manage TTL policies", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/ttl.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum TtlSubcommand {
/// Set a TTL policy
Set,

View file

@ -7,6 +7,7 @@ use std::io::{self, Write};
use std::process::Command;
#[derive(Subcommand, Debug)]
#[command(about = "Launch the web UI", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/ui.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum UiSubcommand {
/// Launch the web UI
Launch {

View file

@ -1,6 +1,7 @@
use clap::Subcommand;
#[derive(Subcommand, Debug)]
#[command(about = "Verify data integrity", after_help = "Runbooks: https://github.com/jedarden/miroir/blob/main/docs/ctl/verify.md\n\nSee `miroir-ctl help` for a list of all subcommands.")]
pub enum VerifySubcommand {
/// Verify data integrity for a key prefix
Check {