God, Love, News, Event, Entertainment, Amebo,..... All about Bringing out the best in you...
Show HN: Envelope – A modern environment variable cli tool https://ift.tt/4lvdxjX
Show HN: Envelope – A modern environment variable cli tool Hey HN! I've built this cli tool to manage env variables of a project, but mostly for fun and to try out Rust and the clap crate. I had this idea when I made a big mistake and broke some production stuff because I had a very messy .env file laying around in my project. I was implementing new features for one of my projects and in my .env file I had the test database url commented out and the production one was not. Long story short, I applied migrations to the production database instead of my local test one and broke a lot of production APIs :') I wanted a tool that could easily help me spot these issues before something bad happened, and so I built envelope for that reason. Instead of a \.env(\..+)? file, I now use this tool to add variables to different configurations: dev, prod etc. and I feed them to the program I am executing on a one liner. $ envelope init $ envelope add dev db_url localhost:5432/postgres $ envelope add dev db_username username $ envelope add dev db_pwd pwd $ export $(envelope list dev) $ ./run.sh This way I am explicitly exporting the dev environment without relying on the fact that everything is in order in my .env file (another approach would be to have a .env.dev file) A very useful feature that I use quite a lot is the `check` command which is going to tell you which environment you have currently active $ export $(envelope list dev) $ envelope check > dev I don't think this tool is going to be useful to anybody, but I wanted to share this with you in case there is someone that can make good use of it or find particular scenarios where this could be used instead of .env files, either way I had a lot of fun building it https://ift.tt/ySbalRY June 22, 2024 at 02:39AM
Subscribe to:
Post Comments (Atom)
Show HN: WineBar: A yet another Wine prefix manager, with Asahi Linux support https://ift.tt/yTUc2KC
Show HN: WineBar: A yet another Wine prefix manager, with Asahi Linux support My daily driver is a Macbook Air M2 running Linux - Fedora Asa...
-
A word of prayer for you this month of July. God bless you abundantly, Amen. Fr. Kris Ikegwuonu, MDM. (+234 803 435 7990)
-
Show HN: Applesoft BASIC editor with example programs This is an Applesoft BASIC editor that extracts and updates code into a live Apple II ...
-
Show HN: A Spotify player in the terminal with full feature parity https://ift.tt/oZgrl1Q July 18, 2024 at 02:57AM
No comments:
Post a Comment