envset
envset is a command-line tool for setting environment variables in a .env file. it allows you to easily add or update environment variables without manually editing the .env file.
this cli was thrown together quickly with aider
usage
set environment variables
# .env file contents after running the command:
KEY1=value1
KEY2=value2
set environment variables from stdin
|
# .env file contents after running the command:
KEY1=value1
KEY2=value2
use a custom .env file location
# .env.test file contents after running the command:
KEY1=value1
by default, envset will create or update a .env file in the current directory. if you want to use a different file, you can specify it with the --file option.
get the value of a single environment variable
This command will print the value of KEY1 from the .env file. If the variable is not found, it will print an error message.
you can also specify a custom .env file location when using the get subcommand:
installation
homebrew
cargo