Signing back into the Community for the first time? You'll need to reset your password to access your account.  Find out more.

Forum Discussion

jc00ke's avatar
jc00ke
New Contributor
3 years ago

Secret reference syntax usable by direnv?

I see on docs/cli/secrets-environment-variables that I can op run -- myapp start but what if I wanted to load secret values via direnv? I don't see anything in the direnv-stdlib and was wondering if anyone had a solution.

Thanks!


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided

  • Former Member's avatar
    Former Member

    Actually, I found that adding the passwords to .envrc like so works: export BAR="$(op read op://vault/item/[section/]field)". A bit verbose, but it's a start

  • Former Member's avatar
    Former Member

    I am having the same question. Also tried some shell foo to integrate op with direnv, but have not been successful so far. Anybody has an idea?