id = "lpass" name = "LastPass CLI" homepage = "https://github.com/lastpass/lastpass-cli" description = "lpass is a simple command line interface to LastPass." icon = "SimpleIcons:lastpass" executables = ["lpass"] platforms = ["macos", "linux"] [dotfiles] # lpass(1), CONFIGURATION: "If $LPASS_HOME is set, everything goes there. # Otherwise, persistent user-specific data files go in $XDG_DATA_HOME/lpass, # configuration items go in $XDG_CONFIG_HOME, and runtime items (socket, # pidfile, etc) go in $XDG_RUNTIME_HOME. If none of the $XDG environment # variables are set, it falls back to ~/.lpass." # # config.c is the authority on which file is which. config_path_type() sends # only two names to the config directory: anything beginning with "alias" — # "aliases are config files", the per-subcommand default arguments the manual # describes with `echo 'ls --color=never' > ~/.config/lpass/alias.ls` — and # "env", the optional environment-variable overrides. Everything else is # CONFIG_DATA or CONFIG_RUNTIME. # # Both directories are listed because the XDG split only happens when # $XDG_RUNTIME_DIR is set (get_xdg_dir returns NULL otherwise), so a typical # Linux session writes $XDG_CONFIG_HOME/lpass — [configHome], which is the XDG # variable and not a hard-coded ~/.config — while a macOS one writes ~/.lpass. paths = [ "[configHome]/lpass/env", "[configHome]/lpass/alias.*", "~/.lpass/env", "~/.lpass/alias.*", ] exclude = [] # Everything config.c marks CONFIG_DATA: "blob" is the encrypted vault, # "plaintext_key" is its decryption key stored in the clear, the "session_*" # family is the live LastPass session (uid, sessionid, token, privatekey, # server) and "trusted_id" identifies this device to the account. Both the XDG # data directory and the ~/.lpass fallback are named, since which one a machine # uses depends on whether $XDG_RUNTIME_DIR was set. The data directory is # [xdgData] — $XDG_DATA_HOME, else ~/.local/share, on macOS as much as on # Linux — and not [dataHome], which is ~/Library/Application Support on macOS, # a directory lpass never writes to. secret = [ "~/.lpass/blob", "~/.lpass/plaintext_key", "~/.lpass/session_*", "~/.lpass/trusted_id", "[xdgData]/lpass/blob", "[xdgData]/lpass/plaintext_key", "[xdgData]/lpass/session_*", "[xdgData]/lpass/trusted_id", ] # No machine_lines: an alias file is a line of default arguments for one # subcommand, and the env file holds LPASS_* settings such as the agent # timeout. Both are preferences that travel. [commands] format = 1 label = "LastPass CLI" description = "Look up and list LastPass entries. Pick a job below; add, edit, remove, sharing and import/export are left out." quality = "ai-draft" base = "fig:lpass" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/lpass.ts" license = "MIT" [[commands.subcommand]] path = ["login"] label = "Log in" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/lpass.ts" license = "MIT" [[commands.subcommand.field]] id = "username" label = "Account email" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "trust" label = "Trust this device (skip multifactor next time)" type = "boolean" option = ["--trust"] sources = ["fig"] [[commands.subcommand.task]] id = "login" label = "Log in" fields = ["username", "trust"] required = ["username"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["username", "trust"] [[commands.subcommand]] path = ["ls"] label = "List entries" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/lpass.ts" license = "MIT" [[commands.subcommand.field]] id = "group" label = "Group" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "long" label = "Show last modification time" type = "boolean" option = ["--long", "-l"] sources = ["fig"] [[commands.subcommand.field]] id = "used" label = "Show last used time" type = "boolean" option = ["-u"] sources = ["fig"] [[commands.subcommand.task]] id = "list" label = "List a group" fields = ["group", "long"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["group", "long", "used"] [[commands.subcommand]] path = ["show"] label = "Show an entry" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/lpass.ts" license = "MIT" [[commands.subcommand.field]] id = "entry" label = "Entry name or ID" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "password" label = "Only the password" type = "boolean" option = ["--password"] sources = ["fig"] [[commands.subcommand.field]] id = "username" label = "Only the username" type = "boolean" option = ["--username"] sources = ["fig"] [[commands.subcommand.field]] id = "url" label = "Only the URL" type = "boolean" option = ["--url"] sources = ["fig"] [[commands.subcommand.field]] id = "notes" label = "Only the notes" type = "boolean" option = ["--notes"] sources = ["fig"] [[commands.subcommand.field]] id = "clip" label = "Copy to clipboard" type = "boolean" option = ["--clip", "-c"] sources = ["fig"] [[commands.subcommand.field]] id = "json" label = "JSON output" type = "boolean" option = ["--json", "-j"] sources = ["fig"] [[commands.subcommand.task]] id = "copy_password" label = "Copy password" fields = ["entry", "password", "clip"] required = ["entry"] set = { password = [true], clip = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["entry", "password", "username", "url", "notes", "clip", "json"]