cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_PASS_LENGTH = 16
	TARGET_ENTROPY      = 80
)
View Source
const (
	TREE_MID = "├──"
	TREE_END = "└──"
)
View Source
const (
	DIR_DELIM = "/"
)

Variables

View Source
var (
	ErrNoPassName    = errors.New("no password name was given")
	ErrEntrotyTooLow = errors.New("password entropy is too low")
)
View Source
var (
	ErrNoCredentials = errors.New("no credentials found")
)

Functions

func CP

func CP(store, name, newname string, force bool) (o, n string, err error)

Copies a pass file or directory to a new path.

func Edit

func Edit(store, name string) (err error)

func Find

func Find(store, pattern string) (matches []string, err error)

func Generate

func Generate(store string, noSym, inPlace, strong bool, args []string) (file string, err error)

Main handler for 'generate' subcommand. It generates a password according to given configuration, encrypts it for all recipients under given store, and persist it, and returns the generated password and path to created/modified pass file.

func InitStore

func InitStore(path string) (err error)

Initializes the passage store containing credentials and recipient public keys.

If no path is given, the store is created under '${HOME}/.passage-store' with following structure: - '.recipients': file containing public keys to encrypt passes with. - './': root directory containing encrypted passwords

func Insert

func Insert(store, name string, echo, multi, force bool) (file string, err error)

func LS

func LS(store, subdir string)

func MV

func MV(store, name, newname string, force bool) (o, n string, err error)

Moves a pass file or directory to a new path.

func RM

func RM(store, name string, force, recursive bool) (err error)

Removes a pass file or directory from the store.

func ReadPin

func ReadPin() ([]byte, error)

Reads device PIN in terminal

func ReadRune

func ReadRune() (r rune, err error)

Reads a single rune from stdin, e.g., for y/n questions.

func ReadYesNo

func ReadYesNo() (bool, error)

Reads a signe rune and returns true if it's 'y' or 'Y'.

func Readline

func Readline() (r []byte, err error)

Reads one line from stdin

func Show

func Show(store, name string) (err error)

Decrypts and reveals contents of the desired password file.

func Tree

func Tree(indent int, seal, sidebar bool, entries ...string)

Prints the entries in a tree format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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