feat(cli/org): org init — structure + wrap + configure_git_signing + signed bootstrap commit
This commit is contained in:
@@ -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),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user