Skip to content

onepasswordRead url [account]

onepasswordRead returns data from 1Password using the 1Password CLI (op). url is passed to the op read --no-newline command. If account is specified, the extra arguments --account $ACCOUNT are passed to op.

If there is no valid session in the environment, by default you will be interactively prompted to sign in.

Example

The result of

{{ onepasswordRead "op://vault/item/field" }}

is equivalent to calling

$ op read --no-newline op://vault/item/field

Warning

When using 1Password secrets automation, the account parameter is not allowed.