logoalt Hacker News

ryuuseijintoday at 7:50 AM0 repliesview on HN

For development on linux I like to use dotenvx, which lets you put encrypted secrets in an .env file and supply the private key separately.

I have a small wrapper script [1] that prompts for the private key which allows me to paste it from my password manager and launches a shell with the env variables decrypted. This allows me to avoid storing any secrets while still having shell session open where I can terminate and restart a server process for example without having to re-enter the secret all the time.

[1] https://gist.github.com/ryuuseijin/0cf6ab852fbb18d6702933a24...