envset 0.1.5

A command-line tool for setting environment variables in a .env file
envset-0.1.5 is not a library.
Visit the last successful build: envset-0.2.0

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

envset KEY1=value1 KEY2=value2
# .env file contents after running the command:
KEY1=value1
KEY2=value2

set environment variables from stdin

echo -e "KEY1=value1\nKEY2=value2" | envset
# .env file contents after running the command:
KEY1=value1
KEY2=value2

use a custom .env file location

envset --file .env.test KEY1=value1
# .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.

installation

homebrew

brew install schpet/tap/envset

cargo

cargo install envset