Use Key in pipes and scripts
Send secrets into Key through standard input, and pass stored values to other tools. An unlocked session can serve a sequence of commands without asking you to approve each one.
Save a value without putting it in the command.
Key accepts a hidden prompt or standard input. A generator can pass its output directly into the vault, keeping the secret itself out of command arguments and shell history.
For example, OpenSSL generates a random value and sends it to a named entry:
openssl rand -base64 32 | key add services/apiKeep the value intact through a pipeline.
key get sends the value to standard output. For a pipe or file, it adds no presentation newline; prompts and errors use standard error. Ordinary secret entries preserve their UTF-8 input, including line breaks.
key list returns entry names. With fzf installed, you can select an entry and copy its value in one command:
key copy "$(key list | fzf)"Know where plaintext goes.
Once you print, copy, or pass a value to another program, that destination has the plaintext. Running key lock ends the local unlocked session; it does not erase terminal output or clipboard contents.
