fish environment variables from 1password

A common task is to load environment variables from secret. With password manager like 1password, you can store it as notes and use the CLI to load it to your shell env

Install 1password CLI

create a secure notes with content like (eg: with the name "db-dev")


login 1password

eval (op signin my)

load the note

export (op get item "db-dev" | jq -r .details.notesPlain)

Last updated