envee

A lightweight Go CLI tool that injects environment variables from a .env file into a child process. This is useful for managing environment configuration without modifying your shell profile or cluttering your command line with environment variables.

Installation

curl -fsSL https://envee.jackjakarta.xyz/install.sh | sh

Builds are available for Linux and macOS (amd64 and arm64). The script verifies checksums and installs to /usr/local/bin (or ~/.local/bin). Useful environment variables:

Homebrew

brew tap jackjakarta/envee
brew install envee

Building from Source

git clone https://github.com/jackjakarta/envee.git
cd envee
go build -o envee .

Usage

envee [-f .env] -- command [args...]

Options

Examples

Load variables from .env and run a command:

envee -- node server.js

Use a custom env file:

envee -f .env.production -- npm start

Pass arguments to the command:

envee -- python script.py --verbose --output=results.txt

Environment File Format

The .env file supports the following syntax:

# Comments start with #
DATABASE_URL=postgresql://localhost/mydb
API_KEY=secret123

# Optional export prefix
export DEBUG=true

# Values with quotes (quotes are stripped)
MESSAGE="Hello World"
PATH_VAR='/usr/local/bin'

# Empty values are supported
OPTIONAL_VAR=

Syntax Details

How It Works

envee reads the specified env file, parses the KEY=VALUE pairs, merges them with your current environment variables (env file variables override existing ones), and executes the child process with the merged environment.

The child process inherits the full environment (existing + injected variables) and envee passes through stdin/stdout/stderr, so it behaves transparently.