feat(cli/org): org init — structure + wrap + configure_git_signing + signed bootstrap commit

This commit is contained in:
adlee-was-taken
2026-06-20 10:27:08 -04:00
parent 570b0ddcd3
commit 7faedf8578
4 changed files with 275 additions and 3 deletions

View File

@@ -207,6 +207,12 @@ enum Commands {
#[command(subcommand)]
cmd: RecoveryQrCmd,
},
/// Multi-user org vault operations.
Org {
#[command(subcommand)]
action: OrgAction,
},
}
#[derive(Subcommand)]
@@ -422,6 +428,19 @@ pub(crate) enum RecoveryQrCmd {
Unwrap,
}
#[derive(clap::Subcommand)]
pub(crate) enum OrgAction {
/// Initialize a new org vault (creates dir structure, git repo, signed commit).
Init {
/// Directory to create the org vault in.
#[arg(long)]
dir: PathBuf,
/// Human-readable display name for the org.
#[arg(long)]
name: String,
},
}
fn main() -> Result<()> {
let cli = Cli::parse();
match cli.command {
@@ -456,6 +475,9 @@ fn main() -> Result<()> {
Commands::Rate { passphrase } => commands::rate::cmd_rate(passphrase),
Commands::Device { action } => commands::device::cmd_device(action),
Commands::RecoveryQr { cmd } => commands::recovery_qr::cmd_recovery_qr(cmd),
Commands::Org { action } => match action {
OrgAction::Init { dir, name } => commands::org::run_init(&dir, &name),
},
}
}