1Password CLI and AWS credentials

edited March 2018 in CLI Beta

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.


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


  • rickfillionrickfillion Junior Member

    Team Member

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


  • jpgoldbergjpgoldberg Agile Customer Care

    Team Member

    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file