Skip to main content
Version: v5.7.0

opschain secret get

Included from Basic tier

opschain secret get <key>

Prints a secret's plaintext value from the local secret store to stdout — it is the requested output, so redirect accordingly. With -o json or -o yaml the output is a document with key and value fields instead of the bare value. First-use master-key notices go to stderr (see opschain docs cli/secret).

Exit codes​

CodeMeaning
0Printed.
1The key does not exist, or the store could not be opened.
2Usage error.

Named errors​

  • secret <key> not found — no secret is stored under the key.

Examples​

opschain secret get db/password
opschain secret get db/password -o json
{
"key": "db/password",
"value": "…"
}

See also​

  • opschain docs cli/secret-set, opschain docs cli/secret-ls.