envset
envset is a CLI for setting environment variables in .env files.
this is something you may have never considered needing a specialized tool for. and you don't. but just like updating a git config it's more fun with a command.
installation
currently available on homebrew and crates.io
otherwise, grab the latest release.
usage
set vars
# basic usage, FYI that it prints a diff of the changes to stdout
# some env vars are normally very annoying to set, like json or multiline strings.
# but envset has your back!
# pipe in stdin, useful for copying stuff from one env to another
|
# heroku users can easily copy parts of their config
| |
# override the default path to a .env file
read vars
# a few ways to print the current .env
# grab a single value
# keys only, thanks
delete vars
about
this cli was thrown together quickly with aider, i also put up a blog post explaining why i made this.