feat: Added command aliases to make the CLI more universal

This commit is contained in:
2025-09-29 16:30:39 -06:00
parent 9abd2f88cf
commit f006503736
+4
View File
@@ -77,12 +77,14 @@ struct Cli {
#[derive(Subcommand, Clone, Debug)] #[derive(Subcommand, Clone, Debug)]
enum Commands { enum Commands {
/// Add a secret to the configured secret provider /// Add a secret to the configured secret provider
#[clap(aliases = &["set", "create"])]
Add { Add {
/// Name of the secret to store /// Name of the secret to store
name: String, name: String,
}, },
/// Decrypt a secret and print the plaintext /// Decrypt a secret and print the plaintext
#[clap(alias = "show")]
Get { Get {
/// Name of the secret to retrieve /// Name of the secret to retrieve
#[arg(add = ArgValueCompleter::new(secrets_completer))] #[arg(add = ArgValueCompleter::new(secrets_completer))]
@@ -98,6 +100,7 @@ enum Commands {
}, },
/// Delete a secret from the configured secret provider /// Delete a secret from the configured secret provider
#[clap(aliases = &["remove", "rm"])]
Delete { Delete {
/// Name of the secret to delete /// Name of the secret to delete
#[arg(add = ArgValueCompleter::new(secrets_completer))] #[arg(add = ArgValueCompleter::new(secrets_completer))]
@@ -106,6 +109,7 @@ enum Commands {
/// List all secrets stored in the configured secret provider (if supported by the provider) /// List all secrets stored in the configured secret provider (if supported by the provider)
/// If a provider does not support listing secrets, this command will return an error. /// If a provider does not support listing secrets, this command will return an error.
#[clap(alias = "ls")]
List {}, List {},
/// Sync secrets with remote storage (if supported by the provider) /// Sync secrets with remote storage (if supported by the provider)