1Password CLI and AWS credentials

ChrisHildebrand
ChrisHildebrand
Community Member
edited March 2018 in CLI

I've recently found myself switching between AWS accounts and environments more often than I used to. I've also been looking for an excuse to use 1Password's CLI tool more, and to write more Golang code. So, I wrote something to aid myself on all those fronts. In short, the program will take the output from a 'op get thing' command, and output 'export' statements that can be consumed by source or eval to set environment variables. In case the program is directly helpful or inspires similar ideas for others, I thought I'd share.

https://github.com/ckhrysze/gop


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

Comments

  • That is so cool! Thanks for sharing, @ChrisHildebrand.

    Rick

  • jpgoldberg
    jpgoldberg
    1Password Alumni

    That is really nice. I could see generalizing it so that things like SectionName, AccessField etc are part of a struct type. Then your parse1PasswordEntry() could be a method of that type.

    Of course none of that is necessary for your particular needs, but a little help in parsing 1Password items for which you have some consistent section and field naming is going to be something generally useful.

This discussion has been closed.