commands

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package commands contains all CLI command implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMinimalEnv

func BuildMinimalEnv(keys map[string]string) []string

BuildMinimalEnv creates an environment with minimal system vars plus the given keys.

func ExecCmd

func ExecCmd(cfg *Config) *cobra.Command

ExecCmd creates the exec command.

func GetCmd

func GetCmd(cfg *Config) *cobra.Command

GetCmd creates the get command.

func GetUsername

func GetUsername(cfg *Config) (string, error)

GetUsername returns the username from config or prompts for selection.

func InitCmd

func InitCmd(cfg *Config) *cobra.Command

InitCmd creates the init command.

func ListCmd

func ListCmd(cfg *Config) *cobra.Command

ListCmd creates the list command.

func RemoveCmd

func RemoveCmd(cfg *Config) *cobra.Command

RemoveCmd creates the remove command.

func SelectUser

func SelectUser() (string, error)

SelectUser prompts the user to select from available vaults.

func SetCmd

func SetCmd(cfg *Config) *cobra.Command

SetCmd creates the set command.

func ValidateKeyName

func ValidateKeyName(name string) error

ValidateKeyName checks if a key name is valid.

func VersionCmd

func VersionCmd(version string) *cobra.Command

VersionCmd creates the version command.

Types

type Config

type Config struct {
	User         *string
	PasswordFile *string
	KeyValue     *string
	GetPassword  func(prompt string) (string, error)
	ReadPassword func(prompt string) (string, error)
	ReadConfirm  func(prompt string) (string, error)
}

Config holds shared configuration and dependencies for all commands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL