*** This is a draft. Please expect updates ***
Initially I didn’t have more complicated needs than wanting a tool to tinker and play with simple REST APIs, so I looked around and found Bruno.
As many APIs require some authentication, you often need to manage credentials, tokens or other sensitive data which shouldn’t be in your git repo, and luckily Bruno has a nice way it can be used with 1Password which is my password manager of choice.
What can Bruno do?
Bruno can basically offer you a simple interface to play with APIs. I’m working on a small collection of examples of public APIs as examples of what Bruno can do.
You can find my collection at GitHub: https://github.com/mahler/UseBruno-collections
(Most of the APIs I play with a private internal APIs for work, so sorry, they’re not there.)
Getting ready with 1Password
If you haven’t setup the 1Password CLI, you need it now.
- Install 1Password CLI and enable the CLI
If you’ve setup the one password CLI up correctly, this should work:
op signin op vault list
It should prompt you to login to 1Password (unless you’re already logged in) and list your password vaults (you may only have one).
As a final step make an empty .env file.
Making it work…
Launch Bruno from the command line / a shell using his command:
export OPENWEATHER_APPID="op://Vault/Entry/Item" op run --env-file="./.env" -- open -a Bruno
The exported varible contains a reference to an item in your valut (hopefully). You can get this URL-like reference by copying the secret reference. If you don’t see the option, you may have forgotten to enable the 1Password Desktop App Integration.