Back to Chezmoi

1Password functions

assets/chezmoi.io/docs/reference/templates/1password-functions/index.md

2.70.21.8 KB
Original Source

1Password functions

The onepassword* template functions return structured data from 1Password using the 1Password CLI (op).

!!! info

When using the 1Password CLI with biometric authentication, chezmoi derives
values from `op account list` that can resolves into the appropriate
1Password *account-uuid*.

As an example, if `op account list --format=json` returns the following
structure:

```json
[
  {
    "url": "account1.1password.ca",
    "email": "[email protected]",
    "user_uuid": "some-user-uuid",
    "account_uuid": "some-account-uuid"
  }
]
```

The following values can be used in the `account` parameter and the value
`some-account-uuid` will be passed as the `--account` parameter to `op`.

- `some-account-uuid`
- `some-user-uuid`
- `account1.1password.ca`
- `account1`
- `[email protected]`
- `my`
- `[email protected]`
- `my@account1`

If there are multiple accounts and any value exists more than once, that
value will be removed from the account mapping. That is, if you are signed
into `[email protected]` and `[email protected]` for `account1.1password.ca`, then
`account1.1password.ca` will not be a valid lookup value, but `my@account1`,
`[email protected]`, `your@account1`, and
`[email protected]` would all be valid lookups.

!!! warning

chezmoi has experimental support for [1Password secrets
automation][automation] modes. These modes change how the 1Password CLI
works and affect all functions. Most notably, `account` parameters are not
allowed on all 1Password template functions.