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
create a secure notes with content like (eg: with the name "db-dev")
1
DB_USER=USER1
2
DB_PASSWORD=PASSWORD
Copied!
login 1password
1
eval (op signin my)
Copied!
load the note
1
export (op get item "db-dev" | jq -r .details.notesPlain)
Copied!
Last modified 1mo ago
Copy link