3 ms·
I have written a one-liner that exports dot-env files stored in `pass` into the current shell for those projects that have a lot of secrets. I don't use `direnv
by wvh 3y ago
I have written a one-liner that exports dot-env files stored in `pass` into the current shell for those projects that have a lot of secrets. I don't use `direnv` though, just close the shell (or all of a project's tabs/windows) when done. Similarly, for Kubernetes, I just export KUBECONFIG by means of an `fzf` script for just that shell. I also keep a terminal window and virtual desktop per project. I have access to too many projects for any secrets or contexts to be set by default.
As a consultant, simple solutions that allow for quickly (manual) setting and getting rid of environments when done have worked best over the years. Using dedicated windows and desktops helps your brain to use "physical" location to keep you from messing things up. Obviously your mileage may vary if you mostly work on just one project at a time.