1
Environment Variables for Other CLI Tools
Bernd Schoolmann edited this page 2023-12-28 10:09:09 +01:00
Goldwarden can inject environment variables into the environment of a cli command.
First, create a secure note in bitwarden, and add the following custom fields (using restic as an example):
custom-type: env
executable: name_of_executable
# env variables
AWS_ACCESS_KEY_ID: <your access key>
AWS_SECRET_ACCESS_KEY: <your secret key> (hidden)
RESTIC_PASSWORD: <your restic password> (hidden)
# optional
RESTIC_REPOSITORY: <your restic repository>
...
Then, run the command:
goldwarden run -- <command>
I.e
goldwarden run -- restic backup
You can also alias the commands, such that every time you run them, the environment variables are injected:
alias restic="goldwarden run -- restic"
And then just run the command as usual:
restic backup