Manage your shell environment with Envirou
This project is maintained by sverrirab
Many projects use .env files to store configuration. Envirou can load these directly into your shell.
Note: like all commands that modify the environment, ev dotenv requires the
ev shell wrapper (see “Shell integration” in the README).
Running the plain binary (envirou dotenv) only prints the shell commands
without applying them.
Load the default .env file from the current directory:
ev dotenv
Load a specific file:
ev dotenv .env.local
You can load multiple files in one command. Files are processed in order — later values override earlier ones:
ev dotenv .env .env.local
This is the same pattern used by Docker Compose and most dotenv libraries: base configuration in .env, local overrides in .env.local.
# Comments are ignored
KEY=value
QUOTED="hello world"
SINGLE_QUOTED='hello world'
export EXPORTED=value
EMPTY_VALUE=
# Lines without = are ignored
A typical project might have:
.env (committed to git):
DATABASE_HOST=localhost
DATABASE_PORT=5432
API_URL=https://api.dev.example.com
.env.local (in .gitignore):
DATABASE_PASSWORD=mysecret
API_URL=https://api.staging.example.com
Load both:
cd myproject
ev dotenv .env .env.local
The API_URL from .env.local overrides the one in .env. All variables are exported into your current shell (when run through the ev wrapper).
You can use ev dotenv alongside profiles. For example, load project-specific variables from .env and then activate an AWS profile:
ev dotenv .env
ev set awsprod