cmdcli

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []*command.C{
	{
		Name:     "list",
		Usage:    "[query]",
		Help:     "List the entries in the database.",
		SetFlags: command.Flags(flax.MustBind, &listFlags),
		Run:      command.Adapt(runList),
	},
	{
		Name:     "print",
		Usage:    "<query>",
		Help:     "Print the password for the specified query.",
		SetFlags: command.Flags(flax.MustBind, &pwFlags),
		Run:      command.Adapt(runPW),
	},
	{
		Name:     "copy",
		Usage:    "<query>",
		Help:     "Copy the password for the specified query to the clipboard.",
		SetFlags: command.Flags(flax.MustBind, &pwFlags),
		Run:      command.Adapt(runPW),
	},
	{
		Name:  "otp",
		Usage: "<query>",
		Help: `Print a TOTP code for the specified query.

If the specified query does not match a record with an OTP code,
an error is reported. If a tag is set on the query, and the record
has a detail whose contents are an OTP URL, that URL is used to
generate a code instead of the base record's code.`,
		SetFlags: command.Flags(flax.MustBind, &otpFlags),
		Run:      command.Adapt(runOTP),
	},
	{
		Name: "random",
		Help: `Generate a cryptographically random password.

By default, a password is output as ASCII letters and digits.
Use --no-digits to exclude digits, --symbols to include punctuation.
Use --words to choose words from a word list instead.
Use --sep to choose the word separator when --words is set.

Output is written to stdout, or use --copy to send it to the
clipboard. When --copy is set, a non-cryptographic digest of the
generated value is printed to stdout as a human-readable checksum.

With --set, the password is also stored on the record matching the
given query, in addition to printing or copying it.`,
		SetFlags: command.Flags(flax.MustBind, &randFlags),
		Run:      command.Adapt(runRandom),
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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