fnox get
- Usage:
fnox get [FLAGS] [KEY]
Print the resolved value of one secret
Resolves KEY for the active profile through its provider, a lease backend, or the daemon cache, and prints the value to stdout followed by a newline. A secret with as_file = true prints the path of a temporary file that holds the value instead.
A provider error, such as a missing item or a failed login, makes get fail whatever the secret's if_missing, unless the secret has a default to fall back on. if_missing applies when there is nothing to read (no provider value, default or environment variable): error fails, while warn and ignore print nothing to stdout and exit 0. To check that secrets resolve without printing them, use fnox check.
Arguments
[KEY]— Secret to print
Flags
--base64-decode— Decode a base64-encoded value before printing itA value that decodes to binary data, such as a keystore stored with
fnox set --base64-encode, is written as raw bytes with no trailing newline.--file <FILE>— Print the file stored for this path, verbatim, instead of a secretLooks PATH up in the files of the active profiles (see
fnox files).--refresh— Re-fetch the value from its provider instead of the daemon cache, and cache it-h --help— Print help
Examples
Print a secret
fnox get DATABASE_URLRead from another profile
fnox -P staging get DATABASE_URLDecode a base64 value into a file
fnox get TLS_CERT --base64-decode > cert.pem