Secrets in the shell & how to avoid them: 1Password CLI
We use passwords, API keys/tokens, secrets in general. We use them locally to test more frequently than we would like to admit. We store them in shell environment variables and tell ourselves we will clean them up afterwards. But that is not what always happens, is it? The idea of this post is to present you an alternative: I will show you how to stop storing secrets locally by using the 1Password CLI to retrieve them at runtime, including a small trick for MCP servers, so you never have to paste tokens into plain JSON config files again. ...