HACKER Q&A
📣 sebst

What clever tools/scripts do you use to manage envs?


I see a lot of people using some scripts with tmux and dotenv/direnv.

I’m wondering if you have any clever productivity hacks for switching between different projects, managing infrastructure services, secrets, tools, versions etc.


  👤 bobbyraduloff Accepted Answer ✓
I’m ashamed to admit we have a discord channel for each project and we dump secrets there with access control to the channels based on who works on the project.

It’s peak startup opsec.


👤 thisdougb
Earlier this year I made this https://doocot.sh/ for securely sharing secrets between people.

It's written in Go with no dependencies (or database). My intention was for an AWS image or something companies could run inhouse air-gapped from the Internet. Something like $10/m or so.

The cli is pretty easy to integrate with scripts: https://github.com/thisdougb/doocot

Longer term secrets were something I was looking at too. Pretty easy to extend this, but encroaches on Vault products and I felt that a harder sell to CTOs.

I've worked in infra/systems dev for years, and this sort of thing was bread and butter stuff.

Maybe I'll resurect it as an active project. What sort of feature/tool would get you to stop using Discord/Slack/etc for secrets?


👤 anttiharju
https://flox.dev is pretty great

👤 twalla

👤 viraptor
Nothing fancy. Direnv with mise can handle most environment differences. Direnv with 1password integration adds secrets. Infrastructure lives as code in the `infrastructure/` directory of the project. Nix manages all tooling and native library requirements.

👤 brudgers
[delayed]

👤 seanwilson
This feels pretty basic, but you can write a startup script for a specific project, say called `project123` where when you run it from the terminal, it switches to your project directory, starts Docker, runs the local dev startup command, opens your IDE, pulls from Git, opens the GitHub page of issues assigned to you, open a browser pointing to your localhost server etc. and whatever common stuff you need to do each day.

Stick some scripting at the start to close windows/programs that might be sticking around from other projects, and now you can switch between projects with a lot less friction.